ATLAS-5397:Add 'location' attribute to trino_schema type definition - #746
Open
bhor-sanket wants to merge 1 commit into
Open
ATLAS-5397:Add 'location' attribute to trino_schema type definition#746bhor-sanket wants to merge 1 commit into
bhor-sanket wants to merge 1 commit into
Conversation
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.
What changes were proposed in this pull request?
Background
Trino sends
ENTITY_CREATE_V2notification events to Atlas when aCREATE SCHEMAstatement is executed with an explicit HDFS location. The event payload includes atrino_schemaentity with alocationattribute containing the HDFS path.A parallel event from the Hive Metastore bridge creates a
hive_dbentity with the samelocationvalue, which is persisted successfully.Problem Statement
trino_schemaentity payload is silently dropped by Atlas. The HDFS location is only visible on the associatedhive_dbentity created by the HiveMetastore bridge — not on the trino_schema entity itself.
trino_schemaentity and visible in Atlas UI / REST API.addons/models/6000-Trino/6010-trino-model.jsondoes not includelocationin its attributeDefs. DuringENTITY_CREATE_V2processing,EntityGraphMapper.mapAttributes() iterates only over type-defined attributes (structType.getAllAttributes()), so any attribute present in the incoming entity but absent from the type definition is silently
discarded with no error or warning logged.
trino_schemaentities in Atlas cannot see the schema's HDFS location. They must navigate to the linked hive_db entity to find it, which breaks the expected metadata completenessfor Trino-originated schemas.
How the patch resolves it
addons/models/6000-Trino/6010-trino-model.json— ensures fresh installs include the attribute at typecreation time.
addons/models/6000-Trino/patches/002-trino_schema_add_location.jsonwith ADD_ATTRIBUTE action (applyToVersion: "1.0" → updateToVersion: "1.1") — ensures existing deployments pick upthe attribute on Atlas restart without requiring a fresh bootstrap.
Files changed:
addons/models/6000-Trino/6010-trino-model.json— added location attribute to trino_schema entity definitionaddons/models/6000-Trino/patches/003-trino_schema_add_location.json— new patch file for existing deploymentsDesign decisions:
handles version bumping for existing deployments.
How was this patch tested?
Use-cases validation