Timothy Elder
04/19/2023, 9:24 PMowen
04/21/2023, 8:40 PMTimothy Elder
04/21/2023, 8:54 PMowen
04/21/2023, 8:56 PMdagster dev
/ launching runs through the UI?Timothy Elder
04/21/2023, 8:57 PMowen
04/21/2023, 9:04 PMTimothy Elder
04/21/2023, 9:07 PMowen
04/21/2023, 9:09 PMTimothy Elder
04/21/2023, 9:16 PMowen
04/21/2023, 9:20 PMTimothy Elder
04/26/2023, 9:18 PMdaniel
04/27/2023, 1:39 AMTimothy Elder
04/27/2023, 5:18 PMdaniel
04/27/2023, 5:19 PMdaniel
04/27/2023, 5:19 PMTimothy Elder
04/27/2023, 6:34 PMdaniel
04/27/2023, 6:49 PMf"AWS_ACCESS_KEY_ID={secretsmanager_secrets_aws_key}",
secretsmanager_secrets_aws_key
is an op, which is a function, not a string - it looks to me like you're hoping to take the output of that op and read it in as an input to extract_tableau? You'll need to define that value as an input to the op function, rather than referencing the value of another op function directlydaniel
04/27/2023, 6:51 PMfrom dagster import job, op
@op
def return_five():
return 5
@op
def add_one(arg):
return arg + 1
@job
def do_stuff():
add_one(return_five())
It's
@op
def add_one(arg):
return arg + 1
not
@op
def add_one():
return return_five + 1
even though the value of arg is the output of the return_five opdaniel
04/27/2023, 6:58 PMos.getenv("aws_access_key_id")
and reference the value directly - that's probably simplestTimothy Elder
04/28/2023, 2:51 PMdaniel
04/28/2023, 2:52 PMTimothy Elder
04/28/2023, 7:36 PMNote that your ops must also declare that they require this resource with
`required_resource_keys`, or it will not be initialized for the execution of their compute
functions.
daniel
04/28/2023, 7:36 PMTimothy Elder
05/01/2023, 4:52 AMdaniel
05/02/2023, 11:06 AMdaniel
05/02/2023, 11:08 AMdaniel
05/02/2023, 12:02 PM@op(required_resource_keys={'secrets'})
def extract_tableau(context, orgs):
secrets = context.resources.secrets
aws_access_key_id = secrets.get_secret_value(
SecretId='arn:aws:secretsmanager:region:aws_account_id:secret:appauthexample-AbCdEf'
)
execute_k8s_job(
...,
env_vars=[
f"AWS_ACCESS_KEY_ID={aws_access_key_id)}",
...
]
,,,
)
Timothy Elder
05/03/2023, 4:24 PMdaniel
05/03/2023, 4:25 PMsecretsmanager_secrets_resource
, not secretsmanager_resource
(confusing names)daniel
05/03/2023, 4:26 PM