Skip to content

Commit 77d6c17

Browse files
committed
add section in readme
1 parent 4ac7f7e commit 77d6c17

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

samples/dbt/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,40 @@ Before using this project, ensure you have:
2323
For more, see:
2424
- https://docs.getdbt.com/guides/dbt-python-bigframes
2525
- https://cloud.google.com/bigquery/docs/dataframes-dbt
26+
27+
## Run Locally
28+
29+
Follow these steps to run the Python models using dbt Core.
30+
31+
1. **Install the dbt BigQuery adapter:**
32+
33+
```bash
34+
pip install dbt-bigquery
35+
```
36+
37+
2. **Initialize a dbt project (if not already done):**
38+
39+
```bash
40+
dbt init
41+
```
42+
43+
Follow the prompts to complete setup
44+
45+
3. **Finish the configuration and add sample code:**
46+
47+
- Edit `~/.dbt/profiles.yml` to finish the configuration.
48+
- Replace or add code samples in `.../models/example`.
49+
50+
4. **Run your dbt models:**
51+
52+
To run all models:
53+
54+
```bash
55+
dbt run
56+
```
57+
58+
Or run a specific model:
59+
60+
```bash
61+
dbt run --select your_model_name
62+
```

0 commit comments

Comments
 (0)