Configuración del archivo docker-compose con seguridad
...
dbt_bi_material:
build:
context: .
dockerfile: Dockerfile
container_name: dbt_bi_material
volumes:
- .:/dbt
environment:
#service config
#Time window to group messages in a single dbt execution. Time in seconds
- MESSAGE_TIME_WINDOW_SECONDS=3
#Waiting time after the last dbt execution. Time in seconds
- REFRESH_TIME_THRESHOLD=15
#Auto refresh time after last dbt execution, set -1 to disable. Time in seconds
- AUTO_REFRESH_TIME=600
#DBT config
# The container will try get ./profiles, otherwise will use default /dbt/profiles
- DBT_PROFILES_RELATIVE_DIR=./profiles
- DBT_PROJECT_NAME=dbt_oneconnect_ecc
- DBT_PROFILE=dbt_oneconnect_ecc
- DBT_TARGET=dev
- DBT_MODELS=BI_SILVER_MM_MATERIAL_ECC
- DBT_FULL_REFRESH=
#Kafka Config
- KAFKAPROPERTIES_DEPLOYMENTTYPE=cloud
- KAFKAPROPERTIES_BOOTSTRAPADDRESS=<ip1:port1>,<ip2:port2>,<ip3:port3>
- KAFKAPROPERTIES_SECURITYPROTOCOL=SASL_PLAINTEXT
- KAFKAPROPERTIES_SASLMECHANISM=PLAIN
- KAFKAPROPERTIES_SASLUSER=<user>
- KAFKAPROPERTIES_SASLPASSWORD=<password>
- KAFKAPROPERTIES_TOPICS=<kafka_topic>
...
Configuración del archivo docker-compose sin seguridad
...
dbt_bi_material:
build:
context: .
dockerfile: Dockerfile
container_name: dbt_bi_material
volumes:
- .:/dbt
environment:
#service config
#Time window to group messages in a single dbt execution. Time in seconds
- MESSAGE_TIME_WINDOW_SECONDS=3
#Waiting time after the last dbt execution. Time in seconds
- REFRESH_TIME_THRESHOLD=15
#Auto refresh time after last dbt execution, set -1 to disable. Time in seconds
- AUTO_REFRESH_TIME=600
#DBT config
# The container will try get ./profiles, otherwise will use default /dbt/profiles
- DBT_PROFILES_RELATIVE_DIR=./profiles
- DBT_PROJECT_NAME=dbt_oneconnect_ecc
- DBT_PROFILE=dbt_oneconnect_ecc
- DBT_TARGET=dev
- DBT_MODELS=BI_SILVER_MM_MATERIAL_ECC
- DBT_FULL_REFRESH=
#Kafka Config
- KAFKAPROPERTIES_DEPLOYMENTTYPE=onpremise
- KAFKAPROPERTIES_BOOTSTRAPADDRESS=<ip1:port1>,<ip2:port2>,<ip3:port3>
#- KAFKAPROPERTIES_SECURITYPROTOCOL=SASL_PLAINTEXT
#- KAFKAPROPERTIES_SASLMECHANISM=PLAIN
#- KAFKAPROPERTIES_SASLUSER=DAUHNRRCSF5ELA4W
#- KAFKAPROPERTIES_SASLPASSWORD=YVV/7T7fVt9v2XJ9yTWkLTf04U6n0fux1mpsmnm9IgHo/bkd7cvQVGQyqasUc+ZQ
- KAFKAPROPERTIES_TOPICS=<kafka_topic>
...
Configuración de DBT
Configuración de Kafka
La ruta al archivo es la siguiente:
\<raíz del proyecto>\profiles\profiles.yml
dbt_oneconnect_ecc:
#default target
target: oneconnect_oi
outputs:
oneconnect_bi:
type: clickhouse
schema: <database_schema>
host: <ip_host>
port: <port>
user: user
password: 'password'
oneconnect_oi:
type: clickhouse
schema: <database_schema>
host: <ip_host>
port: <port>
user: user
password: 'password'