0
votes

I am trying to upload a csv into my BigQuery that is bigger than 10MB. I have to do that through Google Datastore, but I am getting problems with the process:

Errors: gs://edr-storage/exm.csv does not contain valid backup metadata.

I am following the steps but i don´t know how to proceed with:

"Click Storage > Storage browser, then click the bucket name that you specified in creating a Cloud Datastore backup. Each Cloud Datastore backup includes three objects. Copy the name of the object that ends with .backup_info"

Does someone can help me ?

Thanks

2
You say "I am trying to upload a csv" but then the process you describe is for importing from a Datastore backup. If you are uploading a csv, select the csv option, upload your file, then you can define the schema. - tx802

2 Answers

0
votes

If you are trying to create a table in BigQuery from Google Cloud Storage you have to mention source format as CSV and then select google cloud storage URI as "gs://mybucket/myobject.csv". Bigquery data upload from google cloud storage

0
votes

Similar to this answer to a similar question, you need to select your source format as "CSV", not "Cloud Datastore Backup". Cloud Datastore Backup is a different file format than CSV, so BigQuery is trying to read your CSV file as a completely different file type, which is failing.

Note that when your file is uploaded to a gs:// URI, that means you have uploaded your file to Google Cloud Storage, not Google Cloud Datastore.

To upload your CSV file, make sure to select CSV as your source format, then select Google Cloud Storage as your data source and input your URI. If you are using the BigQuery web UI, it should look like this:

Select CSV source format and specify a Google Cloud Storage URI on select data step