Redshift connector: External table column types "string"/"double" ingested as UNKNOWN, breaking column-level test type selection
Connector
Redshift
Feature area
Metadata ingestion
Describe the bug
Redshift external (Spectrum) tables whose columns have Hive-style types like string and double are ingested with dataType: "UNKNOWN" in OpenMetadata, even though the raw type is correctly detected (stored in dataTypeDisplay). This causes the "Select test type" dropdown to show "No data" when adding column-level data quality tests, because the supportedDataType=UNKNOWN filter matches zero test definitions.
The root cause is in REDSHIFT_GET_SCHEMA_COLUMN_INFO (in ingestion/src/metadata/ingestion/source/database/redshift/queries.py). The external tables UNION normalizes some types but misses others:
CASE
WHEN external_type = 'int' THEN 'integer'
ELSE replace(replace(external_type, 'decimal', 'numeric'), 'varchar', 'character varying')
END AS "type"
Types like string and double are not normalized to PostgreSQL equivalents (character varying, double precision), so they aren't found in SQLAlchemy's ischema_names and fall through to create_sqlalchemy_type("UNKNOWN") in ingestion/src/metadata/ingestion/source/database/redshift/utils.py.
Observed behavior:
| external_type | Stored dataType | Stored dataTypeDisplay | Expected dataType |
|---|---|---|---|
| string | UNKNOWN | string | VARCHAR or STRING |
| double | UNKNOWN | double | DOUBLE |
| boolean | BOOLEAN | boolean | BOOLEAN (works) |
| int | INT | int | INT (works — normalized to integer) |
A secondary issue compounds the problem: the frontend (TestCaseFormV1.tsx) passes supportedDataType: column.dataType to the test definitions API. When the value is UNKNOWN, zero test definitions match and the dropdown is empty with no user-facing explanation.
To Reproduce
- Set up a Redshift ingestion pipeline for a service that contains external (Spectrum) tables with Hive-style column types (
string,double, etc.) - Run the ingestion
- Navigate to an ingested external table → Schema tab → observe columns show types like "string", "double" in the UI
- Go to Data Quality → Add Test Case → select "Column" level → select any column
- "Select test type" dropdown shows "No data"
Expected behavior
- Column types from Redshift external tables should be mapped to proper
ColumnDataTypeenum values (e.g.,string→VARCHAR/STRING,double→DOUBLE) - Column-level test type options should be available for all columns regardless of source table type
- If
dataTypeisUNKNOWN, the UI should either skip thesupportedDataTypefilter or fall back todataTypeDisplayfor matching
Connection / ingestion config
source:
type: Redshift
serviceName: <redacted>
serviceConnection:
config:
type: Redshift
hostPort: <redacted>
database: dev
# External tables are in schemas backed by Glue Data Catalog
Logs
OS
No response
Python version
No response
OpenMetadata version
1.12.6 and 1.12.12 (confirmed on both)
OpenMetadata Ingestion package version
No response
Additional context
- This is distinct from #29542 (which reports a case-sensitivity bug in
entityTypequery param affecting non-admin users). This issue affects all users including admins. - The
booleantype works correctly because "boolean" exists in PostgreSQL'sischema_names. Types likestringanddoubleare Hive/Glue Catalog types that don't have PostgreSQL equivalents registered. - Suggested fix locations:
- Primary (ingestion): ingestion/src/metadata/ingestion/source/database/redshift/queries.py — extend the CASE statement to normalize Spectrum-specific types (
string→character varying,double→double precision). Alternatively, add these toischema_namesin redshift/utils.py. - Secondary (UI resilience): openmetadata-ui/.../components/DataQuality/AddDataQualityTest/components/TestCaseFormV1.tsx — when
dataType === "UNKNOWN", skip thesupportedDataTypefilter or fall back todataTypeDisplay.
- Primary (ingestion): ingestion/src/metadata/ingestion/source/database/redshift/queries.py — extend the CASE statement to normalize Spectrum-specific types (
Pre-submission checklist
- [x] I searched for duplicate issues.
- [x] I removed credentials, hostnames, emails, and other sensitive data from logs and config.
Would it also be possible to get some help with tagging this previously created issue as another Redshift connector bug? https://github.com/open-metadata/OpenMetadata/issues/28127 I had missed selecting the issue type during creation and now cannot add the tags but wondering if they'd be helpful to get the issue prioritized