Skip to content
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions packages/gooddata-sdk/src/gooddata_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
)
from gooddata_sdk.catalog.data_source.entity_model.data_source import (
CatalogDataSource,
CatalogDataSourceAiLakehouse,
CatalogDataSourceBigQuery,
CatalogDataSourceDatabricks,
CatalogDataSourceGdStorage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,3 +318,10 @@ class CatalogDataSourceGdStorage(CatalogDataSource):
type: str = "GDSTORAGE"
schema: str = ""
credentials: Credentials = field(factory=_NoCredentials, repr=False)


@define(kw_only=True, eq=False)
class CatalogDataSourceAiLakehouse(CatalogDataSource):
type: str = "AILAKEHOUSE"
schema: str = ""
credentials: Credentials = field(factory=_NoCredentials, repr=False)
24 changes: 24 additions & 0 deletions packages/gooddata-sdk/tests/catalog/test_catalog_data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from gooddata_sdk import (
BasicCredentials,
CatalogDataSource,
CatalogDataSourceAiLakehouse,
CatalogDataSourceBigQuery,
CatalogDataSourceDatabricks,
CatalogDataSourceMariaDb,
Expand Down Expand Up @@ -892,3 +893,26 @@ def test_jdbc_urls_creation(
),
)
assert data_source.url == url


def test_ailakehouse_datasource_instantiation():
ds = CatalogDataSourceAiLakehouse(id="ailakehouse-1", name="AI Lakehouse")
assert ds.id == "ailakehouse-1"
assert ds.name == "AI Lakehouse"
assert ds.type == "AILAKEHOUSE"
assert ds.schema == ""
assert ds.url is None


def test_ailakehouse_datasource_from_api():
entity = {
"id": "ailakehouse-1",
"attributes": {
"name": "AI Lakehouse",
"type": "AILAKEHOUSE",
"schema": "",
},
}
ds = CatalogDataSourceAiLakehouse.from_api(entity)
assert ds.id == "ailakehouse-1"
assert ds.type == "AILAKEHOUSE"
Loading