I'm using GraphQL to extract data about jobs and r...
# ask-community
s
I'm using GraphQL to extract data about jobs and runs from several dagster deployments to give myself an overall view. I'm trying to make a link between a run and a job. From what I can tell, when looking at
runsOrError
, a run refers to the repository its job belongs to by id and name (
repositoryOrigin.[id|repositoryName]
). But the only reference to the actual job is by name (
jobName
). See screenshot of
type Run
. Of course the connection could be made by
jobName
, but a job could get removed from a repository and replaced with a different job by the same name, which would mean that linking by
jobName
would be giving bad results. It would be cleaner to be able to make the connection by
Job.id
. When instead looking at
repositoriesOrError
, it's clear that a job does have an ID. Interestingly both Run and Job have
pipelineSnapshotId
, but this is not the same as
Job.id
. Perhaps there is subtlety there I don't understand. Is anyone able to explain please?