Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions tests/profiles/databricks/test_dbr_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,15 @@ def test_profile_args(
profile_args={
"schema": "my_schema",
"catalog": "my_catalog",
"session_properties": {"legacy_time_parser_policy": "corrected"},
"threads": 4,
},
)
assert profile_mapping.profile_args == {
"schema": "my_schema",
"catalog": "my_catalog",
"session_properties": {"legacy_time_parser_policy": "corrected"},
"threads": 4,
}

assert profile_mapping.profile == {
Expand All @@ -109,7 +113,23 @@ def test_profile_args(
"http_path": mock_databricks_conn.extra_dejson.get("http_path"),
"schema": "my_schema",
"catalog": "my_catalog",
"threads": 4,
"session_properties": {"legacy_time_parser_policy": "corrected"},
}
expected_profile_yml = """example:
outputs:
cosmos_target:
catalog: my_catalog
host: my_host
http_path: my_http_path
schema: my_schema
session_properties:
legacy_time_parser_policy: corrected
threads: 4
token: '{{ env_var(''COSMOS_CONN_DATABRICKS_TOKEN'') }}'
type: databricks
target: cosmos_target\n"""
assert profile_mapping.get_profile_file_contents("example") == expected_profile_yml


def test_profile_args_overrides(
Expand Down