◾️はじめに
https://dk521123.hatenablog.com/entry/2024/07/21/234811
の続き。 今回は、dbt CLI「dbt show」コマンドをメモる。
目次
【1】dbt show 【2】オプション 1)--inline 2)--limit n
【1】dbt show
* 指定したModelや任意のSELECT文の出力結果を表示
https://docs.getdbt.com/reference/commands/show
【2】オプション
1)--inline
* SQL文を直接指定
例
dbt show ¥ --inline "select * from {{ ref('user') }} where user_id ='X001'"
2)--limit n
https://docs.getdbt.com/sql-reference/limit#how-to-use-the-limit-clause-in-a-query
* n : 表示数(デフォルト値:5)
例
dbt show ¥ --inline "select * from {{ ref('user') }}" --limit 10
参考文献
https://dev.classmethod.jp/articles/dbt-try-show-command/
関連記事
dbt ~ 基礎知識編 ~
https://dk521123.hatenablog.com/entry/2023/06/30/000000
dbt ~ 環境設定編 ~
https://dk521123.hatenablog.com/entry/2023/12/16/152147
dbt ~ 入門編 ~
https://dk521123.hatenablog.com/entry/2023/05/30/151003
dbt CLI ~ 入門編 ~
https://dk521123.hatenablog.com/entry/2024/07/21/234811
Python with dbt ~ 入門編 ~
https://dk521123.hatenablog.com/entry/2024/07/20/034930
Python with dbt ~基本編 ~
https://dk521123.hatenablog.com/entry/2025/04/26/234102