Hi guys, is there any documentation on `PartitionS...
# announcements
a
Hi guys, is there any documentation on
PartitionScheduleDefinition
?
a
currently
PartitionScheduleDefinition
is not really set up to be constructed directly. It’s used in
create_schedule_definition
on
PartitionSetDefinition
What are you lookin to do?
a
I have a partitioned pipeline and I'm trying to create a schedule that executes it for the last two days
Well, actually, this pipeline will be run with several different configs. I want to generate a schedule for each config.
p
apologies, we should figure out a way to expose this method on the API docs, but the
create_schedule_definition
is the method you want. There’s a useful doc block here that we should hoist onto the doc site: https://github.com/dagster-io/dagster/blob/4a91c9d09b50db93e9174c93a4ada0e138e3a046/python_modules/dagster/dagster/core/definitions/partition.py#L165
there are also a handful of sites in our examples code that use this method to construct schedules: https://github.com/dagster-io/dagster/blob/4a91c9d09b50db93e9174c93a4ada0e138e3a046/python_modules/dagster-test/dagster_test/toys/schedules.py#L81
There’s also an example on our API docs in the
repository
doc block: https://docs.dagster.io/_apidocs/repositories (see
make_expensive_schedule
)
a
Hmm, I see... I think I got it. Thanks guys!
Is there any way to get the date the pipeline was launched from a
PipelineRun
?
a
DagsterInstance.get().get_run_stats(run_id).start_time
👍 1