-
Notifications
You must be signed in to change notification settings - Fork 177
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
test constraints for geometry and geography types #969
Conversation
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the dbt-snowflake contributing guide. |
f25e6cb demonstrates that the current behaviour (before pulling changes in dbt-labs/dbt-adapters#165) fails as described in dbt-labs/dbt-adapters#165 with: 01:34:43 Completed with 1 error and 0 warnings:
01:34:43
01:34:43 Database Error in model my_model_data_type (models/my_model_data_type.sql)
001007 (22023): SQL compilation error:
invalid type [CAST(null AS GEOGRAPHY)] for parameter 'TO_GEOGRAPHY'
01:34:43
01:34:43 Done. PASS=0 WARN=0 ERROR=1 SKIP=0 TOTAL=1
----------------------------- Captured stderr call -----------------------------
failed to send telemetry to the Datadog Agent at http://localhost:8126/telemetry/proxy/api/v2/apmtelemetry.
---------------------------- Captured logbook call -----------------------------
[DEBUG] ddtrace.internal.telemetry.writer: failed to send telemetry to the Datadog Agent at http://localhost:8126/telemetry/proxy/api/v2/apmtelemetry.
--------------------- CSV report: integration_results.csv ----------------------
=========================== short test summary info ============================
FAILED tests/functional/adapter/test_constraints.py::TestSnowflakeViewConstraintsColumnsEqual::test__constraints_correct_column_data_types - AssertionError: dbt exit state did not match expected
FAILED tests/functional/adapter/test_constraints.py::TestSnowflakeIncrementalConstraintsColumnsEqual::test__constraints_correct_column_data_types - AssertionError: dbt exit state did not match expected
FAILED tests/functional/adapter/test_constraints.py::TestSnowflakeTableConstraintsColumnsEqual::test__constraints_correct_column_data_types - AssertionError: dbt exit state did not match expected
============= 3 failed, 216 passed, 3 skipped in 754.52s (0:12:34) ============= |
@MichelleArk looks like the combination of this PR and dbt-labs/dbt-adapters#165 resolves #894 too 🤩 |
resolves: #894
tests: dbt-labs/dbt-adapters#166
docs dbt-labs/docs.getdbt.com/# N/A
Problem
cast
function dbt-adapters#166get_empty_query_sql
macro to use the adapter-specific cast macro resolves this in snowflake because snowflake provides a cast macro that handles geometry and geography types more gracefully!Solution
Checklist
Skipping changelog as this is a test-only change
🎩
✅ correct & passing contract:
✅ incorrect and failing contract error message looks good!