Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 96
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-a4c91d7713c87ff56f393709ecda79c31ce7ceee1507b9421fb92da28489a073.yml
openapi_spec_hash: 57b85e9e6909c8901b30249ac2d8bfa0
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-89441bb57f08015241a214ce4e51c76bac21e202f1f9cdc0a90e91c4ccbe4ff0.yml
openapi_spec_hash: 2642d0ba1cbd7daa3dd69af0d3076a26
config_hash: 575ddfb316392e5f7f3c7b7999796a03
13 changes: 11 additions & 2 deletions src/asktable/types/datasource_retrieve_runtime_meta_response.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Dict, List
from typing_extensions import Literal

from .._models import BaseModel

__all__ = ["DatasourceRetrieveRuntimeMetaResponse"]
__all__ = ["DatasourceRetrieveRuntimeMetaResponse", "Schema"]


class Schema(BaseModel):
name: str
"""表名称数据"""

type: Literal["table", "view"]
"""表的类型"""


class DatasourceRetrieveRuntimeMetaResponse(BaseModel):
schemas: Dict[str, List[str]]
schemas: Dict[str, List[Schema]]
"""元数据"""
5 changes: 4 additions & 1 deletion src/asktable/types/datasources/meta_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

from typing import Dict, List, Optional
from typing_extensions import Required, TypedDict
from typing_extensions import Literal, Required, TypedDict

__all__ = ["MetaCreateParams", "Meta", "MetaSchemas", "MetaSchemasTables", "MetaSchemasTablesFields"]

Expand Down Expand Up @@ -44,6 +44,9 @@ class MetaSchemasTables(TypedDict, total=False):

fields: Dict[str, MetaSchemasTablesFields]

table_type: Literal["table", "view"]
"""table type"""


class MetaSchemas(TypedDict, total=False):
name: Required[str]
Expand Down
5 changes: 4 additions & 1 deletion src/asktable/types/datasources/meta_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

from typing import Dict, List, Optional
from typing_extensions import Required, TypedDict
from typing_extensions import Literal, Required, TypedDict

__all__ = ["MetaUpdateParams", "Meta", "MetaSchemas", "MetaSchemasTables", "MetaSchemasTablesFields"]

Expand Down Expand Up @@ -42,6 +42,9 @@ class MetaSchemasTables(TypedDict, total=False):

fields: Dict[str, MetaSchemasTablesFields]

table_type: Literal["table", "view"]
"""table type"""


class MetaSchemas(TypedDict, total=False):
name: Required[str]
Expand Down
4 changes: 4 additions & 0 deletions src/asktable/types/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from typing import Dict, Optional
from datetime import datetime
from typing_extensions import Literal

from .._models import BaseModel

Expand Down Expand Up @@ -58,6 +59,9 @@ class SchemasTables(BaseModel):
origin_desc: str
"""table description from database"""

table_type: Optional[Literal["table", "view"]] = None
"""table type"""


class Schemas(BaseModel):
curr_desc: str
Expand Down
4 changes: 4 additions & 0 deletions tests/api_resources/datasources/test_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def test_method_create_with_all_params(self, client: Asktable) -> None:
"visibility": True,
}
},
"table_type": "table",
}
},
}
Expand Down Expand Up @@ -158,6 +159,7 @@ def test_method_update_with_all_params(self, client: Asktable) -> None:
"visibility": True,
}
},
"table_type": "table",
}
},
}
Expand Down Expand Up @@ -276,6 +278,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncAsktable)
"visibility": True,
}
},
"table_type": "table",
}
},
}
Expand Down Expand Up @@ -385,6 +388,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncAsktable)
"visibility": True,
}
},
"table_type": "table",
}
},
}
Expand Down