Hi team, I have a question related to RunRequest p...
# ask-community
h
Hi team, I have a question related to RunRequest partition tags. What’ the best way to get partition tags to feed to RunRequest please?
We were using the code below to get the partition tags. But it seems that jobs created from
define_asset_job
return None for
get_partition_set_def()
Copy code
partition = job.get_partition_set_def().get_partition(active_date_str)
tags = job.get_partition_set_def().tags_for_partition(partition)
Copy code
def get_daily_partition_config():
    @daily_partitioned_config(
        start_date=PARTITION_START_DATE, timezone=str(TZ), end_offset=1
    )
    def daily_partition_config(start: datetime, _end: datetime):
        return self.create_run_config_for_date(start)

    return daily_partition_config

job = define_asset_job(
    name="job_name",
    config=get_daily_partition_config(),
    selection=AssetSelection.assets(asset),
)
s
you can do
job.run_request_for_partition(partition_key=active_date_str, run_key=None)
(which will also create the RunRequest for you)
h
Nice! Thanks Sandy!