79102450

Date: 2024-10-18 14:18:23
Score: 1
Natty:
Report link

Possible duplicate of: How to Create Dataframe from AWS Athena using Boto3 get_query_results method

AWS Glue doesn't have a native way of reading a view from data catalog. I'd suggest the same solution as the most upvoted answer.

import awswrangler as wr  
df = wr.athena.read_sql_query(sql="SELECT * FROM <table_name_in_Athena>", database="<database_name>")

Note that it will load the view as a pandas dataframe. Be careful if its too large.

Reasons:
  • Blacklisted phrase (0.5): upvote
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Diego Lottermann