https://dagster.io/ logo
a

Auster Cid

08/24/2020, 10:23 PM
Hi guys, is there any documentation on
PartitionScheduleDefinition
?
a

alex

08/24/2020, 10:33 PM
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

Auster Cid

08/24/2020, 10:57 PM
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

prha

08/25/2020, 12:25 AM
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

Auster Cid

08/25/2020, 12:42 AM
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

alex

08/25/2020, 2:45 PM
DagsterInstance.get().get_run_stats(run_id).start_time
👍 1