Reputation: 837
I was wondering if it would be possible to compose Google Storage Objects (specifically csv
files) without headers (i.e. without the row with column names) while using gsutil
.
Currently, I can do the following:
gsutil compose gs://bucket/test_file_1.csv gs://bucket/test_file_2.csv gs://bucket/test-composition-files.csv
However, I will be unable to ingest test-composition-files.csv
into Google BigQuery because compose
blindly appended the files (including the column names).
One possible solution would be to download the file locally and process it with pandas
, but this is not ideal for large files.
Is there any way to do this via the CLI? I could not find anything in the docs.
Upvotes: 3
Views: 1023
Reputation: 75775
By reading the comment, I think you are spending effort in the wrong way. I understood that you wanted to load your files into big query, but the large number of file prevented you to do this (too many API calls). And dataflow is too slow.
Maybe you can think differently. I have 2 solutions to propose
Is it acceptable alternatives?
Upvotes: 1