-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from keboola/adamvyborny-DBT-16-generate-sourc…
…es-optionaly Added parameter for not generating the sources and its tests
- Loading branch information
Showing
16 changed files
with
105 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
1 change: 1 addition & 0 deletions
1
tests/functional/run-action-fail-without-sources/expected-stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Encountered an error: Compilation Error in model stg_model (models/example/stg_model.sql) Model 'model.my_new_project.stg_model' (models/example/stg_model.sql) depends on a source named 'in.c-test-bucket.test' which was not found Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/dbt/main.py", line 129, in main results, succeeded = handle_and_check(args) File "/usr/local/lib/python3.9/dist-packages/dbt/main.py", line 191, in handle_and_check task, res = run_from_args(parsed) File "/usr/local/lib/python3.9/dist-packages/dbt/main.py", line 238, in run_from_args results = task.run() File "/usr/local/lib/python3.9/dist-packages/dbt/task/runnable.py", line 451, in run self._runtime_initialize() File "/usr/local/lib/python3.9/dist-packages/dbt/task/runnable.py", line 159, in _runtime_initialize super()._runtime_initialize() File "/usr/local/lib/python3.9/dist-packages/dbt/task/runnable.py", line 92, in _runtime_initialize self.load_manifest() File "/usr/local/lib/python3.9/dist-packages/dbt/task/runnable.py", line 81, in load_manifest self.manifest = ManifestLoader.get_full_manifest(self.config) File "/usr/local/lib/python3.9/dist-packages/dbt/parser/manifest.py", line 219, in get_full_manifest manifest = loader.load() File "/usr/local/lib/python3.9/dist-packages/dbt/parser/manifest.py", line 390, in load self.process_sources(self.root_project.project_name) File "/usr/local/lib/python3.9/dist-packages/dbt/parser/manifest.py", line 921, in process_sources _process_sources_for_node(self.manifest, current_project, node) File "/usr/local/lib/python3.9/dist-packages/dbt/parser/manifest.py", line 1302, in _process_sources_for_node invalid_source_fail_unless_test( File "/usr/local/lib/python3.9/dist-packages/dbt/parser/manifest.py", line 955, in invalid_source_fail_unless_test source_target_not_found(node, target_name, target_table_name, disabled=disabled) File "/usr/local/lib/python3.9/dist-packages/dbt/exceptions.py", line 656, in source_target_not_found raise_compiler_error(msg, model) File "/usr/local/lib/python3.9/dist-packages/dbt/exceptions.py", line 445, in raise_compiler_error raise CompilationException(msg, node) dbt.exceptions.CompilationException: Compilation Error in model stg_model (models/example/stg_model.sql) Model 'model.my_new_project.stg_model' (models/example/stg_model.sql) depends on a source named 'in.c-test-bucket.test' which was not found |
Empty file.
Empty file.
22 changes: 22 additions & 0 deletions
22
tests/functional/run-action-fail-without-sources/source/data/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"authorization": { | ||
"workspace": { | ||
"host": "%env(string:SNOWFLAKE_HOST)%", | ||
"warehouse": "%env(string:SNOWFLAKE_WAREHOUSE)%", | ||
"database": "%env(string:SNOWFLAKE_DATABASE)%", | ||
"schema": "%env(string:SNOWFLAKE_SCHEMA)%", | ||
"user": "%env(string:SNOWFLAKE_USER)%", | ||
"password": "%env(string:SNOWFLAKE_PASSWORD)%" | ||
} | ||
}, | ||
"parameters": { | ||
"git": { | ||
"repo": "https://github.com/keboola/dbt-test-project-public.git" | ||
}, | ||
"dbt": { | ||
"executeSteps": ["dbt run"], | ||
"threads": 1 | ||
}, | ||
"generateSources": false | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
tests/functional/run-action-without-generating-sources/expected-code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0 |
Empty file.
16 changes: 16 additions & 0 deletions
16
tests/functional/run-action-without-generating-sources/expected-stdout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Successfully cloned repository https://github.com/keboola/dbt-test-project-public.git from branch branch-with-sources (%s) | ||
Executing command "dbt deps" | ||
Running with dbt=%s | ||
Warning: No packages were found in packages.yml | ||
Executing command "dbt run" | ||
Running with dbt=%s | ||
Partial parse save file not found. Starting full parse. | ||
Found 2 models, 0 tests, 0 snapshots, 0 analyses, %s macros, 0 operations, 0 seed files, 1 source, 0 exposures, 0 metrics | ||
Concurrency: 1 threads (target='kbc_prod') | ||
1 of 2 START view model %s.stg_model %s [RUN] | ||
1 of 2 OK created view model %s.stg_model %s [SUCCESS 1 in %ss] | ||
2 of 2 START view model %s.fct_model %s [RUN] | ||
2 of 2 OK created view model %s.fct_model %s [SUCCESS 1 in %ss] | ||
Finished running 2 view models in %s hours %s minutes and %s seconds (%ss). | ||
Completed successfully | ||
Done. PASS=2 WARN=0 ERROR=0 SKIP=0 TOTAL=2 |
Empty file.
Empty file.
23 changes: 23 additions & 0 deletions
23
tests/functional/run-action-without-generating-sources/source/data/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"authorization": { | ||
"workspace": { | ||
"host": "%env(string:SNOWFLAKE_HOST)%", | ||
"warehouse": "%env(string:SNOWFLAKE_WAREHOUSE)%", | ||
"database": "%env(string:SNOWFLAKE_DATABASE)%", | ||
"schema": "%env(string:SNOWFLAKE_SCHEMA)%", | ||
"user": "%env(string:SNOWFLAKE_USER)%", | ||
"password": "%env(string:SNOWFLAKE_PASSWORD)%" | ||
} | ||
}, | ||
"parameters": { | ||
"git": { | ||
"repo": "https://github.com/keboola/dbt-test-project-public.git", | ||
"branch": "branch-with-sources" | ||
}, | ||
"dbt": { | ||
"executeSteps": ["dbt run"], | ||
"threads": 1 | ||
}, | ||
"generateSources": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters