Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup!…
Browse files Browse the repository at this point in the history
… Copy PostgresSQL to GCS as CSV
  • Loading branch information
mik-laj committed Apr 18, 2024
1 parent 4d0a94c commit 0c29b92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bi_transfer_pola_backend_to_bq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ jobs:
--target-location "${GCP_REGION}"
--target-dataset "${GCP_BIGQUERY_DATASET}"
- name: "List BigQuery tables"
run: bq ls pola-bi-looker:pola-backend
run: bq ls "${GCP_BIGQUERY_DATASET}"
4 changes: 2 additions & 2 deletions pola-bi/postgres_to_gcs/gcs_to_bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def main():
subprocess.check_output(['gcloud', 'storage', 'ls', '--recursive', f'{source}/**/*.csv']).decode().splitlines()
)

for csv_file in csv_files:
log.info("Loading file: %s", csv_file)
for no, csv_file in enumerate(csv_files, start=1):
log.info("Loading file %s (%d/%d)", csv_file, no, len(csv_files))
table_name = csv_file.split('/')[-1].split('.')[0]

with NamedTemporaryFile() as f:
Expand Down

0 comments on commit 0c29b92

Please sign in to comment.