Skip to content
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

DBT Operations (like 'run', 'seed', etc.) run successfully even when issues parsing .yml files #1493

Closed
jrandrews opened this issue May 30, 2019 · 1 comment · Fixed by #1751
Labels
enhancement New feature or request

Comments

@jrandrews
Copy link

jrandrews commented May 30, 2019

DBT Operations (like 'run', 'seed', etc.) run successfully even when issues parsing .yml files

When running dbt run or dbt seed, there can be errors in parsing .yml files which are reported at the command line, but the dbt command still is marked as "succeeding." This is a problem because if there is one problem in parsing a .yml file, it can cause many other aspects of the operation, such as additional source info, model info, or tests not to be properly par
sed which means that the run may have "completed" but aspects of it which were intended were silently ignored.

dbt --version
installed version: 0.13.1
latest version: 0.13.1

The operating system you're running on:
Mac OS 10.14.5 but also happens on dbt cloud using dbt version 0.13.1 in our environment setup.

The python version you're using (probably the output of python --version)
python --version
Python 2.7.10

Steps to reproduce

Terminal output here:

Running with dbt=0.13.1
Error reading snowflake_mvp_analytics:staging/stg_countries.yml - Skipping
Runtime Error
  Syntax error near line 28
  ------------------------------
  25 |           - not_null
  26 |           - unique
  27 |           - regex_check:
  28 |               regex: "'[^{}|\/\\+=!@#$%^&*<>?;:]+|N/A'"
  29 |       - name: continent
  30 |         description: 2-letter code of the continent where the country is located.
  31 |         tests:
  
  Raw Error:
  ------------------------------
  while scanning a double-quoted scalar
    in "<unicode string>", line 28, column 22:
                    regex: "'[^{}|\/\\+=!@#$%^&*<>?;:]+|N/A'"
                           ^
  found unknown escape character '/'
    in "<unicode string>", line 28, column 30:
                    regex: "'[^{}|\/\\+=!@#$%^&*<>?;:]+|N/A'"
                                   ^
Found 0 archives, 398 tests, 0 sources, 9 operations, 0 analyses, 210 macros, 1 seed files, 23 models
23:27:17 | Concurrency: 4 threads (target='default')
23:27:17 |
23:27:17 | 1 of 1 START seed file staging.stg_country_name_alias................ [RUN]
23:27:20 | 1 of 1 OK loaded seed file staging.stg_country_name_alias............ [INSERT 20 in 3.09s]
23:27:24 |
23:27:24 | Finished running 1 seeds in 19.48s.
Completed successfully
Done. PASS=1 ERROR=0 SKIP=0 TOTAL=1`
@drewbanin
Copy link
Contributor

Thanks for making this issue @jrandrews. You're right - dbt ignores errors in .yml specs for non-test operations like dbt run and dbt seed. This made sense at one point, but increasingly, dbt is able to use the information encoded in .yml specs in run/docs/etc contexts.

Let's go ahead and make this class of error a runtime error, rather than just a warning.

@drewbanin drewbanin modified the milestones: 0.14.1, Louisa May Alcott Aug 27, 2019
@drewbanin drewbanin added the enhancement New feature or request label Aug 27, 2019
beckjake added a commit that referenced this issue Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants