mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-05 23:23:42 +00:00
fix(ingest): include database info for snowflake (#2426)
This commit is contained in:
parent
2fee45d127
commit
7d1ec520e5
@ -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
|
||||
```
|
||||
|
||||
@ -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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user