Redshift
Web App
Fields
Field | Value | Example |
---|---|---|
source | The name of the source, see sources | my-source |
Name | Name for connection | Postgres |
Namespace | Namespace for the connection, see namespaces | default |
host | Database host | sample-database.cudyk77thtpt.us-west-2.rds.amazonaws.com |
port | Database port | 5432 |
Database Name | Database Name | jaffle_shop |
user | Database user | |
password | Database 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()