Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing example for dbt compile --inline #4825

Merged
merged 3 commits into from
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 24 additions & 10 deletions website/docs/reference/commands/compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@ dbt compile --inline "select * from {{ ref('raw_orders') }}"

returns the following:


```bash
dbt compile --select "stg_orders"
21:17:09 Running with dbt=1.5.0-b5
21:17:09 Found 5 models, 20 tests, 0 snapshots, 0 analyses, 425 macros, 0 operations, 3 seed files, 0 sources, 0 exposures, 0 metrics, 0 groups
21:17:09
dbt compile --select "stg_orders"

21:17:09 Running with dbt=1.7.5
21:17:09 Registered adapter: postgres=1.7.5
21:17:09 Found 5 models, 3 seeds, 20 tests, 0 sources, 0 exposures, 0 metrics, 401 macros, 0 groups, 0 semantic models
21:17:09
21:17:09 Concurrency: 24 threads (target='dev')
21:17:09
21:17:09 Compiled node 'stg_orders' is:
21:17:09
21:17:09 Compiled node 'stg_orders' is:
with source as (
select * from "jaffle_shop"."main"."raw_orders"

Expand All @@ -52,9 +53,9 @@ with source as (
renamed as (

select
id as order_id
user_id as customer_id
order_date
id as order_id,
user_id as customer_id,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch!

order_date,
status

from source
Expand All @@ -64,6 +65,19 @@ renamed as (
select * from renamed
```

```bash
dbt compile --inline "select * from {{ ref('raw_orders') }}"

18:15:49 Running with dbt=1.7.5
18:15:50 Registered adapter: postgres=1.7.5
18:15:50 Found 5 models, 3 seeds, 20 tests, 0 sources, 0 exposures, 0 metrics, 401 macros, 0 groups, 0 semantic models
18:15:50
18:15:50 Concurrency: 5 threads (target='postgres')
18:15:50
18:15:50 Compiled inline node is:
select * from "jaffle_shop"."main"."raw_orders"
```

</VersionBlock>

The command accesses the data platform to cache-related metadata, and to run introspective queries. Use the flags:
Expand Down
Loading