Skip to content

Commit bb36a53

Browse files
author
Elias Kassell
authored
Revert "fix: dry run fails when table/view/assertion already does not exsist …" (#1834)
This reverts commit 4d20929.
1 parent 4d20929 commit bb36a53

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

cli/api/commands/run.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ export class Runner {
365365
// (i.e. it must still be RUNNING, and not FAILED).
366366
actionResult.status === dataform.ActionResult.ExecutionStatus.RUNNING &&
367367
!(this.graph.runConfig && this.graph.runConfig.disableSetMetadata) &&
368-
!(this.executionOptions?.bigquery?.dryRun) &&
369368
action.type === "table"
370369
) {
371370
try {

cli/api/dbadapters/execution_sql.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ export class ExecutionSql {
4747
}
4848

4949
public insertInto(target: dataform.ITarget, columns: string[], query: string) {
50-
return `
51-
insert into ${this.resolveTarget(target)}
52-
(${columns.join(",")})
53-
select ${columns.join(",")}
50+
return `
51+
insert into ${this.resolveTarget(target)}
52+
(${columns.join(",")})
53+
select ${columns.join(",")}
5454
from (${query}) as insertions`;
5555
}
5656

@@ -174,6 +174,7 @@ from (${query}) as insertions`;
174174
const tasks = new Tasks();
175175
const target = assertion.target;
176176
tasks.add(Task.statement(this.createOrReplaceView(target, assertion.query)));
177+
tasks.add(Task.assertion(`select sum(1) as row_count from ${this.resolveTarget(target)}`));
177178
return tasks;
178179
}
179180

0 commit comments

Comments
 (0)