Jordan
04/26/2023, 5:56 PMcontext.instance.add_dynamic_partitions
method can add multiple keys while the context.instance.delete_dynamic_partition
method deletes a single key? Maybe context.instance.delete_dynamic_partitions
could be addedclaire
04/26/2023, 6:12 PMclaire
04/26/2023, 6:13 PMreturn SensorResult(dynamic_partitions_requests=[dynamic_partitions_def.build_delete_request(list_of_partition_keys)])
which accepts a list of partition keysJordan
04/27/2023, 8:28 PMPythonic resources
but I feel like a DB call is made for each run. My current solution with csv file:
@asset
def synchronyze(context):
df = get_df_with_query()
# Update partitioning with df
...
df.to_csv(path)
@asset
def other_asset(context):
...
df = pd.read_csv(path)
...
claire
04/28/2023, 3:06 PMsynchronyze
, and have @other_asset
be downstream of synchronyze
. This would allow all downstream assets to load the latest output of synchronize as an input instead of re-querying the database.sandy
04/28/2023, 10:18 PMadd_dynamic_partitions
from and the asset that's dynamically partitioned?