-
Notifications
You must be signed in to change notification settings - Fork 515
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
use limit_zero
macro instead of limit 0
#437
Conversation
* Update require-dbt-version to be 1.0 * Fix SQL 42000 on Exasol (dbt-labs#420) " SQL-Error [42000]: syntax error, unexpected '*' " If you specify the * in the unioned with their respectiv names <name>.* you do not receive the SQL Error posted above. This should not inflict any further problems since it is redundant for most DBs. * Minor readme link fixes (dbt-labs#431) * minor readme link fixes * changelog addition Co-authored-by: Joel Labes <[email protected]> * 0.7.4 changelog (dbt-labs#432) * Update CHANGELOG.md * Note branch name change Co-authored-by: Timo Kruth <[email protected]> Co-authored-by: Joe Markiewicz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI test is failing with
Database Error in test test_slugify (tests/jinja_helpers/test_slugify.sql)
syntax error at or near "object"
LINE 9: select 1 <dbt.clients.jinja.MacroGenerator object at 0x7...
^
compiled SQL at target/run/dbt_utils_integration_tests/tests/jinja_helpers/test_slugify.sql
Encountered an error:
FailFast Error in test test_slugify (tests/jinja_helpers/test_slugify.sql)
Failing early due to test failure or runtime error
However a test like assert_pretty_time_is_string
is passing and looks almost identical. The only thing that jumps out is this one doesn't alias select 1
. It shouldn't need to - the code you've written works for me when I test it in dbt Cloud - but let's give it a whirl just in case.
Taking the liberty of committing on your behalf so that the CI job starts again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a macro! that's why there was an error 🎉
thanks @joellabes this should be ready now IMHO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks as always for your contribution!
* Update require-dbt-version to be 1.0 * Fix SQL 42000 on Exasol (#420) " SQL-Error [42000]: syntax error, unexpected '*' " If you specify the * in the unioned with their respectiv names <name>.* you do not receive the SQL Error posted above. This should not inflict any further problems since it is redundant for most DBs. * Minor readme link fixes (#431) * minor readme link fixes * changelog addition Co-authored-by: Joel Labes <[email protected]> * 0.7.4 changelog (#432) * Update CHANGELOG.md * Note branch name change * use `limit_zero` macro instead of `limit 0` (#437) * Utils 0.7.4b1 (#433) * Update require-dbt-version to be 1.0 * Fix SQL 42000 on Exasol (#420) " SQL-Error [42000]: syntax error, unexpected '*' " If you specify the * in the unioned with their respectiv names <name>.* you do not receive the SQL Error posted above. This should not inflict any further problems since it is redundant for most DBs. * Minor readme link fixes (#431) * minor readme link fixes * changelog addition Co-authored-by: Joel Labes <[email protected]> * 0.7.4 changelog (#432) * Update CHANGELOG.md * Note branch name change Co-authored-by: Timo Kruth <[email protected]> Co-authored-by: Joe Markiewicz <[email protected]> * standard convention * Update integration_tests/tests/jinja_helpers/test_slugify.sql Taking the liberty of committing on your behalf so that the CI job starts again * Change limit_zero to be a macro Co-authored-by: Joel Labes <[email protected]> Co-authored-by: Timo Kruth <[email protected]> Co-authored-by: Joe Markiewicz <[email protected]> * Add col_name alias to else state too (#437) * Remove extra semicolon in `insert_by_period` materialization (#439) * Remove extra semicolon in `insert_by_period` materialization. `create_table_as()` generates a SQL statement that already ends with a semicolon, so the extra semicolon after a `create_table_as()` call in the `insert_by_period` materialization ends up being an empty SQL statement, and at least when using Snowflake this causes the dbt run to fail with a "cannot unpack non-iterable NoneType object" error. * Update changelog for PR 439. * Use the relation object passed into get_column_values, instead of making our own (#440) * Use the relation object passed into get_column_values, instead of making our own * Rename variables in get column value test to be clearer * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Timo Kruth <[email protected]> Co-authored-by: Joe Markiewicz <[email protected]> Co-authored-by: Anders <[email protected]> Co-authored-by: Sean Rose <[email protected]>
* dbt 0.7.4 release (#441) * Update require-dbt-version to be 1.0 * Fix SQL 42000 on Exasol (#420) " SQL-Error [42000]: syntax error, unexpected '*' " If you specify the * in the unioned with their respectiv names <name>.* you do not receive the SQL Error posted above. This should not inflict any further problems since it is redundant for most DBs. * Minor readme link fixes (#431) * minor readme link fixes * changelog addition Co-authored-by: Joel Labes <[email protected]> * 0.7.4 changelog (#432) * Update CHANGELOG.md * Note branch name change * use `limit_zero` macro instead of `limit 0` (#437) * Utils 0.7.4b1 (#433) * Update require-dbt-version to be 1.0 * Fix SQL 42000 on Exasol (#420) " SQL-Error [42000]: syntax error, unexpected '*' " If you specify the * in the unioned with their respectiv names <name>.* you do not receive the SQL Error posted above. This should not inflict any further problems since it is redundant for most DBs. * Minor readme link fixes (#431) * minor readme link fixes * changelog addition Co-authored-by: Joel Labes <[email protected]> * 0.7.4 changelog (#432) * Update CHANGELOG.md * Note branch name change Co-authored-by: Timo Kruth <[email protected]> Co-authored-by: Joe Markiewicz <[email protected]> * standard convention * Update integration_tests/tests/jinja_helpers/test_slugify.sql Taking the liberty of committing on your behalf so that the CI job starts again * Change limit_zero to be a macro Co-authored-by: Joel Labes <[email protected]> Co-authored-by: Timo Kruth <[email protected]> Co-authored-by: Joe Markiewicz <[email protected]> * Add col_name alias to else state too (#437) * Remove extra semicolon in `insert_by_period` materialization (#439) * Remove extra semicolon in `insert_by_period` materialization. `create_table_as()` generates a SQL statement that already ends with a semicolon, so the extra semicolon after a `create_table_as()` call in the `insert_by_period` materialization ends up being an empty SQL statement, and at least when using Snowflake this causes the dbt run to fail with a "cannot unpack non-iterable NoneType object" error. * Update changelog for PR 439. * Use the relation object passed into get_column_values, instead of making our own (#440) * Use the relation object passed into get_column_values, instead of making our own * Rename variables in get column value test to be clearer * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Timo Kruth <[email protected]> Co-authored-by: Joe Markiewicz <[email protected]> Co-authored-by: Anders <[email protected]> Co-authored-by: Sean Rose <[email protected]> * Regression: Correctly handle missing relations in get_column_values (#448) * Create integration test for a dropped relation * Update get_column_values.sql * Swap out adapter call for a good old fashioned drop table * Add missing curlies * what person wrote this code :/ (it was me) * wrap values in quotes * GOOD * bigquery compat (they don't like except) * Backport android url changes from #426 (#452) * Update CHANGELOG.md * Change require-dbt-version, update dbt_project.yml for integration tests proj * Upgrade python version in CI, improve drop relation integration test * Clarify version pinning * Drop support for release candidates of 1.0.0 Co-authored-by: Timo Kruth <[email protected]> Co-authored-by: Joe Markiewicz <[email protected]> Co-authored-by: Anders <[email protected]> Co-authored-by: Sean Rose <[email protected]>
This is a:
master
dev/
branchdev/
branchDescription & motivation
This test cannot be used by databases that don't support
limit zero
Checklist
star()
source)