Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use configured user in env var instead of "user" for Trino #3254

Merged
merged 2 commits into from
Sep 29, 2022
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def pull_latest_from_table_or_query(
created_timestamp_column: Optional[str],
start_date: datetime,
end_date: datetime,
user: str = "user",
user: Optional[str] = None,
auth: Optional[Authentication] = None,
http_scheme: Optional[str] = None,
) -> TrinoRetrievalJob:
Expand All @@ -176,7 +176,6 @@ def pull_latest_from_table_or_query(
timestamps.append(created_timestamp_column)
timestamp_desc_string = " DESC, ".join(timestamps) + " DESC"
field_string = ", ".join(join_key_columns + feature_name_columns + timestamps)

client = _get_trino_client(
config=config, user=user, auth=auth, http_scheme=http_scheme
)
Expand Down Expand Up @@ -212,7 +211,7 @@ def get_historical_features(
registry: Registry,
project: str,
full_feature_names: bool = False,
user: str = "user",
user: Optional[str] = None,
auth: Optional[Authentication] = None,
http_scheme: Optional[str] = None,
) -> TrinoRetrievalJob:
Expand Down Expand Up @@ -303,7 +302,7 @@ def pull_all_from_table_or_query(
timestamp_field: str,
start_date: datetime,
end_date: datetime,
user: str = "user",
user: Optional[str] = None,
auth: Optional[Authentication] = None,
http_scheme: Optional[str] = None,
) -> RetrievalJob:
Expand Down Expand Up @@ -375,7 +374,10 @@ def _upload_entity_df_and_get_entity_schema(


def _get_trino_client(
config: RepoConfig, user: str, auth: Optional[Any], http_scheme: Optional[str]
config: RepoConfig,
user: Optional[str],
auth: Optional[Any],
http_scheme: Optional[str],
) -> Trino:
client = Trino(
user=user,
Expand Down