Skip to content

Commit

Permalink
mend
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyyeo committed Aug 7, 2024
1 parent 4b944d4 commit fb5c152
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
7 changes: 1 addition & 6 deletions dbt-variables-environment-variables/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ $ dbt compile -s foo --vars 'my_var: from_var_instead'
select 'from_var_instead' as c
```
### Setting configs using env vars
### Setting configs with vars and env vars
Here we want to set the `full_refresh` config to be `false` by default using a combination of env var and var.
Expand Down Expand Up @@ -369,16 +369,12 @@ Here, I ran it twice and we can see that the subsequent (incremental) run did an
```sh
$ dbt --debug run --full-refresh
04:08:02 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.8.4", "profile_name": "all", "target_name": "pg", "node_id": "model.my_dbt_project.foo"} */
insert into "postgres"."public"."foo" ("id")
(
select "id"
from "foo__dbt_tmp160802365778"
)
04:08:02 SQL status: INSERT 0 1 in 0.0 seconds
04:08:02 On model.my_dbt_project.foo: COMMIT
04:08:02 Using postgres connection "model.my_dbt_project.foo"
Expand Down Expand Up @@ -415,7 +411,6 @@ $ dbt --debug run --full-refresh --vars 'var_full_refresh_allowed: allowed'
-- models/foo.sql
select 1 id
);
04:14:29 SQL status: SELECT 1 in 0.0 seconds
04:14:29 Using postgres connection "model.my_dbt_project.foo"
04:14:29 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.8.4", "profile_name": "all", "target_name": "pg", "node_id": "model.my_dbt_project.foo"} */
Expand Down
17 changes: 17 additions & 0 deletions dbt-warnings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,20 @@ $ dbt run
```
We told dbt that there exist a model `bar` in the `schema.yml` file but in reality - it does not exist. Note it can also not exist due to a mismatched case - i.e. in the `schema.yml` file we did `name: Bar` (uppercase "B") but the model is actually `bar.sql` (lowercase "b").
### Explicit transactional logic should be used only to wrap DML logic (MERGE, DELETE, UPDATE, etc)
The full warning:
```
Snowflake adapter: [WARNING]: Explicit transactional logic should be used only to wrap DML
logic (MERGE, DELETE, UPDATE, etc). The keywords BEGIN; and COMMIT; should be
placed directly before and after your DML statement, rather than in separate
statement calls or run_query() macros.
```
Which is usually accompanied by an error:
```
cannot access local variable 'connection' where it is not associated with a value
```

0 comments on commit fb5c152

Please sign in to comment.