-
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.
Merge pull request #51 from DalgoT4D/warehouse-client-interface
interface for bigquery and postgres warehouses
- Loading branch information
Showing
15 changed files
with
92 additions
and
13 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
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
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
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
Empty file.
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,59 @@ | ||
from abc import ABC, abstractmethod | ||
|
||
|
||
class WarehouseInterface(ABC): | ||
@abstractmethod | ||
def execute(self, statement: str): | ||
pass | ||
|
||
@abstractmethod | ||
def get_tables(self, schema: str): | ||
pass | ||
|
||
@abstractmethod | ||
def get_schemas(self): | ||
pass | ||
|
||
@abstractmethod | ||
def get_table_data(self, schema: str, table: str, limit: int): | ||
pass | ||
|
||
@abstractmethod | ||
def get_table_columns(self, schema: str, table: str): | ||
pass | ||
|
||
@abstractmethod | ||
def get_columnspec(self, schema: str, table_id: str): | ||
pass | ||
|
||
@abstractmethod | ||
def get_json_columnspec(self, schema: str, table: str, column: str): | ||
pass | ||
|
||
@abstractmethod | ||
def ensure_schema(self, schema: str): | ||
pass | ||
|
||
@abstractmethod | ||
def ensure_table(self, schema: str, table: str, columns: list): | ||
pass | ||
|
||
@abstractmethod | ||
def drop_table(self, schema: str, table: str): | ||
pass | ||
|
||
@abstractmethod | ||
def insert_row(self, schema: str, table: str, row: dict): | ||
pass | ||
|
||
@abstractmethod | ||
def json_extract_op(self, json_column: str, json_field: str, sql_column: str): | ||
pass | ||
|
||
@abstractmethod | ||
def close(self): | ||
pass | ||
|
||
@abstractmethod | ||
def generate_profiles_yaml_dbt(self, project_name, default_schema): | ||
pass |
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