Martim Passos
07/26/2021, 7:03 PMowen
07/26/2021, 8:10 PM# config schema
@solid(config_schema={'backlog': StringSource, 'jpeg_hd': StringSource}):
def ...
# config yaml
file_dispatcher:
backlog:
config:
env: IMG_BACKLOG
jpeg_hd:
config:
env: JPEG_HD
Martim Passos
07/26/2021, 8:46 PMStringSource
was solid-level, and not declaring it explicitly for each config I had in this caseowen
07/26/2021, 8:49 PMMartim Passos
07/26/2021, 8:54 PMowen
07/26/2021, 8:54 PMGeorge Pearse
09/08/2021, 1:43 PM9 @solid(config_schema={
160 'cronjob_user': StringSource,
161 'cronjob_password': StringSource
162 })
163 def authenticate_api(context: SolidExecutionContext) -> dict:
164 """
165 Given cronjob_user and cronjob_password returns json_headers containing
166 authorization token
167 """
168 cronjob_user = context.solid_config['cronjob_user']
169 cronjob_password = context.solid_config['cronjob_password']
When I print what Dagster things cronjob user is within the pipeline I just get CRONJOB_USER (the input in the yaml as opposed to the corresponding env variable) where am I going wrong?owen
09/09/2021, 3:35 PM{"config":"CRONJOB_USER"}
instead of {"config":{"env":"CRONJOB_USER"}}
because StringSource accepts either a normal string or the name of an env var.johann
09/09/2021, 3:39 PMGeorge Pearse
09/09/2021, 4:21 PMjohann
09/09/2021, 4:22 PM