Skip to content

Commit 47825a5

Browse files
committed
fix(gooddata-sdk): resolve ty + dbt + htmltest CI failures
Three small fixes uncovered by CI on the previous push: - `dataset.py` (gooddata-sdk): the new `type: Literal["NORMAL", "AUXILIARY"] | None` field on `CatalogDeclarativeDataset` shadowed the builtin `type` inside the class body, so `type[DeclarativeDataset]` in `client_class()` resolved to the field (None) and tripped ty with `invalid-type-form`. Use `builtins.type[...]` (the same pattern `setting.py` and `identifier.py` already use) and import `builtins`. - `metrics.py` (gooddata-dbt): `attribute.source_column`, `label.source_column`, and `fact.source_column` are now `str | None` on the SDK side (AUXILIARY datasets carry synthetic entries with no physical column). Guard the `.lower()` calls so AUX entries are silently skipped instead of crashing. - `get_hll_type.md` and `ai-lake/analyze_statistics.md`: relative links to sibling pages were missing trailing slashes, which htmltest rejects ("target is a directory, href lacks trailing slash"). Added them. risk: low
1 parent ae8ef87 commit 47825a5

4 files changed

Lines changed: 15 additions & 7 deletions

File tree

docs/content/en/latest/administration/organization/get_hll_type.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Reads the organization-level `hyperLogLogType` setting. Returns the
1515
configured value (`"Native"` or `"Presto"`), or `None` when the setting
1616
is unset or carries an unrecognized value.
1717

18-
See [`set_hll_type`](../set_hll_type) for the meaning of each value and
18+
See [`set_hll_type`](../set_hll_type/) for the meaning of each value and
1919
when to choose `"Native"` versus `"Presto"`.
2020

2121
{{% parameters-block title="Returns"%}}

docs/content/en/latest/data/ai-lake/analyze_statistics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pre-aggregation table whose dimension attributes the platform will later
1818
resolve via filter pushdown.
1919

2020
The call returns immediately with an operation ID; the actual analyze
21-
runs asynchronously. Use [`get_operation`](../get_operation) or
22-
[`wait_for_operation`](../wait_for_operation) to poll for completion.
21+
runs asynchronously. Use [`get_operation`](../get_operation/) or
22+
[`wait_for_operation`](../wait_for_operation/) to poll for completion.
2323

2424
{{% parameters-block title="Parameters"%}}
2525

packages/gooddata-dbt/src/gooddata_dbt/dbt/metrics.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,18 @@ def get_entity_type(self, table_name: str, expression_entity: str) -> str:
8686
if table_id is not None and table_id.id.lower() == table_name.lower():
8787
attributes = dataset.attributes if dataset.attributes else []
8888
facts = dataset.facts if dataset.facts else []
89+
# `source_column` is optional on the SDK side — AUXILIARY
90+
# datasets carry synthetic attributes/labels/facts with no
91+
# physical column. Skip those entries here, since they have
92+
# no source column to match against.
8993
for attribute in attributes:
90-
if attribute.source_column.lower() == expression_entity_cmp:
94+
if attribute.source_column and attribute.source_column.lower() == expression_entity_cmp:
9195
result = "label"
9296
for label in attribute.labels:
93-
if label.source_column.lower() == expression_entity_cmp:
97+
if label.source_column and label.source_column.lower() == expression_entity_cmp:
9498
result = "label"
9599
for fact in facts:
96-
if fact.source_column.lower() == expression_entity_cmp:
100+
if fact.source_column and fact.source_column.lower() == expression_entity_cmp:
97101
result = "fact"
98102
for date_dataset in self.ldm.ldm.date_instances:
99103
if date_dataset.id.lower() == expression_entity_cmp:

packages/gooddata-sdk/src/gooddata_sdk/catalog/workspace/declarative_model/workspace/logical_model/dataset/dataset.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# (C) 2022 GoodData Corporation
22
from __future__ import annotations
33

4+
import builtins
45
from pathlib import Path
56
from typing import Literal
67

@@ -67,7 +68,10 @@ class CatalogDeclarativeDataset(Base):
6768
workspace_data_filter_references: list[CatalogDeclarativeWorkspaceDataFilterReferences] | None = None
6869

6970
@staticmethod
70-
def client_class() -> type[DeclarativeDataset]:
71+
def client_class() -> builtins.type[DeclarativeDataset]:
72+
# `builtins.type[...]` (not bare `type[...]`) because the class
73+
# defines a `type: Literal[...]` field that shadows the builtin
74+
# inside the class body, which trips ty.
7175
return DeclarativeDataset
7276

7377
def store_to_disk(self, datasets_folder: Path, sort: bool = False) -> None:

0 commit comments

Comments
 (0)