Hi all, I know that we can get partition_key from ...
# ask-community
s
Hi all, I know that we can get partition_key from op context, but the partition_key is only includes start_time. How to get the end_time also of a partition in an op? Because partition is a very common thing in data engineering so it’s quite weird we have to pass it into resource to get it from op.
y
Hi @Son Giang could you plz provide more context (code snippet for example) of what you are trying to accomplish?
s
Hi @yuhan, you can read the question I asked early here: https://dagster.slack.com/archives/C01U954MEER/p1650600477337029
Copy code
from dagster import make_values_resource

partition_bounds = make_values_resource(start=str, end=str)
One resolution is pass the start_time and end_time in resource for ops to get it out. But it requires a lot of boiler plate when I have to pass the partition_bounds to every job resource config. The another comments suggest to use context.partition_key, but the context.partition_key contains only start_time (it doesn’t include end_time). How can I also get end_time in this situation?