Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
chowbao committed Dec 19, 2024
1 parent b76195e commit 312cd07
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions dags/sandbox_update_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
BQ_DATASET = Variable.get("public_dataset")
SANDBOX_PROJECT = Variable.get("bq_project")
SANDBOX_DATASET = Variable.get("sandbox_dataset")
INTERNAL_DATASET = Variable.get("bq_dataset")

batch_run_date = "{{ batch_run_date_as_datetime_string(dag, data_interval_start) }}"

Expand All @@ -60,6 +59,8 @@
)

for table_id in TABLES_ID:
if table_id == "retool_entity_data":
continue
query_path = get_query_filepath("update_table")
query = file_to_string(query_path)
sql_params = {
Expand All @@ -70,11 +71,6 @@
"target_dataset": SANDBOX_DATASET,
"batch_run_date": batch_run_date,
}

if table_id == "retool_entity_data":
sql_params["project_id"] = SANDBOX_PROJECT
sql_params["dataset_id"] = INTERNAL_DATASET

query = query.format(**sql_params)
tables_update_task = BigQueryInsertJobOperator(
task_id=f"update_{table_id}",
Expand Down

0 comments on commit 312cd07

Please sign in to comment.