Area: Ingestion
Sub-Area: Redshift
Applies to: OSS + Cloud
Issue
After you upgrade DataHub, Redshift ingestion no longer picks up some schemas that it ingested before. Other schemas still appear.
You Might Be Asking
- Why are some Redshift schemas missing after an upgrade?
- Which grants does the DataHub user need?
- Do the quick setup guide grants fix missing schemas?
Cause
Two things are worth checking.
-
schema_pattern. The connector drops any schema that yourschema_patterndoes not allow. It reports the dropped schema as<database>.<schema>and does not read its tables. -
Grants. The connector prerequisites list
GRANT USAGE ON SCHEMA <schema_to_ingest>as required to read tables in each schema.
The quick setup guide lists GRANT USAGE ON SCHEMA under "Data Access Permissions (Required for Profiling/Classification)". If you applied only the quick guide's recommended block, you may not have this grant. The connector prerequisites page has the full set.
Solution
-
Open the full grant set in the recommended permission set and the prerequisites. Apply every grant to the DataHub user. The set includes:
-
ALTER USER datahub WITH SYSLOG ACCESS UNRESTRICTED, which is required for lineage and usage statistics. -
SELECTon thesepg_catalogobjects:svv_redshift_databases,svv_redshift_schemas,svv_external_schemas,svv_table_info,svv_external_tables,svv_external_columns,pg_class_info,pg_class,pg_namespace,pg_description,pg_database,pg_attribute,pg_attrdef,svl_user_infoandsvv_datashares. -
SELECTonstv_mv_infofor a provisioned cluster. -
GRANT USAGE ON SCHEMA <schema_to_ingest>for each schema you want to ingest.
-
-
If you use Redshift Serverless, use
svv_user_infoandsvv_mv_infoinstead ofsvl_user_infoandstv_mv_info. See Redshift Serverless workgroups. -
If you ingest a shared (datashare consumer) database, also grant
SELECTonsvv_redshift_tablesandsvv_redshift_columns. -
Check your
schema_pattern. The connector skips any schema the pattern does not allow, and it does not cache tables or views in those schemas. An allow list that names only some schemas drops all the others. -
Check which schemas Redshift shows for your database. Run these queries as the DataHub user:
SELECT schema_name, schema_type FROM svv_redshift_schemas WHERE database_name = 'your_database'; SELECT schemaname, eskind, databasename FROM SVV_EXTERNAL_SCHEMAS;See Missing schemas.
-
Run ingestion again.