Files
ISSSTELEON/Transformation/profiles.yml
T

88 lines
3.1 KiB
YAML

# One profile per domain (`--profile cacu|cama|tea`; `cacu` by default) and one target per engine
# (`--target sqlite|sqlserver|postgres|mysql`; `sqlite` by default). Every value comes from the environment;
# nothing secret is written here.
#
# sqlite <DOMAIN>_DB_PATH: the domain's .db file. DBT_SCHEMA_DIR: where dbt-sqlite keeps any other
# schema as its own .db file. dbt-sqlite attaches every .db it finds there, so it must never be
# the folder of the domains' databases (a domain's views would then be opened under another
# name and break).
# others DBT_HOST, DBT_PORT, DBT_USER, DBT_PASSWORD, and <DOMAIN>_DBT_DATABASE (the domain's
# database; by default, the domain's name).
#
# `mysql` runs with the `mysql` dependency group (dbt-core 1.7): `uv run --only-group mysql dbt ...`.
cacu:
target: sqlite
outputs:
sqlite: &sqlite
type: sqlite
threads: 1
database: main
schema: main
schemas_and_paths:
main: "{{ env_var('CACU_DB_PATH', 'cacu.db') }}"
schema_directory: "{{ env_var('DBT_SCHEMA_DIR', 'target/schemas') }}"
sqlserver: &sqlserver
type: sqlserver
backend: mssql-python # Microsoft's driver: no system ODBC libraries needed
server: "{{ env_var('DBT_HOST', 'localhost') }}"
port: "{{ env_var('DBT_PORT', '1433') | as_number }}"
database: "{{ env_var('CACU_DBT_DATABASE', 'cacu') }}"
schema: dbo
user: "{{ env_var('DBT_USER', '') }}"
password: "{{ env_var('DBT_PASSWORD', '') }}"
encrypt: true
trust_cert: true
threads: 4
postgres: &postgres
type: postgres
host: "{{ env_var('DBT_HOST', 'localhost') }}"
port: "{{ env_var('DBT_PORT', '5432') | as_number }}"
dbname: "{{ env_var('CACU_DBT_DATABASE', 'cacu') }}"
schema: public
user: "{{ env_var('DBT_USER', '') }}"
password: "{{ env_var('DBT_PASSWORD', '') }}"
threads: 4
mysql: &mysql
type: mysql
server: "{{ env_var('DBT_HOST', 'localhost') }}"
port: "{{ env_var('DBT_PORT', '3306') | as_number }}"
schema: "{{ env_var('CACU_DBT_DATABASE', 'cacu') }}"
username: "{{ env_var('DBT_USER', '') }}"
password: "{{ env_var('DBT_PASSWORD', '') }}"
threads: 4
cama:
target: sqlite
outputs:
sqlite:
<<: *sqlite
schemas_and_paths:
main: "{{ env_var('CAMA_DB_PATH', 'cama.db') }}"
sqlserver:
<<: *sqlserver
database: "{{ env_var('CAMA_DBT_DATABASE', 'cama') }}"
postgres:
<<: *postgres
dbname: "{{ env_var('CAMA_DBT_DATABASE', 'cama') }}"
mysql:
<<: *mysql
schema: "{{ env_var('CAMA_DBT_DATABASE', 'cama') }}"
tea:
target: sqlite
outputs:
sqlite:
<<: *sqlite
schemas_and_paths:
main: "{{ env_var('TEA_DB_PATH', 'tea.db') }}"
sqlserver:
<<: *sqlserver
database: "{{ env_var('TEA_DBT_DATABASE', 'tea') }}"
postgres:
<<: *postgres
dbname: "{{ env_var('TEA_DBT_DATABASE', 'tea') }}"
mysql:
<<: *mysql
schema: "{{ env_var('TEA_DBT_DATABASE', 'tea') }}"