Repository navigation
Description
Connector
Trino
Feature area
Metadata ingestion
Describe the bug
Two defects that together cause Trino column descriptions to silently stop syncing.
1. Columns with no comment are ingested with an empty-string description
Trino's SHOW COLUMNS reports a column with no comment as the empty string, never NULL. _get_columns in ingestion/src/metadata/ingestion/source/database/trino/metadata.py passes record.Comment straight through to description, so every uncommented column lands in OpenMetadata with "description": "" rather than no description at all. An explicit COMMENT '' produces the same value, so the two cases are indistinguishable at that layer.
2. Updated column comments are not ingested even with overrideMetadata: true
Once a column has a non-empty description, a re-run never updates it. The entity-level updateDescription() in EntityRepository.java honours the overrideMetadata flag, but the column-level updateColumnDescription() does not — it unconditionally reverts a bot PUT whenever the stored column description is non-empty. updateColumnDisplayName() has the same gap.
The two defects mask each other. A column with no comment is stored as "", which is nullOrEmpty, so its first comment does land — making the sync look functional right up until a second update to an already-described column is silently dropped.
To Reproduce
Part 1 — blank descriptions
- In Trino, create a table mixing all three comment states:
CREATE TABLE memory.testdb.student_data ( id BIGINT, age INTEGER COMMENT '', name VARCHAR COMMENT 'Name of the student' );
- Run metadata ingestion for the Trino service.
- Fetch the table's columns from the API.
idandageboth come back as"description": ""instead of having no description.
Part 2 — updates dropped
- Create a table where one column has a comment and another does not:
CREATE TABLE memory.default.fruits ( type VARCHAR, price DOUBLE COMMENT 'price of fruit' );
- Run ingestion.
typeis stored as"",priceasprice of fruit. - Change both comments in Trino:
COMMENT ON COLUMN memory.default.fruits.type IS 'first comment on fruit type'; COMMENT ON COLUMN memory.default.fruits.price IS 'second comment on fruit type';
- Re-run ingestion with
overrideMetadata: true. typeupdates correctly, butpricekeeps the staleprice of fruit.
As a control, ingesting the same Trino source into a brand-new service produces the correct description for both columns — that path is an insert, so no merge guard runs. This confirms the connector reads the updated comments correctly and the loss is in the server-side column merge, not in extraction.
Expected behavior
- A column with no comment in Trino should be ingested with no description, not an empty string, so it is not shown as described and does not interfere with later updates.
- With
overrideMetadata: true, a changed source comment should overwrite the stored column description, matching the behaviour already provided for the entity-level description.
Connection / ingestion config
source:
type: trino
serviceName: <redacted>
serviceConnection:
config:
type: Trino
hostPort: <redacted>
username: <redacted>
authType:
catalog: memory
sourceConfig:
config:
type: DatabaseMetadata
overrideMetadata: true
sink:
type: metadata-rest
config: {}
workflowConfig:
loggerLevel: DEBUG
openMetadataServerConfig:
hostPort: <redacted>/api
authProvider: openmetadata
securityConfig:
jwtToken: <redacted>OS
macOS 26.5.1
Python version
3.11.15
OpenMetadata version
2.0.0-SNAPSHOT (main)
Additional context
Root causes located at:
ingestion/src/metadata/ingestion/source/database/trino/metadata.py—_get_columnspasses the empty-string comment through unchanged.TRINO_TABLE_COMMENTSfiltersis not nullbut notCOMMENT '', so the table comment has the same gap.openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityRepository.java—ColumnEntityUpdater.updateColumnDescription/updateColumnDisplayNameomit the!overrideMetadatacondition thatupdateDescription()andupdateDisplayName()both have.
Note that fixing only the ingestion side is not sufficient: it stops new blank descriptions but leaves existing non-empty column descriptions permanently un-updatable by ingestion. Both sides are needed.
I have a fix ready and will open a PR linking this issue.
Pre-submission checklist
- I searched for duplicate issues.
- I removed credentials, hostnames, emails, and other sensitive data from logs and config.
Activity