Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore: Format python codes
Signed-off-by: derek1032 <dchang@health2sync.com>
  • Loading branch information
derek1032 committed Aug 25, 2022
commit f8e980230e1cb0feb944e844749a82ef6d415717
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class AthenaOfflineStoreConfig(FeastConfigBaseModel):

database: StrictStr
""" Athena database name """

workgroup: StrictStr
""" Athena workgroup name """

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self, project_name: str, *args, **kwargs):
if os.environ.get("ATHENA_S3_BUCKET_NAME")
else "feast-integration-tests"
)

self.client = aws_utils.get_athena_data_client(region)
self.s3 = aws_utils.get_s3_resource(region)
self.offline_store_config = AthenaOfflineStoreConfig(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from tests.integration.feature_repos.integration_test_repo_config import (
IntegrationTestRepoConfig,
)
from feast.infra.offline_stores.contrib.athena_offline_store.tests.data_source import (
AthenaDataSourceCreator,
)
from tests.integration.feature_repos.integration_test_repo_config import (
IntegrationTestRepoConfig,
)

FULL_REPO_CONFIGS = [
IntegrationTestRepoConfig(
Expand Down
20 changes: 12 additions & 8 deletions sdk/python/feast/infra/utils/aws_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,9 @@ def drop_temp_table(
athena_data_client, data_source: str, database: str, workgroup: str, temp_table: str
):
query = f"DROP TABLE `{database}.{temp_table}`"
execute_athena_query_async(athena_data_client, data_source, database, workgroup, query)
execute_athena_query_async(
athena_data_client, data_source, database, workgroup, query
)


def execute_athena_query(
Expand Down Expand Up @@ -793,7 +795,9 @@ def execute_athena_query(
)
wait_for_athena_execution(athena_data_client, execution)
if temp_table is not None:
drop_temp_table(athena_data_client, data_source, database, workgroup, temp_table)
drop_temp_table(
athena_data_client, data_source, database, workgroup, temp_table
)

return execution["QueryExecutionId"]

Expand Down Expand Up @@ -889,13 +893,13 @@ def execute_athena_query_and_unload_to_s3(
"""

execute_athena_query(
athena_data_client=athena_data_client,
data_source=data_source,
database=database,
workgroup=workgroup,
query=query,
athena_data_client=athena_data_client,
data_source=data_source,
database=database,
workgroup=workgroup,
query=query,
temp_table=temp_table,
)
)


def upload_df_to_athena(
Expand Down