출력
출력 (Print output)
dbt가 stdout에 출력하는 print() 메시지의 억제 방법과 출력 너비, 색상 설정을 다뤄요. 로그 출력을 깔끔하게 관리하고 싶을 때 유용해요.
출처: 문서
본문
stdout에서 print() 메시지 억제
기본적으로 dbt는 표준 출력(stdout)에 print() 메시지를 포함해요. (dbt v1.11 이상) DBT_ENGINE_PRINT 환경 변수를 사용하면 이 메시지들이 stdout에 표시되지 않게 할 수 있어요.
Syntax deprecation — 원래 DBT_NO_PRINT 환경 변수는 dbt v1.5부터 deprecated 되었어요. 하위 호환성은 지원되지만, 아직 정해지지 않은 향후 릴리스에서 제거될 거예요.
dbt run에 --no-print 플래그를 주면 print() 메시지가 stdout에 표시되지 않게 해요.
dbt run --no-print
프린터 너비 (Printer width)
기본적으로 dbt는 80자 너비로 패딩된 줄을 출력해요. profiles.yml 파일에 다음을 추가해 이 설정을 바꿀 수 있어요:
profiles.yml
config:
printer_width: 120
출력 색상 (Print color)
기본적으로 dbt는 터미널에서 출력하는 내용을 색상화해요. profiles.yml 파일에 다음을 추가하면 끌 수 있어요:
profiles.yml
config:
use_colors: False
dbt run --use-colors
dbt run --no-use-colors
파일 로그의 색상 기본 설정은 profiles.yml에서만 설정하거나 --use-colors-file / --no-use-colors-file 플래그를 사용해 설정할 수 있어요.
profiles.yml
config:
use_colors_file: False
dbt run --use-colors-file
dbt run --no-use-colors-file
더 알아보기 (Learn more)
- About global configs — 전역 구성