Last active
July 23, 2020 09:57
-
-
Save arihantsurana/7172e772e0622a25560aa0479b1cd123 to your computer and use it in GitHub Desktop.
An example for using hip_data_tools for Athena to Dataframe utility
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
from hip_data_tools.aws.common import AwsConnectionSettings | |
from hip_data_tools.etl.athena_to_dataframe import AthenaToDataFrameSettings, AthenaToDataFrame | |
aws_conn = AwsConnectionSettings( | |
region="ap-southeast-2", | |
secrets_manager=None, | |
profile="default") # to access the default aws profile on your machine | |
etl = AthenaToDataFrame( | |
settings=AthenaToDataFrameSettings( | |
source_database="my_athena_database", | |
source_table="my_table", | |
source_connection_settings=aws_conn | |
) | |
) | |
df = etl.get_all_files_as_dataframe() | |
df.info() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment