-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(config): config implemnetation errors.
- Loading branch information
Showing
5 changed files
with
67 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from dataclasses import dataclass | ||
|
||
|
||
@dataclass(frozen=True) | ||
class TableConfig: | ||
"""Hive Table Configuration.""" | ||
|
||
bucket: str | ||
table: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from dataclasses import dataclass | ||
from typing import Any | ||
|
||
|
||
@dataclass(frozen=True) | ||
class IcebergConfig: | ||
"""Iceberg Configuration.""" | ||
|
||
compact: bool = True | ||
expire_snapshots: bool = True | ||
rewrite_manifest: bool = True | ||
compaction_strategy: str = "binpack" | ||
compaction_options: dict[str, Any] | None = None | ||
sort_order: str | None = None | ||
snapshot_max_age_days: int = 14 | ||
min_snapshots: int = 50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from dataclasses import dataclass | ||
|
||
|
||
@dataclass(frozen=True) | ||
class Credentials: | ||
"""Credentials convention to use for any external services. | ||
Args: | ||
username (str): Username. | ||
password (str): Password. | ||
Note: the password is stored as a string. Don't log it. | ||
""" | ||
|
||
username: str | None | ||
password: str | None | ||
|
||
|
||
@dataclass(frozen=True) | ||
class SchemaRegistryConfig: | ||
"""Schema Registry Configuration.""" | ||
|
||
url: str | ||
credentials: Credentials | ||
|
||
|
||
@dataclass | ||
class KafkaConfig(frozen=True): | ||
"""Kafka Configuration.""" | ||
|
||
bootstrap_servers: str | ||
credentials: Credentials | ||
checkpoints_bucket: str | ||
starting_offset: str = "earliest" | ||
auth_protocol: str = "SASL_SSL" | ||
auth_mechanism: str = "PLAIN" | ||
schema_registry: SchemaRegistryConfig | None |