Defining my first partitioned asset. Other than th...
# ask-community
a
Defining my first partitioned asset. Other than the
context.partition_key
is there anything else to pull from to get the partition definitely? For example, if I'm using
MonthlyPartitionsDefinition
, the
partition_key
will be a YYYY-MM-DD string but it would be convenient if there were some data available in the context to give me an actual range. Of course, I can calculate the end of the month in my code but if it's already available it would be great to use.
t
Hi! I'm using the following snippet to get start/end timestamp/dates. Note that these are pendulum datetime objects.
Copy code
if context.has_asset_partitions:
    start, end = context.asset_partitions_time_window