diff --git a/metadata-ingestion/README.md b/metadata-ingestion/README.md index b618d75810..3e5717d6c4 100644 --- a/metadata-ingestion/README.md +++ b/metadata-ingestion/README.md @@ -43,6 +43,7 @@ We use a plugin architecture so that you can install only the dependencies you a | mysql | `pip install 'acryl-datahub[mysql]'` | MySQL source | | oracle | `pip install 'acryl-datahub[oracle]'` | Oracle source | | postgres | `pip install 'acryl-datahub[postgres]'` | Postgres source | +| redshift | `pip install 'acryl-datahub[redshift]'` | Redshift source | | sqlalchemy | `pip install 'acryl-datahub[sqlalchemy]'` | Generic SQLAlchemy source | | snowflake | `pip install 'acryl-datahub[snowflake]'` | Snowflake source | | superset | `pip install 'acryl-datahub[superset]'` | Supserset source | @@ -279,6 +280,26 @@ source: # options is same as above ``` +### Redshift `redshift` + +Extracts: + +- List of databases, schema, and tables +- Column types associated with each table +- Also supports PostGIS extensions + +```yml +source: + type: redshift + config: + username: user + password: pass + host_port: localhost:5432 + database: DemoDatabase + # table_pattern/schema_pattern is same as above + # options is same as above +``` + ### Snowflake `snowflake` Extracts: diff --git a/metadata-ingestion/setup.py b/metadata-ingestion/setup.py index 791cedf48e..b210d8c4b6 100644 --- a/metadata-ingestion/setup.py +++ b/metadata-ingestion/setup.py @@ -74,6 +74,7 @@ plugins: Dict[str, Set[str]] = { "mssql": sql_common | {"sqlalchemy-pytds>=0.3"}, "mysql": sql_common | {"pymysql>=1.0.2"}, "postgres": sql_common | {"psycopg2-binary", "GeoAlchemy2"}, + "redshift": sql_common | {"psycopg2-binary", "GeoAlchemy2"}, "snowflake": sql_common | {"snowflake-sqlalchemy"}, "oracle": sql_common | {"cx_Oracle"}, "ldap": {"python-ldap>=2.4"}, @@ -192,6 +193,7 @@ setuptools.setup( "mysql = datahub.ingestion.source.mysql:MySQLSource", "oracle = datahub.ingestion.source.oracle:OracleSource", "postgres = datahub.ingestion.source.postgres:PostgresSource", + "redshift = datahub.ingestion.source.redshift:RedshiftSource", "snowflake = datahub.ingestion.source.snowflake:SnowflakeSource", "superset = datahub.ingestion.source.superset:SupersetSource", ], diff --git a/metadata-ingestion/src/datahub/ingestion/source/redshift.py b/metadata-ingestion/src/datahub/ingestion/source/redshift.py new file mode 100644 index 0000000000..3d3c867282 --- /dev/null +++ b/metadata-ingestion/src/datahub/ingestion/source/redshift.py @@ -0,0 +1,7 @@ +from datahub.ingestion.source.postgres import PostgresSource +from datahub.ingestion.source.sql_common import SQLAlchemySource + + +class RedshiftSource(PostgresSource): + def __init__(self, config, ctx): + SQLAlchemySource.__init__(self, config, ctx, "redshift")