Skip to content

Instantly share code, notes, and snippets.

@cnolanminich
Created November 8, 2024 17:21
Show Gist options
  • Save cnolanminich/f91e0bb0a008104d9131098000e9a510 to your computer and use it in GitHub Desktop.
Save cnolanminich/f91e0bb0a008104d9131098000e9a510 to your computer and use it in GitHub Desktop.
querying assets and jobs
query GetAssetDetails($assetKey: AssetKeyInput!) {
assetNodeOrError(assetKey: $assetKey) {
... on AssetNode {
assetKey {
path
}
dataVersion
description
groupName
hasAssetChecks
hasMaterializePermission
id
isExecutable
isMaterializable
isObservable
isPartitioned
jobNames
kinds
owners {
... on UserAssetOwner {
__typename
email
}
... on TeamAssetOwner {
__typename
team
}
}
partitionDefinition {
description
name
type
}
tags {
key
value
}
assetMaterializations(limit: 1) {
timestamp
eventType
message
partition
runId
}
}
}
}
## variables section
# {"assetKey": {
# "path": ["RAW_DATA","orders"]
# }
# }
query JobsQuery(
$repositoryLocationName: String!
$repositoryName: String!
) {
repositoryOrError(
repositorySelector: {
repositoryLocationName: $repositoryLocationName
repositoryName: $repositoryName
}
) {
... on Repository {
jobs {
id
name
tags{
key
value
}
runTags{
key
value
}
}
}
}
}
query FilteredRunsByJobName($jobName: String!, $cursor: String) {
runsOrError(
filter: { pipelineName: $jobName }
cursor: $cursor
limit: 10
) {
__typename
... on Runs {
results {
runId
jobName
status
runConfigYaml
startTime
endTime
stepKeysToExecute
assetSelection{
path
}
assetChecks{
assetKey{
path
}
name
}
tags{
key
value
}
}
}
}
}
## variables
# {"jobName": "refresh_analytics_model_job"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment