Basil V
03/06/2020, 10:13 PMdagit
how do you specify the mode to run for a pipeline / where can I configure this? I'm getting this error running dagit
:
dagster.check.CheckError: Failure condition: Could not find mode default in pipeline <PIPELINE_NAME>
because I am trying to run my pipeline in a mode called "development" rather than "default" — when I run via execute_pipeline
I'm able to pass in the mode via RunConfig
but I can't find the equivalent way to configure in a yaml file for instance (sorry if this is in the docs and I just haven't been able to locate it). Thanks for any help! (I guess I should caveat and ask, is the only way to specify mode via the dagit UI)abhi
03/06/2020, 10:17 PMBasil V
03/06/2020, 10:17 PMdagit
Basil V
03/06/2020, 10:18 PM@pipeline(
mode_defs=[
ModeDefinition(
name='development',
resource_defs={
'postgres_db': postgres.postgres_resource
},
description='Mode to be used in development.',
),
],
)
Basil V
03/06/2020, 10:22 PMdagit
it selects the development mode automatically (no more error) so maybe it was an artifact of something in the logs?Basil V
03/06/2020, 10:23 PMmax
03/06/2020, 10:24 PMBasil V
03/06/2020, 10:25 PMabhi
03/06/2020, 10:27 PMmax
03/06/2020, 10:28 PMBasil V
03/06/2020, 10:28 PMMissing required field "resources" at document config root. Available Fields: "['exection', 'loggers', 'resources', 'solids', 'storage'].
Basil V
03/06/2020, 10:28 PMBasil V
03/06/2020, 10:29 PMBasil V
03/06/2020, 10:29 PM@pipeline(
mode_defs=[
ModeDefinition(
name='development',
resource_defs={
'postgres_db': postgres.postgres_resource
},
description='Mode to be used in development.',
),
],
preset_defs=[
PresetDefinition.from_files(
name='development',
mode='development',
environment_files=[
file_relative_path(__file__, '../../utils/environments/development.yaml'),
],
),
],
)
Basil V
03/06/2020, 10:29 PMdevelopment.yaml
:
resources:
postgres:
config:
username: test
password: test
hostname: localhost
db_name: test
Basil V
03/06/2020, 10:30 PMBasil V
03/06/2020, 10:30 PMabhi
03/06/2020, 10:30 PMabhi
03/06/2020, 10:31 PMBasil V
03/06/2020, 10:33 PMabhi
03/06/2020, 10:34 PMBasil V
03/06/2020, 10:34 PMsashank
03/06/2020, 10:37 PMsashank
03/06/2020, 10:38 PM