8/17/2023 0 Comments Bigquery load json![]() Replace destination dataset location accordingly.Replace GCS object URL to your own one.Replace BigQuery destination table name.Please remember to update the following parts: The code snippet is from the official tutorial of Google Cloud BigQuery documentation with a few changes. Print("Loaded rows.".format(destination_table.num_rows)) ![]() Load_job.result() # Waits for the job to complete.ĭestination_table = client.get_table(table_id) Location=" australia-southeast1", # Must match the destination dataset location. Uri = "gs:// YOUR_BUCKET_NAME/json_lines.jsonl" Create a Python script to load the fileĬreate a Python script file (gcs-to-bq.py) with the following content in Cloud Shell: from google.cloud import bigquery InfoEnsure the region are the same for the bucket and BigQuery.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |