pipeline.src.db_config
Attributes
Functions
|
Returns the connection string for the designated database. |
|
Returns sqlalchemy engine for designated database. |
Returns clickhouse client for data_warehouse database. |
Module Contents
- pipeline.src.db_config.make_connection_string(db: str) str[source]
Returns the connection string for the designated database.
- Parameters:
db (str) – Database name. Possible values : ‘ocan’, ‘fmc’, ‘monitorfish_remote’, ‘monistorfish_local’, ‘monitorenv_remote’, ‘cacem_local’
- Returns:
connection string for selected database.
- Return type:
str
- Raises:
ValueError – with credentials for the selected database are not found in
environment variables. –
- pipeline.src.db_config.create_engine(db: str, **kwargs) sqlalchemy.engine.Engine[source]
Returns sqlalchemy engine for designated database.
- Parameters:
db (str) – Database name. Possible values : ‘ocan’, ‘fmc’, ‘monitorfish_remote’, ‘monistorfish_local’, ‘monitorenv_remote’, ‘cacem_local’
- Returns:
sqlalchemy engine for selected database.
- Return type:
sa.engine.Engine