Skip to content

Commit

Permalink
add latest dataset profile (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
anshbansal authored Feb 12, 2025
1 parent 079500a commit ea7d2ce
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions graphql/latest_profile/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Replace `urn` in the query with the URN that you wish to use
48 changes: 48 additions & 0 deletions graphql/latest_profile/query.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
dataset(urn: "urn:li:dataset:(urn:li:dataPlatform:snowflake,datahub_community.datahub_slack.message_block_field,PROD)") {
latestFullTableProfile: datasetProfiles(
limit: 1,
filter: {and: [{field: "partitionSpec.partition", values: ["FULL_TABLE_SNAPSHOT", "SAMPLE"]}]}
){
...datasetProfileFields
}
latestPartitionProfile: datasetProfiles(
limit: 1
filter: {and: [{field: "partitionSpec.partition", values: ["SAMPLE", "FULL_TABLE_SNAPSHOT"], negated: true}]}
) {
...datasetProfileFields
__typename
}
}
}
fragment datasetProfileFields on DatasetProfile {
rowCount
columnCount
sizeInBytes
timestampMillis
partitionSpec {
type
partition
timePartition {
startTimeMillis
durationMillis
__typename
}
__typename
}
fieldProfiles {
fieldPath
uniqueCount
uniqueProportion
nullCount
nullProportion
min
max
mean
median
stdev
sampleValues
__typename
}
__typename
}

0 comments on commit ea7d2ce

Please sign in to comment.