Skip to content

Conversation

sfc-gh-yutliu
Copy link

@sfc-gh-yutliu sfc-gh-yutliu commented Sep 3, 2025

resolves #1260
dbt-labs/docs.getdbt.com/#

Problem

dbt-snowflake did not support the new Snowflake "semantic view" relation type, so dbt users could not create or manage semantic views as first-class dbt resources or materializations. There was no materialization, build support, or test coverage for semantic views.

Solution

Snowflake Semantic Views in DBT

This pr adds support for "semantic view" as a new materialization in the dbt-snowflake adapter. It introduces the necessary logic, macros, SQL generation, and tests to enable creating, dropping, and renaming semantic views in Snowflake via dbt.

Test

  1. tests/functional/semantic_view/test_semantic_view_basic.py passed
    • test_create_semantic_view: semantic view model refers to raw table (use source(<raw_table>)) and table model (use ref(<table_model>)).
    • test_table_refer_to_semantic_view: table model refers to a semantic view model (use ref(<semantic_view_model>)).
    • test_table_refer_to_raw_semantic_view: table model refers to raw semantic view (use source(<semantic_view>))
    • test_semantic_view_comment: test description is recorded by comment on semantic view command.
    • test_semantic_view_copy_grants_logic: test copy grants configuration is properly handled.
    • test_semantic_view_with_ca_extension: test Cortex Analyst Extension query is properly handled in DBT.
(dbt_venv) ➜  dbt-snowflake git:(semantic-view/issue-1260) ✗ hatch run unit-tests tests/functional/semantic_view/test_semantic_view_basic.py                                                  
========================================================================================== test session starts ==========================================================================================
platform darwin -- Python 3.11.6, pytest-7.4.4, pluggy-1.6.0 -- /Users/yutliu/dbt-adapter-snowflake/dbt-adapters/dbt-snowflake/.hatch/dbt-snowflake/bin/python
cachedir: .pytest_cache
rootdir: /Users/yutliu/dbt-adapter-snowflake/dbt-adapters/dbt-snowflake
configfile: pyproject.toml
plugins: ddtrace-2.3.0, csv-3.0.0, logbook-1.2.0, xdist-3.8.0, dotenv-0.5.2
16 workers [6 items]      
scheduling tests via LoadScheduling

tests/functional/semantic_view/test_semantic_view_basic.py::TestSemanticViewBasic::test_create_semantic_view 
tests/functional/semantic_view/test_semantic_view_basic.py::TestSemanticViewBasic::test_table_refer_to_raw_semantic_view 
tests/functional/semantic_view/test_semantic_view_basic.py::TestSemanticViewBasic::test_table_refer_to_semantic_view 
tests/functional/semantic_view/test_semantic_view_basic.py::TestSemanticViewBasic::test_semantic_view_with_ca_extension 
tests/functional/semantic_view/test_semantic_view_basic.py::TestSemanticViewBasic::test_semantic_view_copy_grants_logic 
tests/functional/semantic_view/test_semantic_view_basic.py::TestSemanticViewBasic::test_semantic_view_comment 
[gw3] [ 16%] PASSED tests/functional/semantic_view/test_semantic_view_basic.py::TestSemanticViewBasic::test_semantic_view_comment 
[gw1] [ 33%] PASSED tests/functional/semantic_view/test_semantic_view_basic.py::TestSemanticViewBasic::test_table_refer_to_semantic_view 
[gw0] [ 50%] PASSED tests/functional/semantic_view/test_semantic_view_basic.py::TestSemanticViewBasic::test_create_semantic_view 
[gw2] [ 66%] PASSED tests/functional/semantic_view/test_semantic_view_basic.py::TestSemanticViewBasic::test_table_refer_to_raw_semantic_view 
[gw4] [ 83%] PASSED tests/functional/semantic_view/test_semantic_view_basic.py::TestSemanticViewBasic::test_semantic_view_copy_grants_logic 
[gw5] [100%] PASSED tests/functional/semantic_view/test_semantic_view_basic.py::TestSemanticViewBasic::test_semantic_view_with_ca_extension 

=========================================================================================== warnings summary ============================================================================================
.hatch/dbt-snowflake/lib/python3.11/site-packages/dbt/cli/options.py:6: 17 warnings
  /Users/yutliu/dbt-adapter-snowflake/dbt-adapters/dbt-snowflake/.hatch/dbt-snowflake/lib/python3.11/site-packages/dbt/cli/options.py:6: DeprecationWarning: 'parser.OptionParser' is deprecated and will be removed in Click 9.0. The old parser is available in 'optparse'.
    from click.parser import OptionParser, ParsingState

.hatch/dbt-snowflake/lib/python3.11/site-packages/dbt/cli/options.py:6: 17 warnings
  /Users/yutliu/dbt-adapter-snowflake/dbt-adapters/dbt-snowflake/.hatch/dbt-snowflake/lib/python3.11/site-packages/dbt/cli/options.py:6: DeprecationWarning: 'parser.ParsingState' is deprecated and will be removed in Click 9.0. The old parser is available in 'optparse'.
    from click.parser import OptionParser, ParsingState

tests/functional/semantic_view/test_semantic_view_basic.py: 40 warnings
  /Users/yutliu/dbt-adapter-snowflake/dbt-adapters/dbt-snowflake/.hatch/dbt-snowflake/lib/python3.11/site-packages/snowflake/connector/__init__.py:54: DeprecationWarning: The 'insecure_mode' connection property is deprecated. Please use 'disable_ocsp_checks' instead
    return SnowflakeConnection(**kwargs)

tests/functional/semantic_view/test_semantic_view_basic.py: 60 warnings
  /Users/yutliu/dbt-adapter-snowflake/dbt-adapters/dbt-snowflake/.hatch/dbt-snowflake/lib/python3.11/site-packages/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py:434: DeprecationWarning: Attempting to mutate a Context after a Connection was created. In the future, this will raise an exception
    self._ctx.set_options(value)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=================================================================================== 6 passed, 374 warnings in 50.01s ====================================================================================
(dbt_venv) ➜  dbt-snowflake git:(semantic-view/issue-1260) ✗ 
  1. Unit test passed:
(dbt_venv) ➜  dbt-snowflake git:(semantic-view/issue-1260) ✗ hatch run unit-tests                                                           
========================================================================================== test session starts ==========================================================================================
platform darwin -- Python 3.11.6, pytest-7.4.4, pluggy-1.6.0 -- /Users/yutliu/dbt-adapter-snowflake/dbt-adapters/dbt-snowflake/.hatch/dbt-snowflake/bin/python
cachedir: .pytest_cache
rootdir: /Users/yutliu/dbt-adapter-snowflake/dbt-adapters/dbt-snowflake
configfile: pyproject.toml
plugins: ddtrace-2.3.0, csv-3.0.0, logbook-1.2.0, xdist-3.8.0, dotenv-0.5.2
16 workers [94 items]     
scheduling tests via LoadScheduling

tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_special_characters 
tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_iceberg_dynamic_precedence 
tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_iceberg_table_dollar_sign_escaping 
tests/unit/test_adapter_telemetry.py::test_telemetry_with_snowflake_details 
tests/unit/test_catalog_relation_built_in.py::test_iceberg_base_location_built_in[config2-root_path/my_schema/my_table/subpath] 
tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_dynamic_table 
tests/unit/test_catalog_relation_built_in.py::test_change_tracking_invalid_model_config[0] 
tests/unit/test_catalog_relation_built_in.py::test_iceberg_base_location_built_in[config0-_dbt/my_schema/my_table] 
tests/unit/test_connections.py::test_connections_does_not_set_logs_in_response_to_env_var 
tests/unit/test_iceberg_rest_catalog_integration.py::TestIcebergRestCatalogIntegration::test_catalog_relation_has_catalog_linked_database_attribute 
tests/unit/test_catalog_relation_built_in.py::test_change_tracking_invalid_model_config[None] 
tests/unit/test_catalog_relation_built_in.py::test_change_tracking_model_config[False-FALSE0] 
[gw9] [  1%] PASSED tests/unit/test_catalog_relation_built_in.py::test_change_tracking_model_config[False-FALSE0] 
tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_regular_table 
[gw15] [  2%] PASSED tests/unit/test_iceberg_rest_catalog_integration.py::TestIcebergRestCatalogIntegration::test_catalog_relation_has_catalog_linked_database_attribute 
[gw0] [  3%] PASSED tests/unit/test_adapter_telemetry.py::test_telemetry_with_snowflake_details 
tests/unit/test_catalog_relation_built_in.py::test_change_tracking_model_config[False-FALSE1] 
[gw10] [  4%] PASSED tests/unit/test_catalog_relation_built_in.py::test_change_tracking_model_config[False-FALSE1] 
tests/unit/test_catalog_relation_built_in.py::test_iceberg_base_location_built_in[config4-root_path/my_schema/my_table] 
[gw8] [  5%] PASSED tests/unit/test_catalog_relation_built_in.py::test_iceberg_base_location_built_in[config4-root_path/my_schema/my_table] 
[gw11] [  6%] PASSED tests/unit/test_catalog_relation_built_in.py::test_change_tracking_invalid_model_config[0] 
[gw7] [  7%] PASSED tests/unit/test_catalog_relation_built_in.py::test_iceberg_base_location_built_in[config2-root_path/my_schema/my_table/subpath] 
tests/unit/test_connections.py::test_snowflake_oauth_expired_token_raises_error 
[gw12] [  8%] PASSED tests/unit/test_catalog_relation_built_in.py::test_change_tracking_invalid_model_config[None] 
[gw6] [  9%] PASSED tests/unit/test_catalog_relation_built_in.py::test_iceberg_base_location_built_in[config0-_dbt/my_schema/my_table] 
[gw13] [ 10%] PASSED tests/unit/test_connections.py::test_connections_does_not_set_logs_in_response_to_env_var 
tests/unit/test_catalog_relation_built_in.py::test_change_tracking_model_config[True-TRUE0] 
tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_dollar_sign_escaping 
tests/unit/test_catalog_relation_built_in.py::test_change_tracking_model_config[None-None] 
tests/unit/test_catalog_relation_built_in.py::test_change_tracking_invalid_model_config[] 
tests/unit/test_catalog_relation_built_in.py::test_iceberg_base_location_built_in[config3-_dbt/my_schema/my_table/subpath] 
[gw8] [ 11%] PASSED tests/unit/test_catalog_relation_built_in.py::test_change_tracking_model_config[None-None] 
tests/unit/test_catalog_relation_built_in.py::test_change_tracking_model_config[True-TRUE1] 
tests/unit/test_connections.py::test_connections_sets_logs_in_response_to_env_var 
[gw9] [ 12%] PASSED tests/unit/test_catalog_relation_built_in.py::test_change_tracking_model_config[True-TRUE0] 
[gw11] [ 13%] PASSED tests/unit/test_catalog_relation_built_in.py::test_change_tracking_invalid_model_config[] 
[gw7] [ 14%] PASSED tests/unit/test_catalog_relation_built_in.py::test_iceberg_base_location_built_in[config3-_dbt/my_schema/my_table/subpath] 
[gw10] [ 15%] PASSED tests/unit/test_catalog_relation_built_in.py::test_change_tracking_model_config[True-TRUE1] 
tests/unit/test_catalog_relation_built_in.py::test_iceberg_base_location_built_in[config1-_dbt/my_schema/my_table] 
[gw6] [ 17%] PASSED tests/unit/test_catalog_relation_built_in.py::test_iceberg_base_location_built_in[config1-_dbt/my_schema/my_table] 
tests/unit/test_iceberg_rest_catalog_integration.py::TestIcebergRestCatalogIntegration::test_macro_integration_with_catalog_linked_database_set 
[gw15] [ 18%] PASSED tests/unit/test_iceberg_rest_catalog_integration.py::TestIcebergRestCatalogIntegration::test_macro_integration_with_catalog_linked_database_set 
[gw14] [ 19%] PASSED tests/unit/test_connections.py::test_snowflake_oauth_expired_token_raises_error 
tests/unit/test_connections.py::test_connnections_credentials_replaces_underscores_with_hyphens 
tests/unit/test_iceberg_rest_catalog_integration.py::TestIcebergRestCatalogIntegration::test_catalog_relation_all_attributes_present 
tests/unit/test_parse_model.py::test_base_location[config1-_dbt/fake_schema/fake_table] 
tests/unit/test_parse_model.py::test_base_location[config2-root_path/fake_schema/fake_table/subpath] 
[gw12] [ 20%] PASSED tests/unit/test_connections.py::test_connections_sets_logs_in_response_to_env_var 
tests/unit/test_parse_model.py::test_base_location[config4-root_path/fake_schema/fake_table] 
tests/unit/test_parse_model.py::test_cluster_by[config0-fake_value] 
tests/unit/test_iceberg_rest_catalog_integration.py::TestIcebergRestCatalogIntegration::test_macro_integration_without_catalog_relation 
tests/unit/test_parse_model.py::test_base_location[config0-_dbt/fake_schema/fake_table] 
[gw13] [ 21%] PASSED tests/unit/test_connections.py::test_connnections_credentials_replaces_underscores_with_hyphens 
[gw11] [ 22%] PASSED tests/unit/test_parse_model.py::test_base_location[config0-_dbt/fake_schema/fake_table] 
[gw15] [ 23%] PASSED tests/unit/test_parse_model.py::test_cluster_by[config0-fake_value] 
[gw7] [ 24%] PASSED tests/unit/test_parse_model.py::test_base_location[config1-_dbt/fake_schema/fake_table] 
[gw6] [ 25%] PASSED tests/unit/test_parse_model.py::test_base_location[config4-root_path/fake_schema/fake_table] 
[gw10] [ 26%] PASSED tests/unit/test_parse_model.py::test_base_location[config2-root_path/fake_schema/fake_table/subpath] 
[gw8] [ 27%] PASSED tests/unit/test_iceberg_rest_catalog_integration.py::TestIcebergRestCatalogIntegration::test_catalog_relation_all_attributes_present 
tests/unit/test_iceberg_rest_catalog_integration.py::TestIcebergRestCatalogIntegration::test_missing_catalog_linked_database_raises_error 
[gw9] [ 28%] PASSED tests/unit/test_iceberg_rest_catalog_integration.py::TestIcebergRestCatalogIntegration::test_macro_integration_without_catalog_relation 
tests/unit/test_parse_model.py::test_base_location[config3-_dbt/fake_schema/fake_table/subpath] 
tests/unit/test_parse_model.py::test_cluster_by[config1-fake_value, fake_value_1] 
[gw12] [ 29%] PASSED tests/unit/test_parse_model.py::test_base_location[config3-_dbt/fake_schema/fake_table/subpath] 
tests/unit/test_renamed_relations.py::test_renameable_relation 
tests/unit/test_relation_as_case_sensitive.py::test_relation_as_case_sensitive_quoting_true 
tests/unit/test_private_keys.py::test_private_key_from_file 
[gw14] [ 30%] PASSED tests/unit/test_iceberg_rest_catalog_integration.py::TestIcebergRestCatalogIntegration::test_missing_catalog_linked_database_raises_error 
tests/unit/test_private_keys.py::test_private_key_from_string_pem 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_externalbrowser_authentication 
tests/unit/test_parse_model.py::test_catalog_name_with_non_model_config 
tests/unit/test_parse_model.py::test_catalog_name 
[gw13] [ 31%] PASSED tests/unit/test_parse_model.py::test_cluster_by[config1-fake_value, fake_value_1] 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_oauth_authentication 
[gw9] [ 32%] PASSED tests/unit/test_parse_model.py::test_catalog_name 
[gw6] [ 34%] PASSED tests/unit/test_relation_as_case_sensitive.py::test_relation_as_case_sensitive_quoting_true 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_private_key_authentication 
[gw8] [ 35%] PASSED tests/unit/test_parse_model.py::test_catalog_name_with_non_model_config 
[gw11] [ 36%] PASSED tests/unit/test_renamed_relations.py::test_renameable_relation 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_jwt_authentication 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_cancel_open_connections_single 
[gw4] [ 37%] PASSED tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_regular_table 
[gw2] [ 38%] PASSED tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_iceberg_dynamic_precedence 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_cancel_open_connections_empty 
[gw1] [ 39%] PASSED tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_dynamic_table 
[gw3] [ 40%] PASSED tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_iceberg_table_dollar_sign_escaping 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_private_key_string_authentication_no_passphrase 
[gw5] [ 41%] PASSED tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_special_characters 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_private_key_authentication_no_passphrase 
tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_multiline_comment 
tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_regular_view 
tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_empty_comment 
tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_macros_load 
tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_iceberg_table 
[gw0] [ 42%] PASSED tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_dollar_sign_escaping 
tests/unit/test_iceberg_rest_catalog_integration.py::TestIcebergRestCatalogIntegration::test_integration_with_environment_variable_for_macro 
[gw0] [ 43%] PASSED tests/unit/test_iceberg_rest_catalog_integration.py::TestIcebergRestCatalogIntegration::test_integration_with_environment_variable_for_macro 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_reuse_connections_with_keep_alive 
[gw1] [ 44%] PASSED tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_empty_comment 
[gw5] [ 45%] PASSED tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_macros_load 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_quoting_on_rename 
[gw2] [ 46%] PASSED tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_iceberg_table 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_quoting_on_truncate 
[gw4] [ 47%] PASSED tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_regular_view 
[gw3] [ 48%] PASSED tests/unit/test_alter_relation_comment_macro.py::TestSnowflakeAlterRelationCommentMacro::test_alter_relation_comment_multiline_comment 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_quoting_on_drop_schema 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_quoting_on_drop 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_query_tag 
[gw7] [ 50%] PASSED tests/unit/test_private_keys.py::test_private_key_from_file 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_private_key_string_authentication 
[gw10] [ 51%] PASSED tests/unit/test_private_keys.py::test_private_key_from_string_pem 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_user_pass_authentication 
[gw12] [ 52%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_oauth_authentication 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_client_has_query_tag 
[gw11] [ 53%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_private_key_authentication_no_passphrase 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_pre_post_hooks_warehouse 
[gw15] [ 54%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_externalbrowser_authentication 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_cancel_open_connections_master 
[gw13] [ 55%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_private_key_authentication 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_client_session_keep_alive_false_by_default 
[gw9] [ 56%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_cancel_open_connections_single 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_get_relation_with_quotes 
[gw14] [ 57%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_jwt_authentication 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_client_session_keep_alive_true 
[gw8] [ 58%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_cancel_open_connections_empty 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_get_relation_without_quotes 
[gw6] [ 59%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_private_key_string_authentication_no_passphrase 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_pre_post_hooks_no_warehouse 
[gw5] [ 60%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_quoting_on_truncate 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterConversions::test_convert_date_type 
[gw5] [ 61%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterConversions::test_convert_date_type 
tests/unit/test_snowflake_adapter.py::SnowflakeConnectionsTest::test_comment_stripping_regex 
[gw1] [ 62%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_quoting_on_rename 
[gw5] [ 63%] PASSED tests/unit/test_snowflake_adapter.py::SnowflakeConnectionsTest::test_comment_stripping_regex 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterConversions::test_convert_boolean_type 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterCredentials::test_invalid_private_key_path 
[gw1] [ 64%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterConversions::test_convert_boolean_type 
[gw5] [ 65%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterCredentials::test_invalid_private_key_path 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterCredentials::test_invalid_private_key_string 
[gw10] [ 67%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_user_pass_authentication 
[gw1] [ 68%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterCredentials::test_invalid_private_key_string 
[gw2] [ 69%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_quoting_on_drop_schema 
[gw4] [ 70%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_quoting_on_drop 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterCredentials::test_malformed_private_key_string 
[gw5] [ 71%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterCredentials::test_malformed_private_key_string 
tests/unit/test_snowflake_adapter.py::TestSnowflakeColumn::test_float_from_description 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterCredentials::test_private_key_string 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterConversions::test_convert_number_type 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterConversions::test_convert_datetime_type 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterCredentials::test_private_key_string_encrypted 
[gw0] [ 72%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_reuse_connections_with_keep_alive 
[gw4] [ 73%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterConversions::test_convert_number_type 
[gw7] [ 74%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_authenticator_private_key_string_authentication 
[gw10] [ 75%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeColumn::test_float_from_description 
[gw2] [ 76%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterConversions::test_convert_datetime_type 
[gw3] [ 77%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_query_tag 
[gw1] [ 78%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterCredentials::test_private_key_string 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterConversions::test_convert_time_type 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterConversions::test_convert_text_type 
tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_user_pass_authentication 
[gw5] [ 79%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterCredentials::test_private_key_string_encrypted 
[gw7] [ 80%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterConversions::test_convert_time_type 
[gw3] [ 81%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapterConversions::test_convert_text_type 
[gw12] [ 82%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_client_has_query_tag 
tests/unit/test_snowflake_adapter.py::TestSnowflakeColumn::test_sized_decimal_from_description 
[gw12] [ 84%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeColumn::test_sized_decimal_from_description 
[gw11] [ 85%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_pre_post_hooks_warehouse 
tests/unit/test_snowflake_adapter.py::TestSnowflakeColumn::test_sized_varchar_from_description 
[gw11] [ 86%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeColumn::test_sized_varchar_from_description 
[gw15] [ 87%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_cancel_open_connections_master 
tests/unit/test_snowflake_adapter.py::TestSnowflakeColumn::test_text_from_description 
[gw15] [ 88%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeColumn::test_text_from_description 
[gw13] [ 89%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_client_session_keep_alive_false_by_default 
tests/unit/test_snowflake_adapter.py::TestSnowflakeColumn::test_vector_from_description 
[gw13] [ 90%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeColumn::test_vector_from_description 
[gw9] [ 91%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_get_relation_with_quotes 
tests/unit/test_snowflake_adapter.py::TestSnowflakeColumnStructuredTypes::test_array_from_description 
[gw9] [ 92%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeColumnStructuredTypes::test_array_from_description 
[gw14] [ 93%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_client_session_keep_alive_true 
tests/unit/test_snowflake_adapter.py::TestSnowflakeColumnStructuredTypes::test_map_from_description 
[gw14] [ 94%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeColumnStructuredTypes::test_map_from_description 
[gw8] [ 95%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_get_relation_without_quotes 
tests/unit/test_snowflake_adapter.py::TestSnowflakeColumnStructuredTypes::test_object_from_description_iceberg 
[gw8] [ 96%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeColumnStructuredTypes::test_object_from_description_iceberg 
[gw6] [ 97%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_pre_post_hooks_no_warehouse 
tests/unit/test_snowflake_adapter.py::TestSnowflakeColumnStructuredTypes::test_object_from_description_simple 
[gw6] [ 98%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeColumnStructuredTypes::test_object_from_description_simple 
[gw0] [100%] PASSED tests/unit/test_snowflake_adapter.py::TestSnowflakeAdapter::test_user_pass_authentication 

=========================================================================================== warnings summary ============================================================================================
.hatch/dbt-snowflake/lib/python3.11/site-packages/dbt/cli/options.py:6: 17 warnings
  /Users/yutliu/dbt-adapter-snowflake/dbt-adapters/dbt-snowflake/.hatch/dbt-snowflake/lib/python3.11/site-packages/dbt/cli/options.py:6: DeprecationWarning: 'parser.OptionParser' is deprecated and will be removed in Click 9.0. The old parser is available in 'optparse'.
    from click.parser import OptionParser, ParsingState

.hatch/dbt-snowflake/lib/python3.11/site-packages/dbt/cli/options.py:6: 17 warnings
  /Users/yutliu/dbt-adapter-snowflake/dbt-adapters/dbt-snowflake/.hatch/dbt-snowflake/lib/python3.11/site-packages/dbt/cli/options.py:6: DeprecationWarning: 'parser.ParsingState' is deprecated and will be removed in Click 9.0. The old parser is available in 'optparse'.
    from click.parser import OptionParser, ParsingState

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
==================================================================================== 94 passed, 34 warnings in 5.20s ====================================================================================
(dbt_venv) ➜  dbt-snowflake git:(semantic-view/issue-1260) ✗ 
  1. Code-quality check passed:
(dbt_venv) ➜  dbt-snowflake git:(semantic-view/issue-1260) ✗ hatch run code-quality
check yaml...............................................................Passed
fix end of files.........................................................Passed
trim trailing whitespace.................................................Passed
check for case conflicts.................................................Passed
Check for dbt-core usage in an adapter...................................Passed
black....................................................................Passed
flake8...................................................................Passed
mypy.....................................................................Passed
(dbt_venv) ➜  dbt-snowflake git:(semantic-view/issue-1260) ✗ 

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@cla-bot cla-bot bot added the cla:yes The PR author has signed the CLA label Sep 3, 2025
@sfc-gh-yutliu sfc-gh-yutliu force-pushed the semantic-view/issue-1260 branch 5 times, most recently from e1c515c to c2667e1 Compare September 3, 2025 21:45
@sfc-gh-yutliu sfc-gh-yutliu force-pushed the semantic-view/issue-1260 branch from c2667e1 to 06210a9 Compare September 3, 2025 21:46
@sfc-gh-yutliu sfc-gh-yutliu marked this pull request as ready for review September 3, 2025 21:53
@sfc-gh-yutliu sfc-gh-yutliu requested a review from a team as a code owner September 3, 2025 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes The PR author has signed the CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Support Snowflake Semantic View as a materialization
1 participant