mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-10-30 18:26:58 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			462 lines
		
	
	
		
			9.8 KiB
		
	
	
	
		
			GraphQL
		
	
	
	
	
	
			
		
		
	
	
			462 lines
		
	
	
		
			9.8 KiB
		
	
	
	
		
			GraphQL
		
	
	
	
	
	
| fragment lineageNodeProperties on EntityWithRelationships {
 | |
|     urn
 | |
|     type
 | |
|     ... on DataJob {
 | |
|         urn
 | |
|         type
 | |
|         dataFlow {
 | |
|             ...nonRecursiveDataFlowFields
 | |
|         }
 | |
|         jobId
 | |
|         ownership {
 | |
|             ...ownershipFields
 | |
|         }
 | |
|         properties {
 | |
|             name
 | |
|             description
 | |
|             externalUrl
 | |
|             customProperties {
 | |
|                 key
 | |
|                 value
 | |
|             }
 | |
|         }
 | |
|         globalTags {
 | |
|             ...globalTagsFields
 | |
|         }
 | |
|         glossaryTerms {
 | |
|             ...glossaryTerms
 | |
|         }
 | |
|         domain {
 | |
|             ...entityDomain
 | |
|         }
 | |
|         ...entityDataProduct
 | |
|         deprecation {
 | |
|             ...deprecationFields
 | |
|         }
 | |
|         dataPlatformInstance {
 | |
|             ...dataPlatformInstanceFields
 | |
|         }
 | |
|         editableProperties {
 | |
|             description
 | |
|         }
 | |
|         status {
 | |
|             removed
 | |
|         }
 | |
|     }
 | |
|     ... on DataFlow {
 | |
|         orchestrator
 | |
|         flowId
 | |
|         cluster
 | |
|         properties {
 | |
|             name
 | |
|             description
 | |
|             project
 | |
|         }
 | |
|         ownership {
 | |
|             ...ownershipFields
 | |
|         }
 | |
|         globalTags {
 | |
|             ...globalTagsFields
 | |
|         }
 | |
|         glossaryTerms {
 | |
|             ...glossaryTerms
 | |
|         }
 | |
|         editableProperties {
 | |
|             description
 | |
|         }
 | |
|         platform {
 | |
|             ...platformFields
 | |
|         }
 | |
|         domain {
 | |
|             ...entityDomain
 | |
|         }
 | |
|         ...entityDataProduct
 | |
|         status {
 | |
|             removed
 | |
|         }
 | |
|     }
 | |
|     ... on Dashboard {
 | |
|         urn
 | |
|         type
 | |
|         tool
 | |
|         dashboardId
 | |
|         properties {
 | |
|             name
 | |
|             description
 | |
|             externalUrl
 | |
|             lastRefreshed
 | |
|             created {
 | |
|                 time
 | |
|             }
 | |
|             lastModified {
 | |
|                 time
 | |
|             }
 | |
|         }
 | |
|         ownership {
 | |
|             ...ownershipFields
 | |
|         }
 | |
|         globalTags {
 | |
|             ...globalTagsFields
 | |
|         }
 | |
|         glossaryTerms {
 | |
|             ...glossaryTerms
 | |
|         }
 | |
|         platform {
 | |
|             ...platformFields
 | |
|         }
 | |
|         domain {
 | |
|             ...entityDomain
 | |
|         }
 | |
|         ...entityDataProduct
 | |
|         parentContainers {
 | |
|             ...parentContainersFields
 | |
|         }
 | |
|         status {
 | |
|             removed
 | |
|         }
 | |
|         deprecation {
 | |
|             ...deprecationFields
 | |
|         }
 | |
|         dataPlatformInstance {
 | |
|             ...dataPlatformInstanceFields
 | |
|         }
 | |
|         editableProperties {
 | |
|             description
 | |
|         }
 | |
|         status {
 | |
|             removed
 | |
|         }
 | |
|         subTypes {
 | |
|             typeNames
 | |
|         }
 | |
|     }
 | |
|     ... on Chart {
 | |
|         tool
 | |
|         chartId
 | |
|         properties {
 | |
|             name
 | |
|             description
 | |
|         }
 | |
|         editableProperties {
 | |
|             description
 | |
|         }
 | |
|         ownership {
 | |
|             ...ownershipFields
 | |
|         }
 | |
|         platform {
 | |
|             ...platformFields
 | |
|         }
 | |
|         domain {
 | |
|             ...entityDomain
 | |
|         }
 | |
|         ...entityDataProduct
 | |
|         status {
 | |
|             removed
 | |
|         }
 | |
|     }
 | |
|     ... on Dataset {
 | |
|         name
 | |
|         properties {
 | |
|             name
 | |
|             description
 | |
|             qualifiedName
 | |
|         }
 | |
|         editableProperties {
 | |
|             description
 | |
|         }
 | |
|         platform {
 | |
|             ...platformFields
 | |
|         }
 | |
|         ownership {
 | |
|             ...ownershipFields
 | |
|         }
 | |
|         subTypes {
 | |
|             typeNames
 | |
|         }
 | |
|         status {
 | |
|             removed
 | |
|         }
 | |
|         fineGrainedLineages {
 | |
|             upstreams {
 | |
|                 urn
 | |
|                 path
 | |
|             }
 | |
|             downstreams {
 | |
|                 urn
 | |
|                 path
 | |
|             }
 | |
|         }
 | |
|     }
 | |
|     ... on MLModelGroup {
 | |
|         urn
 | |
|         type
 | |
|         name
 | |
|         description
 | |
|         origin
 | |
|         platform {
 | |
|             ...platformFields
 | |
|         }
 | |
|         ownership {
 | |
|             ...ownershipFields
 | |
|         }
 | |
|         status {
 | |
|             removed
 | |
|         }
 | |
|     }
 | |
|     ... on MLModel {
 | |
|         urn
 | |
|         type
 | |
|         name
 | |
|         description
 | |
|         origin
 | |
|         platform {
 | |
|             ...platformFields
 | |
|         }
 | |
|         ownership {
 | |
|             ...ownershipFields
 | |
|         }
 | |
|         status {
 | |
|             removed
 | |
|         }
 | |
|     }
 | |
|     ... on MLFeatureTable {
 | |
|         ...nonRecursiveMLFeatureTable
 | |
|     }
 | |
|     ... on MLFeature {
 | |
|         ...nonRecursiveMLFeature
 | |
|     }
 | |
|     ... on MLPrimaryKey {
 | |
|         ...nonRecursiveMLPrimaryKey
 | |
|     }
 | |
| }
 | |
| 
 | |
| fragment lineageFields on EntityWithRelationships {
 | |
|     ...lineageNodeProperties
 | |
|     ...canEditLineageFragment
 | |
|     ... on Dataset {
 | |
|         siblings {
 | |
|             isPrimary
 | |
|             siblings {
 | |
|                 urn
 | |
|                 type
 | |
|                 ...lineageNodeProperties
 | |
|             }
 | |
|         }
 | |
|     }
 | |
|     upstream: lineage(input: { direction: UPSTREAM, start: 0, count: 100, separateSiblings: $separateSiblings }) {
 | |
|         ...leafLineageResults
 | |
|     }
 | |
|     downstream: lineage(input: { direction: DOWNSTREAM, start: 0, count: 100, separateSiblings: $separateSiblings }) {
 | |
|         ...leafLineageResults
 | |
|     }
 | |
| }
 | |
| 
 | |
| fragment lineageRelationshipFields on LineageRelationship {
 | |
|     type
 | |
|     createdOn
 | |
|     createdActor {
 | |
|         urn
 | |
|         type
 | |
|         ... on CorpUser {
 | |
|             username
 | |
|             info {
 | |
|                 displayName
 | |
|             }
 | |
|             properties {
 | |
|                 displayName
 | |
|             }
 | |
|             editableProperties {
 | |
|                 displayName
 | |
|             }
 | |
|         }
 | |
|     }
 | |
|     updatedOn
 | |
|     updatedActor {
 | |
|         urn
 | |
|         type
 | |
|         ... on CorpUser {
 | |
|             username
 | |
|             info {
 | |
|                 displayName
 | |
|             }
 | |
|             properties {
 | |
|                 displayName
 | |
|             }
 | |
|             editableProperties {
 | |
|                 displayName
 | |
|             }
 | |
|         }
 | |
|     }
 | |
|     isManual
 | |
| }
 | |
| 
 | |
| fragment fullLineageResults on EntityLineageResult {
 | |
|     start
 | |
|     count
 | |
|     total
 | |
|     filtered
 | |
|     relationships {
 | |
|         ...lineageRelationshipFields
 | |
|         entity {
 | |
|             ...lineageFields
 | |
|             ... on Dataset {
 | |
|                 schemaMetadata(version: 0) @include(if: $showColumns) {
 | |
|                     ...schemaMetadataFields
 | |
|                 }
 | |
|             }
 | |
|             ... on Chart {
 | |
|                 inputFields @include(if: $showColumns) {
 | |
|                     ...inputFieldsFields
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| }
 | |
| 
 | |
| fragment leafLineageResults on EntityLineageResult {
 | |
|     start
 | |
|     count
 | |
|     total
 | |
|     filtered
 | |
|     relationships {
 | |
|         ...lineageRelationshipFields
 | |
|         entity {
 | |
|             urn
 | |
|             type
 | |
|         }
 | |
|     }
 | |
| }
 | |
| 
 | |
| fragment partialLineageResults on EntityLineageResult {
 | |
|     start
 | |
|     count
 | |
|     total
 | |
|     filtered
 | |
| }
 | |
| 
 | |
| query getEntityLineage(
 | |
|     $urn: String!
 | |
|     $separateSiblings: Boolean
 | |
|     $showColumns: Boolean!
 | |
|     $startTimeMillis: Long
 | |
|     $endTimeMillis: Long
 | |
|     $excludeUpstream: Boolean = false
 | |
|     $excludeDownstream: Boolean = false
 | |
| ) {
 | |
|     entity(urn: $urn) {
 | |
|         urn
 | |
|         type
 | |
|         ...lineageNodeProperties
 | |
|         ...canEditLineageFragment
 | |
|         ... on Dataset {
 | |
|             schemaMetadata(version: 0) @include(if: $showColumns) {
 | |
|                 ...schemaMetadataFields
 | |
|             }
 | |
|             siblings {
 | |
|                 isPrimary
 | |
|                 siblings {
 | |
|                     urn
 | |
|                     type
 | |
|                     ...lineageNodeProperties
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         ... on Chart {
 | |
|             inputFields @include(if: $showColumns) {
 | |
|                 ...inputFieldsFields
 | |
|             }
 | |
|         }
 | |
|         ... on EntityWithRelationships {
 | |
|             upstream: lineage(
 | |
|                 input: {
 | |
|                     direction: UPSTREAM
 | |
|                     start: 0
 | |
|                     count: 100
 | |
|                     separateSiblings: $separateSiblings
 | |
|                     startTimeMillis: $startTimeMillis
 | |
|                     endTimeMillis: $endTimeMillis
 | |
|                 }
 | |
|             ) @skip(if: $excludeUpstream) {
 | |
|                 ...fullLineageResults
 | |
|             }
 | |
|             downstream: lineage(
 | |
|                 input: {
 | |
|                     direction: DOWNSTREAM
 | |
|                     start: 0
 | |
|                     count: 100
 | |
|                     separateSiblings: $separateSiblings
 | |
|                     startTimeMillis: $startTimeMillis
 | |
|                     endTimeMillis: $endTimeMillis
 | |
|                 }
 | |
|             ) @skip(if: $excludeDownstream) {
 | |
|                 ...fullLineageResults
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| }
 | |
| 
 | |
| fragment canEditLineageFragment on EntityWithRelationships {
 | |
|     ... on Dataset {
 | |
|         privileges {
 | |
|             canEditLineage
 | |
|         }
 | |
|     }
 | |
|     ... on Chart {
 | |
|         privileges {
 | |
|             canEditLineage
 | |
|         }
 | |
|     }
 | |
|     ... on Dashboard {
 | |
|         privileges {
 | |
|             canEditLineage
 | |
|         }
 | |
|     }
 | |
|     ... on DataJob {
 | |
|         privileges {
 | |
|             canEditLineage
 | |
|         }
 | |
|     }
 | |
| }
 | |
| 
 | |
| query getLineageCounts(
 | |
|     $urn: String!
 | |
|     $separateSiblings: Boolean
 | |
|     $startTimeMillis: Long
 | |
|     $endTimeMillis: Long
 | |
|     $excludeUpstream: Boolean = false
 | |
|     $excludeDownstream: Boolean = false
 | |
| ) {
 | |
|     entity(urn: $urn) {
 | |
|         urn
 | |
|         type
 | |
|         ... on EntityWithRelationships {
 | |
|             upstream: lineage(
 | |
|                 input: {
 | |
|                     direction: UPSTREAM
 | |
|                     start: 0
 | |
|                     count: 100
 | |
|                     separateSiblings: $separateSiblings
 | |
|                     startTimeMillis: $startTimeMillis
 | |
|                     endTimeMillis: $endTimeMillis
 | |
|                 }
 | |
|             ) @skip(if: $excludeUpstream) {
 | |
|                 filtered
 | |
|                 total
 | |
|             }
 | |
|             downstream: lineage(
 | |
|                 input: {
 | |
|                     direction: DOWNSTREAM
 | |
|                     start: 0
 | |
|                     count: 100
 | |
|                     separateSiblings: $separateSiblings
 | |
|                     startTimeMillis: $startTimeMillis
 | |
|                     endTimeMillis: $endTimeMillis
 | |
|                 }
 | |
|             ) @skip(if: $excludeDownstream) {
 | |
|                 filtered
 | |
|                 total
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| }
 | 
