Skip to content

Commit a938844

Browse files
committed
define snowflake catalog
1 parent f54d614 commit a938844

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
from typing import Union, Optional, Set, List
2+
3+
from pyiceberg.catalog import MetastoreCatalog, PropertiesUpdateSummary
4+
from pyiceberg.partitioning import PartitionSpec, UNPARTITIONED_PARTITION_SPEC
5+
from pyiceberg.schema import Schema
6+
from pyiceberg.table import SortOrder, UNSORTED_SORT_ORDER, Table, CommitTableRequest, CommitTableResponse
7+
from pyiceberg.typedef import Identifier, Properties, EMPTY_DICT
8+
9+
10+
class SnowflakeCatalog(MetastoreCatalog):
11+
def load_table(self, identifier: Union[str, Identifier]) -> Table:
12+
pass
13+
14+
def register_table(self, identifier: Union[str, Identifier], metadata_location: str) -> Table:
15+
pass
16+
17+
def drop_table(self, identifier: Union[str, Identifier]) -> None:
18+
pass
19+
20+
def rename_table(self, from_identifier: Union[str, Identifier], to_identifier: Union[str, Identifier]) -> Table:
21+
pass
22+
23+
def _commit_table(self, table_request: CommitTableRequest) -> CommitTableResponse:
24+
pass
25+
26+
def create_namespace(self, namespace: Union[str, Identifier], properties: Properties = EMPTY_DICT) -> None:
27+
pass
28+
29+
def drop_namespace(self, namespace: Union[str, Identifier]) -> None:
30+
pass
31+
32+
def list_tables(self, namespace: Union[str, Identifier]) -> List[Identifier]:
33+
pass
34+
35+
def list_namespaces(self, namespace: Union[str, Identifier] = ()) -> List[Identifier]:
36+
pass
37+
38+
def load_namespace_properties(self, namespace: Union[str, Identifier]) -> Properties:
39+
pass
40+
41+
def update_namespace_properties(self, namespace: Union[str, Identifier], removals: Optional[Set[str]] = None,
42+
updates: Properties = EMPTY_DICT) -> PropertiesUpdateSummary:
43+
pass
44+
45+
def create_table(self, identifier: Union[str, Identifier], schema: Union[Schema, "pa.Schema"],
46+
location: Optional[str] = None, partition_spec: PartitionSpec = UNPARTITIONED_PARTITION_SPEC,
47+
sort_order: SortOrder = UNSORTED_SORT_ORDER, properties: Properties = EMPTY_DICT) -> Table:
48+
pass
49+
50+
...

0 commit comments

Comments
 (0)