DBT ENTITIES DOCUMENTATION
Prerequisites
-
Docker and docker-compose with support for 3.8
-
ClickHouse database.
-
Download the dbt project, the repository will be provided by Onibex
Configuration of docker-compose services
Each service in the docker-compose file has the following configurations as shown in the following example:
Configuration of the docker-compose file with security
- ...
- 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>
- ...
Configuration of the archive docker-compose without security
- ...
- 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>
- ...
Details of Environment Variables
Service Configuration
-
MESSAGE_TIME_WINDOW_SECONDS: Defines the time window to group messages in a single dbt execution. Value in seconds.
-
REFRESH_TIME_THRESHOLD: Specifies the waiting time after the last dbt execution before processing again. Value in seconds.
-
AUTO_REFRESH_TIME: Sets an automatic refresh time. Use -1 to disable this functionality. Value in seconds.
DBT Configuration
-
DBT_PROFILES_RELATIVE_DIR: Relative path to search for the profiles configuration file. If not found, the default directory
/dbt/profiles
will be used.
-
DBT_PROJECT_NAME: Name of the dbt project.
-
DBT_PROFILE: dbt profile to use.
-
DBT_TARGET: Target environment for dbt (e.g., dev, prod), where you can also configure these variables in
Database Configuration.
-
DBT_MODELS: Specific dbt models to execute.
-
DBT_FULL_REFRESH: Configuration to force a full refresh of the models.
Kafka Configuration
-
KAFKAPROPERTIES_DEPLOYMENTTYPE: Defines the type of Kafka deployment (e.g., cloud).
-
KAFKAPROPERTIES_BOOTSTRAPADDRESS: List of Kafka broker addresses, in the format
<ip:port>
, separated by commas.
-
KAFKAPROPERTIES_SECURITYPROTOCOL: Security protocol for Kafka (e.g., SASL_PLAINTEXT).
-
KAFKAPROPERTIES_SASLMECHANISM: SASL authentication mechanism (e.g., PLAIN).
-
KAFKAPROPERTIES_SASLUSER: User for SASL authentication.
-
KAFKAPROPERTIES_SASLPASSWORD: Password for SASL authentication.
Database Configuration
To configure the database, follow these steps:
Go to the project root.
Navigate to the profiles
folder, which is inside the project directory.
Locate and edit the profiles.yml
file, where the database credentials are stored.
The file path is as follows:
<project root>\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'
Index
INVENTORY_MANAGEMENT
ORDER_TO_CASH
PLAN_TO_PRODUCE
PROCURE_TO_PAY
DASHBOARD
Related Articles
08. SILVER SD SHIPPING DOCUMENT ECC
ENTIDAD SILVER DE TRANSPORTES Este modelo de datos pertenece a la capa Silver de la arquitectura de medallón, donde los datos han sido limpiados, integrados y estructurados para su uso analítico. Se centra en la gestión del transporte y logística ...
03. SILVER INVOICE ENTITY (DRAFT EN INGLES)
This data model belongs to the Silver layer of the medallion architecture, where data has been cleaned, integrated, and structured for analytical use. It focuses on key tables related to the Sales and Distribution (SD) module and the Invoice ...
OneConnect V2 SAP Manual
OneConnect V2 SAP Integration The following manual configuration considers the fact that you have installed the version 2 of OneConnect in SAP, please make sure that you are using this version Install the Transport Install the transport request sent ...
11 INVOICE DASHBOARD
ENTIDAD GOLD DE TABLERO DE FACTURAS También conocido como Tablero de Ventas, este modelo pertenece a la capa Gold de la arquitectura de medallón y está compuesto por la entidad BI_SILVER_SD_INVOICE_ECC. Su objetivo principal es proporcionar una ...
03 SILVER SD INVOICE ECC
ENTIDAD SILVER DE FACTURAS Este modelo de datos pertenece a la capa Silver de la arquitectura de medallón, donde los datos han sido limpiados, integrados y estructurados para su uso analítico. Se enfoca en las tablas clave relacionadas con el módulo ...