Skip to main content

Metadata Ingestion - Incremental Extraction - Redshift

Approach

In order to implement the Incremental Extraction for Redshift we rely on the SYS_QUERY_HISTORY to get the latest DDL changes. We then match the query_text with different regex to get the Schema and Table name and understand if it was a deletion. If no schema is present in the query we infer that it is the default for the database.

Requisites

The user should be a Superuser to be able to see all the records.

Used Regex

Table Name

Create Table

Alter Table

Drop Table

Create View

Alter View

Drop View

Comment

Used Query