fix(ingest): include database info for snowflake (#2426)

This commit is contained in:
Harshal Sheth 2021-04-20 20:40:30 -07:00 committed by GitHub
parent 2fee45d127
commit 7d1ec520e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -261,6 +261,7 @@ source:
username: user
password: pass
host_port: account_name
database: db_name
# table_pattern/schema_pattern is same as above
# options is same as above
```

View File

@ -5,9 +5,14 @@ from .sql_common import BasicSQLAlchemyConfig, SQLAlchemySource
class SnowflakeConfig(BasicSQLAlchemyConfig):
# defaults
scheme = "snowflake"
database: str # database is required
def get_identifier(self, schema: str, table: str) -> str:
regular = super().get_identifier(schema, table)
return f"{self.database}.{regular}"
class SnowflakeSource(SQLAlchemySource):
def __init__(self, config, ctx):