Ryan Andrei Perez
02/23/2024, 10:02 AMScout
02/23/2024, 10:02 AMlaunchRun
mutation to execute a job and then query for the logs of that run. Here's a step-by-step guide based on the documentation: 1. Launch a run: First, you need to launch a run for the job using the launchRun
mutation. You will need to provide the selector
with the repository location name, repository name, and job name, as well as the runConfigData
for the job execution. graphql mutation LaunchRunMutation( $repositoryLocationName: String! $repositoryName: String! $jobName: String! $runConfigData: RunConfigData! ) { launchRun( executionParams: { selector: { repositoryLocationName: $repositoryLocationName repositoryName: $repositoryName jobName: $jobName } runConfigData: $runConfigData } ) { __typename ... on LaunchRunSuccess { run { runId } } ... on RunConfigValidationInvalid { errors { message reason } } ... on PythonError { message } } }
2. Query for compute logs: After you have successfully launched a run and obtained the runId
, you can query for the compute logs associated with that run. The documentation does not provide a specific GraphQL query for fetching compute logs directly. However, the compute logs are typically available in the Run details page of the Dagster UI, where you can view both structured event logs and raw compute logs. If you need to access the compute logs programmatically, you would typically look for a query or mutation in the GraphQL schema that allows you to fetch the logs for a given runId
. The exact query or mutation would depend on the schema provided by your Dagster instance, which may include fields for retrieving stdout and stderr logs. Please note that the documentation does not explicitly provide a GraphQL query for fetching compute logs, so you may need to refer to your Dagster instance's GraphQL schema or contact Dagster support for further assistance on constructing the appropriate query.Ryan Andrei Perez
02/23/2024, 10:05 AMScout
02/23/2024, 10:05 AM