Redshift

Web App

Redshift Integration

Fields

FieldValueExample
sourceThe name of the source, see sourcesmy-source
NameName for connectionPostgres
NamespaceNamespace for the connection, see namespacesdefault
hostDatabase hostsample-database.cudyk77thtpt.us-west-2.rds.amazonaws.com
portDatabase port5432
Database NameDatabase Namejaffle_shop
userDatabase user
passwordDatabase password
ℹ️

Your database will need to be accessible from wherever you are running the Grai server. If you are using Grai Cloud your database will need to be accessible from the internet.

Python Library

The Redshift integration can be run as a standalone python library to extract data lineage from your instance of Redshift.

The library is available via pip

pip install grai_source_redshift

More information about the API is available here.

Example

The library is split into a few distinct functions but if you only wish to extract nodes/edges you can do so as follows:

  from grai_source_postgres import RedshiftIntegration
  from grai_schemas.v1.source import SourceV1
 
  source = SourceV1(name="my-source", type="my-type")
  redshift_params = {
    "username": "my-username",
    "password": "my-password",
    "host": "https://prod.yourdomain.com",
    "port": 5432
  }
 
  integration = RedshiftIntegration(source=source, namespace="metabase", **redshift_params)
 
  nodes, edges = integration.get_nodes_and_edges()