-
Notifications
You must be signed in to change notification settings - Fork 59
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
[ADAP-739] [Bug] Query was empty error in dbt-redshift==1.5.8 with dbt-core==1.5.4 #561
Comments
@lsabreu96 thanks for reporting this! I just tried but failed to reproduce. Can you think of anything else you might have configured? My brain jumps to things like Also, does this happen on initial model creation? or only when the model is updated? |
Hi @dataders , we have some pre-post hooks as well as on-run-start configured, but the error seems to be returned from the model itself. For the sake of reference: pre-hook: post-hook: I noticed that the logging package is outdated, but even when bumping it to the latest version, the error persists. We also have some custom macros, but all they do is run some inserts/deletes in the database
I was running a small model for the sake of testing and the error raised. I hadn't altered it in anyway |
Just removed all on-run-start/end as well as any pre/post-hooks and it fails with the same error. The compiled query shows me the delete+insert step (not sure if that's relevant) |
The problem seems to be a macro we have as a post-hook for models. I got the project from the prior team and is implemented as such
It's meant to fine grain control over incremental execution accross the database. It's regular transaction management, but something seems to be slipping off whenever this query get submmited to the database. What I find it odd is that all operations return ok. I'll attach the logs below
|
Reading this part
DBT seems to be indeed issuing an empty query |
@lsabreu96 I still wasn't able to reproduce the bug that you reported. See below for a full project setup and a list of commands that worked for me in both dbt-redshift 1.5.x and 1.6.x. Could you try to tweak the setup below to generate the error you are seeing?
|
@dbeatty10 , thanks for the help. The ; seems that was parsed as a query such ash Changing it to ["{{ macro1() }}", "{{ macro2() }}"] seems to have worked for this example. I'll run a couple more tests and will let you know |
Sorry for the really delayed answer. |
Adding an example. # dbt_project.yml
name: my_dbt_project
profile: all
config-version: 2
version: "1.0.0"
models:
my_dbt_project:
+materialized: table -- macros/do_thing.sql
{% macro do_thing() %}
{% if execute %}
begin;
select 1 id;
commit;
begin;
select 2 id;
commit;
{% endif %}
{% endmacro %}
-- macros/do_another_thing.sql
{% macro do_another_thing() %}
{% if execute %}
begin;
select 1 id;
commit;
begin;
select 2 id;
commit;
{% endif %}
{% endmacro %} -- models/foo.sql
{{ config(pre_hook="{{ do_thing() }}; {{ do_another_thing() }}") }}
select 1 id On a now deprecated version of dbt (i.e. $ dbt --debug run
...
22:17:59.604512 [debug] [Thread-1 ]: Began running node model.my_dbt_project.foo
22:17:59.605488 [info ] [Thread-1 ]: 1 of 1 START table model public.foo............................................. [RUN]
22:17:59.606566 [debug] [Thread-1 ]: Acquiring new redshift connection "model.my_dbt_project.foo"
22:17:59.607473 [debug] [Thread-1 ]: Began compiling node model.my_dbt_project.foo
22:17:59.608192 [debug] [Thread-1 ]: Compiling model.my_dbt_project.foo
22:17:59.612817 [debug] [Thread-1 ]: Writing injected SQL for node "model.my_dbt_project.foo"
22:17:59.614078 [debug] [Thread-1 ]: finished collecting timing info
22:17:59.614536 [debug] [Thread-1 ]: Began executing node model.my_dbt_project.foo
22:17:59.644589 [debug] [Thread-1 ]: Using redshift connection "model.my_dbt_project.foo"
22:17:59.645235 [debug] [Thread-1 ]: On model.my_dbt_project.foo: BEGIN
22:17:59.645612 [debug] [Thread-1 ]: Opening a new connection, currently in state closed
22:17:59.646093 [debug] [Thread-1 ]: Redshift adapter: Connecting to Redshift using 'database' credentials
22:18:01.502412 [debug] [Thread-1 ]: SQL status: BEGIN in 1.86 seconds
22:18:01.503887 [debug] [Thread-1 ]: Using redshift connection "model.my_dbt_project.foo"
22:18:01.504424 [debug] [Thread-1 ]: On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.0.9", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
begin;
select 1 id;
commit;
begin;
select 2 id;
commit;
;
begin;
select 1 id;
commit;
begin;
select 2 id;
commit;
22:18:01.713792 [debug] [Thread-1 ]: SQL status: COMMIT in 0.21 seconds
22:18:01.752544 [debug] [Thread-1 ]: Writing runtime SQL for node "model.my_dbt_project.foo"
22:18:01.753666 [debug] [Thread-1 ]: Using redshift connection "model.my_dbt_project.foo"
22:18:01.754089 [debug] [Thread-1 ]: On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.0.9", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
create table
"dev"."public"."foo__dbt_tmp"
as (
select 1 id
);
22:18:02.645070 [debug] [Thread-1 ]: SQL status: SELECT in 0.89 seconds
... And on a more recent version (1.6): $ dbt --debug run
...
22:20:32 1 of 1 START sql table model public.foo ........................................ [RUN]
22:20:32 Re-using an available connection from the pool (formerly list_dev_public, now model.my_dbt_project.foo)
22:20:32 Began compiling node model.my_dbt_project.foo
22:20:32 Writing injected SQL for node "model.my_dbt_project.foo"
22:20:32 Timing info for model.my_dbt_project.foo (compile): 11:20:32.200303 => 11:20:32.207719
22:20:32 Began executing node model.my_dbt_project.foo
22:20:32 Using redshift connection "model.my_dbt_project.foo"
22:20:32 On model.my_dbt_project.foo: BEGIN
22:20:32 Opening a new connection, currently in state closed
22:20:32 Redshift adapter: Establishing connection using ssl with `sslmode` set to 'prefer'.To connect without ssl, set `sslmode` to 'disable'.
22:20:32 Redshift adapter: Connecting to redshift with username/password based auth...
22:20:34 SQL status: SUCCESS in 2.0 seconds
22:20:34 Using redshift connection "model.my_dbt_project.foo"
22:20:34 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.6.6", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
begin;
22:20:34 SQL status: SUCCESS in 0.0 seconds
22:20:34 Using redshift connection "model.my_dbt_project.foo"
22:20:34 On model.my_dbt_project.foo: select 1 id;
22:20:34 SQL status: SUCCESS in 0.0 seconds
22:20:34 Using redshift connection "model.my_dbt_project.foo"
22:20:34 On model.my_dbt_project.foo: commit;
22:20:35 SQL status: SUCCESS in 0.0 seconds
22:20:35 Using redshift connection "model.my_dbt_project.foo"
22:20:35 On model.my_dbt_project.foo: begin;
22:20:35 SQL status: SUCCESS in 0.0 seconds
22:20:35 Using redshift connection "model.my_dbt_project.foo"
22:20:35 On model.my_dbt_project.foo: select 2 id;
22:20:36 SQL status: SUCCESS in 0.0 seconds
22:20:36 Using redshift connection "model.my_dbt_project.foo"
22:20:36 On model.my_dbt_project.foo: commit;
22:20:36 SQL status: SUCCESS in 0.0 seconds
22:20:36 Using redshift connection "model.my_dbt_project.foo"
22:20:36 On model.my_dbt_project.foo: ;
22:20:36 Redshift adapter: Redshift error: query was empty
22:20:36 On model.my_dbt_project.foo: ROLLBACK
22:20:36 Timing info for model.my_dbt_project.foo (execute): 11:20:32.209790 => 11:20:36.757150
22:20:36 On model.my_dbt_project.foo: Close
22:20:36 Database Error in model foo (models/marts/foo.sql)
query was empty
22:20:36 Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '253b7274-8631-420b-99a3-4f2df0ca0907', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x109fe9a30>]}
22:20:36 1 of 1 ERROR creating sql table model public.foo ............................... [ERROR in 4.57s]
22:20:36 Finished running node model.my_dbt_project.foo
22:20:36 Using redshift connection "master"
22:20:36 On master: BEGIN
22:20:36 Opening a new connection, currently in state closed
22:20:36 Redshift adapter: Establishing connection using ssl with `sslmode` set to 'prefer'.To connect without ssl, set `sslmode` to 'disable'.
22:20:36 Redshift adapter: Connecting to redshift with username/password based auth...
22:20:38 SQL status: SUCCESS in 2.0 seconds
22:20:38 On master: COMMIT
22:20:38 Using redshift connection "master"
22:20:38 On master: COMMIT
22:20:38 SQL status: SUCCESS in 0.0 seconds
22:20:38 On master: Close
22:20:38 Connection 'master' was properly closed.
22:20:38 Connection 'model.my_dbt_project.foo' was properly closed.
22:20:38
22:20:38 Finished running 1 table model in 0 hours 0 minutes and 14.84 seconds (14.84s).
22:20:38 Command end result
22:20:38
22:20:38 Completed with 1 error and 0 warnings:
22:20:38
22:20:38 Database Error in model foo (models/marts/foo.sql)
query was empty
22:20:38
22:20:38 Done. PASS=0 WARN=0 ERROR=1 SKIP=0 TOTAL=1
... Convert the hook into a list of strings will fix the issue: -- models/foo.sql
{{ config(pre_hook=["{{ do_thing() }}", "{{ do_another_thing() }}"]) }}
select 1 id $ dbt --debug run
22:22:50 Began running node model.my_dbt_project.foo
22:22:50 1 of 1 START sql table model public.foo ........................................ [RUN]
22:22:50 Re-using an available connection from the pool (formerly list_dev_public, now model.my_dbt_project.foo)
22:22:50 Began compiling node model.my_dbt_project.foo
22:22:50 Writing injected SQL for node "model.my_dbt_project.foo"
22:22:50 Timing info for model.my_dbt_project.foo (compile): 11:22:50.880053 => 11:22:50.887606
22:22:50 Began executing node model.my_dbt_project.foo
22:22:50 Using redshift connection "model.my_dbt_project.foo"
22:22:50 On model.my_dbt_project.foo: BEGIN
22:22:50 Opening a new connection, currently in state closed
22:22:50 Redshift adapter: Establishing connection using ssl with `sslmode` set to 'prefer'.To connect without ssl, set `sslmode` to 'disable'.
22:22:50 Redshift adapter: Connecting to redshift with username/password based auth...
22:22:52 SQL status: SUCCESS in 2.0 seconds
22:22:52 Using redshift connection "model.my_dbt_project.foo"
22:22:52 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.6.6", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
begin;
22:22:53 SQL status: SUCCESS in 0.0 seconds
22:22:53 Using redshift connection "model.my_dbt_project.foo"
22:22:53 On model.my_dbt_project.foo: select 1 id;
22:22:53 SQL status: SUCCESS in 0.0 seconds
22:22:53 Using redshift connection "model.my_dbt_project.foo"
22:22:53 On model.my_dbt_project.foo: commit;
22:22:53 SQL status: SUCCESS in 0.0 seconds
22:22:53 Using redshift connection "model.my_dbt_project.foo"
22:22:53 On model.my_dbt_project.foo: begin;
22:22:54 SQL status: SUCCESS in 0.0 seconds
22:22:54 Using redshift connection "model.my_dbt_project.foo"
22:22:54 On model.my_dbt_project.foo: select 2 id;
22:22:54 SQL status: SUCCESS in 0.0 seconds
22:22:54 Using redshift connection "model.my_dbt_project.foo"
22:22:54 On model.my_dbt_project.foo: commit;
22:22:55 SQL status: SUCCESS in 0.0 seconds
22:22:55 Using redshift connection "model.my_dbt_project.foo"
22:22:55 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.6.6", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
begin;
22:22:55 SQL status: SUCCESS in 0.0 seconds
22:22:55 Using redshift connection "model.my_dbt_project.foo"
22:22:55 On model.my_dbt_project.foo: select 1 id;
22:22:55 SQL status: SUCCESS in 0.0 seconds
22:22:55 Using redshift connection "model.my_dbt_project.foo"
22:22:55 On model.my_dbt_project.foo: commit;
22:22:55 SQL status: SUCCESS in 0.0 seconds
22:22:55 Using redshift connection "model.my_dbt_project.foo"
22:22:55 On model.my_dbt_project.foo: begin;
22:22:55 SQL status: SUCCESS in 0.0 seconds
22:22:55 Using redshift connection "model.my_dbt_project.foo"
22:22:55 On model.my_dbt_project.foo: select 2 id;
22:22:56 SQL status: SUCCESS in 0.0 seconds
22:22:56 Using redshift connection "model.my_dbt_project.foo"
22:22:56 On model.my_dbt_project.foo: commit;
22:22:56 SQL status: SUCCESS in 0.0 seconds
22:22:56 Writing runtime sql for node "model.my_dbt_project.foo"
22:22:56 Using redshift connection "model.my_dbt_project.foo"
22:22:56 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.6.6", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
create table
"dev"."public"."foo__dbt_tmp"
as (
select 1 id
);
22:22:57 SQL status: SUCCESS in 2.0 seconds
22:22:57 Using redshift connection "model.my_dbt_project.foo"
22:22:57 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.6.6", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
alter table "dev"."public"."foo" rename to "foo__dbt_backup"
22:23:00 SQL status: SUCCESS in 3.0 seconds
22:23:00 Using redshift connection "model.my_dbt_project.foo"
22:23:00 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.6.6", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
alter table "dev"."public"."foo__dbt_tmp" rename to "foo"
22:23:01 SQL status: SUCCESS in 1.0 seconds
22:23:02 On model.my_dbt_project.foo: COMMIT
22:23:02 Using redshift connection "model.my_dbt_project.foo"
22:23:02 On model.my_dbt_project.foo: COMMIT
22:23:02 SQL status: SUCCESS in 0.0 seconds
22:23:02 Using redshift connection "model.my_dbt_project.foo"
22:23:02 On model.my_dbt_project.foo: BEGIN
22:23:02 SQL status: SUCCESS in 0.0 seconds
22:23:02 Using redshift connection "model.my_dbt_project.foo"
22:23:02 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.6.6", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
drop table if exists "dev"."public"."foo__dbt_backup" cascade
22:23:03 SQL status: SUCCESS in 0.0 seconds
22:23:03 On model.my_dbt_project.foo: COMMIT
22:23:03 Using redshift connection "model.my_dbt_project.foo"
22:23:03 On model.my_dbt_project.foo: COMMIT
22:23:03 SQL status: SUCCESS in 1.0 seconds
22:23:03 Using redshift connection "model.my_dbt_project.foo"
22:23:03 On model.my_dbt_project.foo: BEGIN
22:23:04 SQL status: SUCCESS in 0.0 seconds
22:23:04 Timing info for model.my_dbt_project.foo (execute): 11:22:50.889735 => 11:23:04.042058
22:23:04 On model.my_dbt_project.foo: ROLLBACK
22:23:04 On model.my_dbt_project.foo: Close
22:23:04 Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'c8eac612-6df4-4566-8c7a-fb72cb68fb35', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x111dc7f10>]}
22:23:04 1 of 1 OK created sql table model public.foo ................................... [SUCCESS in 13.59s]
22:23:04 Finished running node model.my_dbt_project.foo
22:23:04 Using redshift connection "master"
22:23:04 On master: BEGIN
22:23:04 Opening a new connection, currently in state closed
22:23:04 Redshift adapter: Establishing connection using ssl with `sslmode` set to 'prefer'.To connect without ssl, set `sslmode` to 'disable'.
22:23:04 Redshift adapter: Connecting to redshift with username/password based auth...
22:23:06 SQL status: SUCCESS in 2.0 seconds
22:23:06 On master: COMMIT
22:23:06 Using redshift connection "master"
22:23:06 On master: COMMIT
22:23:06 SQL status: SUCCESS in 1.0 seconds
22:23:06 On master: Close
22:23:06 Connection 'master' was properly closed.
22:23:06 Connection 'model.my_dbt_project.foo' was properly closed.
22:23:06
22:23:06 Finished running 1 table model in 0 hours 0 minutes and 24.20 seconds (24.20s).
22:23:06 Command end result
22:23:06
22:23:06 Completed successfully Personally though, my recommendation is to not have -- macros/do_thing.sql
{% macro do_thing() %}
select 1 id;
select 2 id;
{% endmacro %}
-- macros/do_another_thing.sql
{% macro do_another_thing() %}
select 1 id;
select 2 id;
{% endmacro %}
-- models/foo.sql
{{
config(
pre_hook=[
before_begin("{{ do_thing() }}"),
before_begin("{{ do_another_thing()}}")
]
)
}}
select 1 id
$ dbt --debug run
...
22:29:27 1 of 1 START sql table model public.foo ........................................ [RUN]
22:29:27 Re-using an available connection from the pool (formerly list_dev_public, now model.my_dbt_project.foo)
22:29:27 Began compiling node model.my_dbt_project.foo
22:29:27 Writing injected SQL for node "model.my_dbt_project.foo"
22:29:27 Timing info for model.my_dbt_project.foo (compile): 11:29:27.431571 => 11:29:27.436701
22:29:27 Began executing node model.my_dbt_project.foo
22:29:27 Using redshift connection "model.my_dbt_project.foo"
22:29:27 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.6.6", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
commit;
22:29:27 Opening a new connection, currently in state closed
22:29:27 Redshift adapter: Establishing connection using ssl with `sslmode` set to 'prefer'.To connect without ssl, set `sslmode` to 'disable'.
22:29:27 Redshift adapter: Connecting to redshift with username/password based auth...
22:29:29 SQL status: SUCCESS in 2.0 seconds
22:29:29 Using redshift connection "model.my_dbt_project.foo"
22:29:29 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.6.6", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
select 1 id;
22:29:29 SQL status: SUCCESS in 0.0 seconds
22:29:29 Using redshift connection "model.my_dbt_project.foo"
22:29:29 On model.my_dbt_project.foo: select 2 id;
22:29:30 SQL status: SUCCESS in 0.0 seconds
22:29:30 Using redshift connection "model.my_dbt_project.foo"
22:29:30 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.6.6", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
select 1 id;
22:29:30 SQL status: SUCCESS in 0.0 seconds
22:29:30 Using redshift connection "model.my_dbt_project.foo"
22:29:30 On model.my_dbt_project.foo: select 2 id;
22:29:30 SQL status: SUCCESS in 0.0 seconds
22:29:30 Writing runtime sql for node "model.my_dbt_project.foo"
22:29:30 Using redshift connection "model.my_dbt_project.foo"
22:29:30 On model.my_dbt_project.foo: BEGIN
22:29:30 SQL status: SUCCESS in 0.0 seconds
22:29:30 Using redshift connection "model.my_dbt_project.foo"
22:29:30 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.6.6", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
create table
"dev"."public"."foo__dbt_tmp"
as (
select 1 id
);
22:29:31 SQL status: SUCCESS in 0.0 seconds
22:29:31 Using redshift connection "model.my_dbt_project.foo"
22:29:31 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.6.6", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
alter table "dev"."public"."foo" rename to "foo__dbt_backup"
22:29:33 SQL status: SUCCESS in 2.0 seconds
22:29:33 Using redshift connection "model.my_dbt_project.foo"
22:29:33 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.6.6", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
alter table "dev"."public"."foo__dbt_tmp" rename to "foo"
22:29:33 SQL status: SUCCESS in 1.0 seconds
22:29:33 On model.my_dbt_project.foo: COMMIT
22:29:33 Using redshift connection "model.my_dbt_project.foo"
22:29:33 On model.my_dbt_project.foo: COMMIT
22:29:34 SQL status: SUCCESS in 1.0 seconds
22:29:34 Using redshift connection "model.my_dbt_project.foo"
22:29:34 On model.my_dbt_project.foo: BEGIN
22:29:35 SQL status: SUCCESS in 0.0 seconds
22:29:35 Using redshift connection "model.my_dbt_project.foo"
22:29:35 On model.my_dbt_project.foo: /* {"app": "dbt", "dbt_version": "1.6.6", "profile_name": "all", "target_name": "rs", "node_id": "model.my_dbt_project.foo"} */
drop table if exists "dev"."public"."foo__dbt_backup" cascade
22:29:35 SQL status: SUCCESS in 0.0 seconds
22:29:35 On model.my_dbt_project.foo: COMMIT
22:29:35 Using redshift connection "model.my_dbt_project.foo"
22:29:35 On model.my_dbt_project.foo: COMMIT
22:29:36 SQL status: SUCCESS in 1.0 seconds
22:29:36 Using redshift connection "model.my_dbt_project.foo"
22:29:36 On model.my_dbt_project.foo: BEGIN
22:29:36 SQL status: SUCCESS in 0.0 seconds
22:29:36 Timing info for model.my_dbt_project.foo (execute): 11:29:27.438485 => 11:29:36.646265
22:29:36 On model.my_dbt_project.foo: ROLLBACK
22:29:37 On model.my_dbt_project.foo: Close
22:29:37 Sending event: {'category': 'dbt', 'action': 'run_model', 'label': '3f1c7282-f792-40c3-a57d-2996a7c3907b', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x1124b8cd0>]}
22:29:37 1 of 1 OK created sql table model public.foo ................................... [SUCCESS in 9.70s]
22:29:37 Finished running node model.my_dbt_project.foo
22:29:37 Using redshift connection "master"
22:29:37 On master: BEGIN
22:29:37 Opening a new connection, currently in state closed
22:29:37 Redshift adapter: Establishing connection using ssl with `sslmode` set to 'prefer'.To connect without ssl, set `sslmode` to 'disable'.
22:29:37 Redshift adapter: Connecting to redshift with username/password based auth...
22:29:38 SQL status: SUCCESS in 2.0 seconds
22:29:38 On master: COMMIT
22:29:38 Using redshift connection "master"
22:29:38 On master: COMMIT
22:29:39 SQL status: SUCCESS in 0.0 seconds
22:29:39 On master: Close
22:29:39 Connection 'master' was properly closed.
22:29:39 Connection 'model.my_dbt_project.foo' was properly closed.
22:29:39
22:29:39 Finished running 1 table model in 0 hours 0 minutes and 20.14 seconds (20.14s).
22:29:39 Command end result
22:29:39
22:29:39 Completed successfully |
Is this a new bug in dbt-redshift?
Current Behavior
Upgrading from dbt-core==1.3.2 to dbt-core==1.5.4 I started receiving the
Query was empty
error for incremental models. It seems to be due to some listing mechanism dbt seems to perform on the database.Inspecing the generated code for incremental models, it returns me only the delete+insert step whereas for non incremental models it shows me the actual query (not sure if it's relevant).
Inspecing the database objects affected by the query, the query does seems to work just fine, tho. It seems something related to a teardown process of the run
Expected Behavior
No error if the executions seemed to have worked fine.
Steps To Reproduce
Relevant log output
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: