Aaron Gonzalez
02/24/2023, 12:43 PMbigquery_query
here. Not that big of a deal but I just would prefer to see something a little more descriptive.
https://prefecthq.github.io/prefect-gcp/bigquery/#prefect_gcp.bigquery.bigquery_query
if await bigquery_query(
exists_query,
creds
):
print(f"Deleting data from the {sync_date} partition.")
await bigquery_query(
del_query,
creds
)
await bigquery_query(
load_query,
creds
)
Wellington Braga
02/24/2023, 2:33 PM@task(
name="name_task",
task_run_name="name_runned_task",
)
my_task = bigquery_query
my_task.name = "name_task"
await myt_task(load_query, creds)
Ryan Peden
02/24/2023, 2:52 PMwith_options
is what you're looking for if you want to change the name of a single task run.
For example:
exists_task = bigquery_query.with_options(name="check existence")
delete_task = bigquery_query.with_options(name="delete data")
load_task = bigquery_query.with_options(name="load data")
if await exists_task(exists_query, creds):
print(f"Deleting data from the {sync_date} partition.")
await delete_task(del_query, creds)
await load_task(load_query, creds)
Aaron Gonzalez
02/24/2023, 4:41 PM