https://dagster.io/ logo
#ask-community
Title
# ask-community
g

Gabriel Montañola

08/25/2022, 3:57 PM
Hi there folks! graphql google snake blob
tl;dr; Passing arbitrary run_id via GraphQL Python Client
Is there anyway of using
executionMetadata
with the GraphQL client? I want to provide an user generated
run_id
to a job execution. I can fallback to using a raw GraphQL mutation if it's not implemented yet.
c

chris

08/25/2022, 9:16 PM
hey - you can execute a run via graphql using the
launchRun
mutation documented here: https://docs.dagster.io/concepts/dagit/graphql#launch-a-run but we don't have a way to specify an arbitrary run_id when doing this. What's the reason you need to set your own run_id? I'm wondering if any other dagster machinery can be of use there
g

Gabriel Montañola

08/27/2022, 11:59 AM
Hi @chris! It's kind of an odd use but I wanna use my provided
run_id
in a
run_config
for a dbt dbt job. In this job I have something like
--vars 'dbt_run_id: <my_fancy_id>'
so I can get an extra audit trail with a
dbt_run_id
column in my model.
Copy code
launchRun(
          executionParams: {
            selector: {
                repositoryName: $repositoryName,
                repositoryLocationName: $repositoryLocationName,
                jobName: $jobName
            },
            runConfigData: $runConfigData,
            executionMetadata: {
                runId: $runId
            }
        }
      ){
This worked by the way.
c

chris

08/29/2022, 7:53 PM
Ah interesting - didn't realize that executionMetadata had a runId field already. Glad it worked for you!
2 Views