feat: include outputFacets and inputFacets in Dataset API responses#3103
Open
psaikaushik wants to merge 2 commits intoMarquezProject:mainfrom
Open
feat: include outputFacets and inputFacets in Dataset API responses#3103psaikaushik wants to merge 2 commits intoMarquezProject:mainfrom
outputFacets and inputFacets in Dataset API responses#3103psaikaushik wants to merge 2 commits intoMarquezProject:mainfrom
Conversation
Update the DatasetDao SQL queries (findDatasetByName and findAll) to include facets of type 'output' in addition to the existing 'dataset', 'unknown', and 'input' types. Previously, facets reported as outputFacets (e.g., OutputStatistics) or inputFacets (e.g., DataQualityMetrics, DataQualityAssertions) by OpenLineage integrations were stored in the dataset_facets table with their correct type but were filtered out by the query because it only matched 'dataset', 'unknown', and 'input' types. Note: 'input' type was already included in findDatasetByName but 'output' was missing from both queries. The findAll query was also missing 'output'. Closes MarquezProject#1746
Update DatasetVersionDao SQL queries (findByUuid and findAll) to also include facets of type 'output' alongside the existing 'dataset', 'unknown', and 'input' types. This ensures that facets like OutputStatistics reported by OpenLineage integrations are returned in DatasetVersion API responses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the
DatasetDaoandDatasetVersionDaoSQL queries to include facets of type'output'in API responses, in addition to the existing'dataset','unknown', and'input'types.Closes #1746
Problem
The OpenLineage spec includes
outputFacetsandinputFacetson Datasets reported by aRunEvent. Integrations like Spark and GreatExpectations report facets such asOutputStatisticsandDataQualityMetricsusing these fields.Marquez already correctly stores these facets in the
dataset_facetstable with the appropriate type (INPUTorOUTPUT) viaDatasetFacetsDao. However, the read queries inDatasetDaoandDatasetVersionDaofiltered with:This excluded
'output'type facets (e.g.,OutputStatistics) from API responses.Fix
Added
OR df.type ILIKE 'output'to the facet type filter in:DatasetDaofindDatasetByName'output'DatasetDaofindAll'output'DatasetVersionDaofindByUuid'output'DatasetVersionDaofindAll'output'Note:
DatasetVersionDao.findByalready includes all facet types (no type filter), so no change needed there.Impact
API responses for Datasets and DatasetVersions will now include facets like:
OutputStatistics(row count, byte size)DataQualityMetricsDataQualityAssertionsoutputFacetsorinputFacets