mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-10-31 10:49:00 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			199 lines
		
	
	
		
			4.8 KiB
		
	
	
	
		
			GraphQL
		
	
	
	
	
	
			
		
		
	
	
			199 lines
		
	
	
		
			4.8 KiB
		
	
	
	
		
			GraphQL
		
	
	
	
	
	
| query getDataProfiles($urn: String!, $limit: Int, $startTime: Long, $endTime: Long) {
 | |
|     dataset(urn: $urn) {
 | |
|         urn
 | |
|         datasetProfiles(limit: $limit, startTimeMillis: $startTime, endTimeMillis: $endTime) {
 | |
|             rowCount
 | |
|             columnCount
 | |
|             timestampMillis
 | |
|             fieldProfiles {
 | |
|                 fieldPath
 | |
|                 uniqueCount
 | |
|                 uniqueProportion
 | |
|                 nullCount
 | |
|                 nullProportion
 | |
|                 min
 | |
|                 max
 | |
|                 mean
 | |
|                 median
 | |
|                 stdev
 | |
|                 sampleValues
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| }
 | |
| 
 | |
| query getDataset($urn: String!) {
 | |
|     dataset(urn: $urn) {
 | |
|         ...nonRecursiveDatasetFields
 | |
|         schemaMetadata(version: 0) {
 | |
|             ...schemaMetadataFields
 | |
|         }
 | |
|         previousSchemaMetadata: schemaMetadata(version: -1) {
 | |
|             ...schemaMetadataFields
 | |
|         }
 | |
|         editableSchemaMetadata {
 | |
|             editableSchemaFieldInfo {
 | |
|                 fieldPath
 | |
|                 description
 | |
|                 globalTags {
 | |
|                     ...globalTagsFields
 | |
|                 }
 | |
|                 glossaryTerms {
 | |
|                     ...glossaryTerms
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         deprecation {
 | |
|             actor
 | |
|             deprecated
 | |
|             note
 | |
|             decommissionTime
 | |
|         }
 | |
|         globalTags {
 | |
|             ...globalTagsFields
 | |
|         }
 | |
|         glossaryTerms {
 | |
|             ...glossaryTerms
 | |
|         }
 | |
|         subTypes {
 | |
|             typeNames
 | |
|         }
 | |
|         domain {
 | |
|             ...entityDomain
 | |
|         }
 | |
|         container {
 | |
|             ...entityContainer
 | |
|         }
 | |
|         usageStats(range: MONTH) {
 | |
|             buckets {
 | |
|                 bucket
 | |
|                 duration
 | |
|                 resource
 | |
|                 metrics {
 | |
|                     uniqueUserCount
 | |
|                     totalSqlQueries
 | |
|                     topSqlQueries
 | |
|                 }
 | |
|             }
 | |
|             aggregations {
 | |
|                 uniqueUserCount
 | |
|                 totalSqlQueries
 | |
|                 users {
 | |
|                     user {
 | |
|                         urn
 | |
|                         username
 | |
|                     }
 | |
|                     count
 | |
|                     userEmail
 | |
|                 }
 | |
|                 fields {
 | |
|                     fieldName
 | |
|                     count
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         datasetProfiles(limit: 1) {
 | |
|             rowCount
 | |
|             columnCount
 | |
|             timestampMillis
 | |
|             fieldProfiles {
 | |
|                 fieldPath
 | |
|                 uniqueCount
 | |
|                 uniqueProportion
 | |
|                 nullCount
 | |
|                 nullProportion
 | |
|                 min
 | |
|                 max
 | |
|                 mean
 | |
|                 median
 | |
|                 stdev
 | |
|                 sampleValues
 | |
|             }
 | |
|         }
 | |
|         health {
 | |
|             status
 | |
|             message
 | |
|             causes
 | |
|         }
 | |
|         assertions(start: 0, count: 1) {
 | |
|             total
 | |
|         }
 | |
|         operations(limit: 1) {
 | |
|             timestampMillis
 | |
|             lastUpdatedTimestamp
 | |
|         }
 | |
|         upstream: lineage(input: { direction: UPSTREAM, start: 0, count: 100 }) {
 | |
|             ...fullLineageResults
 | |
|         }
 | |
|         downstream: lineage(input: { direction: DOWNSTREAM, start: 0, count: 100 }) {
 | |
|             ...fullLineageResults
 | |
|         }
 | |
|         ...viewProperties
 | |
|         autoRenderAspects: aspects(input: { autoRenderOnly: true }) {
 | |
|             aspectName
 | |
|             payload
 | |
|             renderSpec {
 | |
|                 displayType
 | |
|                 displayName
 | |
|                 key
 | |
|             }
 | |
|         }
 | |
|         status {
 | |
|             removed
 | |
|         }
 | |
|         readRuns: runs(start: 0, count: 20, direction: INCOMING) {
 | |
|             count
 | |
|             start
 | |
|             total
 | |
|         }
 | |
|         writeRuns: runs(start: 0, count: 20, direction: OUTGOING) {
 | |
|             count
 | |
|             start
 | |
|             total
 | |
|         }
 | |
|     }
 | |
| }
 | |
| 
 | |
| mutation updateDataset($urn: String!, $input: DatasetUpdateInput!) {
 | |
|     updateDataset(urn: $urn, input: $input) {
 | |
|         urn
 | |
|     }
 | |
| }
 | |
| 
 | |
| fragment viewProperties on Dataset {
 | |
|     viewProperties {
 | |
|         materialized
 | |
|         logic
 | |
|         language
 | |
|     }
 | |
| }
 | |
| 
 | |
| query getDatasetAssertions($urn: String!) {
 | |
|     dataset(urn: $urn) {
 | |
|         assertions(start: 0, count: 100) {
 | |
|             start
 | |
|             count
 | |
|             total
 | |
|             assertions {
 | |
|                 ...assertionDetails
 | |
|                 runEvents(status: COMPLETE, limit: 1) {
 | |
|                     total
 | |
|                     failed
 | |
|                     succeeded
 | |
|                     runEvents {
 | |
|                         ...assertionRunEventDetails
 | |
|                     }
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| }
 | |
| 
 | |
| query getDatasetRuns($urn: String!, $start: Int!, $count: Int!, $direction: RelationshipDirection!) {
 | |
|     dataset(urn: $urn) {
 | |
|         runs(start: $start, count: $count, direction: $direction) {
 | |
|             ...runResults
 | |
|         }
 | |
|     }
 | |
| }
 | 
