-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add snowflake telemetry. * Add changelog. * Temporary dev branch switch. * Correct version import * bump ci * Temporary dev branch switch. * Temporary dev branch switch take 2. * Alter to meet new base schema changes. * Fix input args. * Change field name. --------- Co-authored-by: Colin Rogers <[email protected]>
- Loading branch information
1 parent
ea33cbe
commit df643a0
Showing
5 changed files
with
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: Under the Hood | ||
body: Add telemetry function | ||
time: 2024-10-16T03:55:44.144174-07:00 | ||
custom: | ||
Author: versusfacit | ||
Issue: "301" |
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,27 @@ | ||
from unittest import mock | ||
|
||
import dbt.adapters.snowflake.__version__ | ||
|
||
from dbt.adapters.snowflake.impl import SnowflakeAdapter | ||
from dbt.adapters.base.relation import AdapterTrackingRelationInfo | ||
|
||
|
||
def test_telemetry_with_snowflake_details(): | ||
mock_model_config = mock.MagicMock() | ||
mock_model_config._extra = mock.MagicMock() | ||
mock_model_config._extra = { | ||
"adapter_type": "snowflake", | ||
"table_format": "iceberg", | ||
} | ||
|
||
res = SnowflakeAdapter.get_adapter_run_info(mock_model_config) | ||
|
||
assert res.adapter_name == "snowflake" | ||
assert res.base_adapter_version == dbt.adapters.__about__.version | ||
assert res.adapter_version == dbt.adapters.snowflake.__version__.version | ||
assert res.model_adapter_details == { | ||
"adapter_type": "snowflake", | ||
"table_format": "iceberg", | ||
} | ||
|
||
assert type(res) is AdapterTrackingRelationInfo |