-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Chore] tuning piperider cli startup speed (#869)
* All blank implementation for CloudConnectorHelper Signed-off-by: Ching Yi, Chan <[email protected]> * implementation all methods Signed-off-by: Ching Yi, Chan <[email protected]> * Migration to CloudConnectorHelper Signed-off-by: Ching Yi, Chan <[email protected]> * Move validator Signed-off-by: Ching Yi, Chan <[email protected]> * Refactoring: dbt utils Signed-off-by: Ching Yi, Chan <[email protected]> * reduce import time in event package Signed-off-by: Ching Yi, Chan <[email protected]> * reduce assertion import time Signed-off-by: Ching Yi, Chan <[email protected]> * Optimzation configuration with dbt-utils Signed-off-by: Ching Yi, Chan <[email protected]> * Refactoring: compare_with_recipe Signed-off-by: Ching Yi, Chan <[email protected]> * Refactoring: run command Signed-off-by: Ching Yi, Chan <[email protected]> * fix lints Signed-off-by: Ching Yi, Chan <[email protected]> --------- Signed-off-by: Ching Yi, Chan <[email protected]>
- Loading branch information
Showing
7 changed files
with
351 additions
and
196 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import io | ||
from typing import Union | ||
|
||
|
||
class DbtUtil: | ||
|
||
@staticmethod | ||
def get_dbt_project_path(dbt_project_dir: str = None, no_auto_search: bool = False, | ||
recursive: bool = True) -> str: | ||
import piperider_cli.dbtutil as u | ||
return u.get_dbt_project_path(dbt_project_dir=dbt_project_dir, no_auto_search=no_auto_search, | ||
recursive=recursive) | ||
|
||
@staticmethod | ||
def read_dbt_resources(source: Union[str, io.TextIOWrapper, list]): | ||
import piperider_cli.dbtutil as u | ||
return u.read_dbt_resources(source=source) | ||
|
||
@staticmethod | ||
def load_dbt_project(path: str): | ||
import piperider_cli.dbtutil as u | ||
return u.load_dbt_project(path) | ||
|
||
@staticmethod | ||
def load_dbt_profile(path: str): | ||
import piperider_cli.dbtutil as u | ||
return u.load_dbt_profile(path) | ||
|
||
@staticmethod | ||
def load_credential_from_dbt_profile(dbt_profile, profile_name, target_name): | ||
import piperider_cli.dbtutil as u | ||
return u.load_credential_from_dbt_profile(dbt_profile=dbt_profile, profile_name=profile_name, | ||
target_name=target_name) |
Oops, something went wrong.