Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into tsung-julii/sc-27549/…
Browse files Browse the repository at this point in the history
…use-discovery-api-exclusively-for-dbt-cloud
  • Loading branch information
usefulalgorithm committed Jul 24, 2024
2 parents a67e045 + 6b3e716 commit ddb01d3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion metaphor/unity_catalog/profile/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def get_value_from_row(key: str) -> Optional[float]:
None,
)
if value:
if value == "NULL":
if value in ["NULL", "Infinity"]:
return None
return safe_float(value)
return value
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "metaphor-connectors"
version = "0.14.56"
version = "0.14.57"
license = "Apache-2.0"
description = "A collection of Python-based 'connectors' that extract metadata from various sources to ingest into the Metaphor app."
authors = ["Metaphor <[email protected]>"]
Expand Down
3 changes: 1 addition & 2 deletions tests/unity_catalog/profile/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
{
"distinctValueCount": 1234.0,
"fieldPath": "col2",
"maxValue": 9999.0,
"minValue": -9999.0
"maxValue": 9999.0
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions tests/unity_catalog/profile/test_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async def test_extractor(
mock_col2_stats = [
SimpleNamespace(info_name="distinct_count", info_value="1234"),
SimpleNamespace(info_name="max", info_value="9999"),
SimpleNamespace(info_name="min", info_value="-9999"),
SimpleNamespace(info_name="min", info_value="Infinity"),
SimpleNamespace(info_name="num_nulls", info_value="NULL"),
]

Expand Down Expand Up @@ -184,7 +184,7 @@ async def test_should_handle_exception_column_stat(
mock_col2_stats = [
SimpleNamespace(info_name="distinct_count", info_value="1234"),
SimpleNamespace(info_name="max", info_value="9999"),
SimpleNamespace(info_name="min", info_value="-9999"),
SimpleNamespace(info_name="min", info_value="Infinity"),
SimpleNamespace(info_name="num_nulls", info_value="NULL"),
]

Expand Down

0 comments on commit ddb01d3

Please sign in to comment.