Area: Ingestion Issues
Sub-Area: Schema Field URN Management
Applies to: OSS + Cloud
Issue
The Microsoft SQL Server connector has a convert_column_urns_to_lowercase setting. It lowercases every column field path, which the connector describes as ensuring cross-platform compatibility. If a table has two columns whose names differ only by case (for example customer_name and Customer_Name), both become the same field path after lowercasing.
You Might Be Asking
- What happens when two columns in the same table differ only by case after I enable lowercase conversion?
- Will ingestion fail?
- How do I find out whether a column was dropped?
- How does column-level lineage behave for those columns?
- Should I enable this setting?
Cause
With convert_column_urns_to_lowercase on, the connector lowercases every schema field path. Two columns that differ only by case then share one field path.
The ingestion framework removes duplicate field paths before it sends anything to DataHub. This runs by default for every source, including SQL Server. It keeps the first column with a given field path and drops later duplicates.
Solution
What you will see
- Ingestion succeeds with no error.
- The schema shows every column except the dropped duplicate. The schema does not freeze and is not empty.
- The only signal is an INFO line in the run log:
Fixing duplicate field paths in schema aspect for <urn> by dropping fields: [...]. The processor also counts these in theduplicated_field_pathsreport counter. - Monitoring for ingestion failures or schema validation errors does not catch this case.
The server-side error Cannot perform UPSERT action on proposal. SchemaMetadata aspect has duplicated field paths appears only when a schema with duplicate field paths reaches the server directly, for example through a direct API write. Connector runs do not hit it.
Lineage for the two columns
The connector registers its lowercased schema with the SQL parser. The parser treats SQL Server column names as case-insensitive. A query that references Customer_Name or customer_name therefore resolves to the one lowercased column customer_name.
Lineage edges for either physical column are written to the same column URN, urn:li:schemaField:(<dataset urn>,customer_name). The lineage graph cannot show which of the two physical columns an edge belongs to. The schema tab shows only the first column, because the other one is dropped as described above. See Column Level Lineage for how to view column lineage.
Recommended steps
- Set
convert_column_urns_to_lowercase: truein your SQL Server recipe. It defaults tofalse. Wheninclude_lineageis on and the flag is off, the run warns:Lineage may not resolve accurately because 'convert_column_urns_to_lowercase' is False. To ensure correct lineage, set 'convert_column_urns_to_lowercase' to True.Theconvert_urns_to_lowercasesetting (defaultfalse) lowercases dataset URNs and has a matching warning. See the SQL Server config details. - After a run, search the run logs for
Fixing duplicate field paths in schema aspect. Each match names a dataset where a column was dropped. - If you find matches, rename the columns at the source database so no two differ only by case.
The convert_column_urns_to_lowercase option needs a recent CLI. CLI 1.5.0 rejects it as an unknown key, and CLI 1.7.0.20 includes it. If you run ingestion from the CLI, upgrade to the latest release. If you use UI ingestion, the CLI version of the source decides whether the option is available. The CLI Version setting on the source overrides every other setting. If a run rejects the key, do these steps:
- Open the SQL Server source.
- Expand Advanced Settings.
- Set CLI Version to a current release.
See UI Ingestion.