We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e466f3b commit e73948dCopy full SHA for e73948d
bigquery_python_tutorial/insert.py
@@ -24,14 +24,14 @@ def gcs_csv_to_table(
24
"""
25
try:
26
full_table_id = f"{project_id}.{dataset_id}.{table_id}"
27
- gcp_uri = f"gs://{GCP_BUCKET_NAME}/{remote_csv_path}"
+ gcs_csv_uri = f"gs://{GCP_BUCKET_NAME}/{remote_csv_path}"
28
job_config = LoadJobConfig(
29
autodetect=True,
30
skip_leading_rows=1,
31
source_format=SourceFormat.CSV,
32
)
33
load_job = gbq.load_table_from_uri(
34
- gcp_uri, full_table_id, job_config=job_config
+ gcs_csv_uri, full_table_id, job_config=job_config
35
36
LOGGER.info(f"Starting job {load_job.job_id}.")
37
LOGGER.info(load_job.result()) # Waits for table load to complete.
0 commit comments