데이터 엔지니어 이것저것

dbt elementary 본문

오픈소스/dbt

dbt elementary

pastime 2023. 12. 14. 12:01
728x90

기존 dbt docs를 실패와 관련한 것들을 보고싶었는데, 구글링 도중 괜찮은것을 찾았다.

 

git : https://github.com/elementary-data/elementary

설치법 : https://docs.elementary-data.com/oss/quickstart/quickstart-cli-package

packages:
  - package: elementary-data/elementary
    version: 0.13.0
    ## Docs: https://docs.elementary-data.com

 

models:
  dbt_utils: # Hide "dbt_utils" package
    +docs:
      show: false

  codegen:
    +docs:
      show: false

  sakila:
    # Config indicated by + and applies to all files under models/example/
    staging:
      +materialized: view
      +schema: sakila
    marts:
      +materialized: table
      +schema: sakila
    elementary:
      ## elementary models will be created in the schema '<your_schema>_elementary'
      +schema: "elementary"
      
# refresh
vars:
  elementary_full_refresh: true
elementary:
  outputs:
    default:
      type: postgres
      host: localhost
      user: airflow
      password: airflow
      port: 5432
      dbname: dbt_table
      schema: public
      threads: 1
      keepalives_idle: 0 # default 0 seconds
      connect_timeout: 10 # default 10 seconds

 

pip install elementary-data

 

실행하기전 테스트 진행

dbt test  --profiles-dir ..\env_dir\

 

실행 명령어

edr report  --profiles-dir ..\env_dir\

 

 

결과물

 

 

slack 연동하기

 

https://docs.elementary-data.com/oss/guides/send-slack-alerts

 

Slack 앱을 추가하고 실행하면 아래와 같은 실패 알림을 받을 수 있다.

 

 

상세 정보

 

결과물을 전달할수도있다.

 

 

 

TODO
- timezone 변경

728x90

'오픈소스 > dbt' 카테고리의 다른 글

ref () vs source()  (1) 2024.01.07
dbt codegen  (0) 2023.11.20
dbt docs  (0) 2023.11.19
dbt packages  (0) 2023.11.19
dbt Materializations  (0) 2023.11.17