farha tarannum
farha tarannum

Reputation: 11

Getting null when trying to read a column with value '-' from aws glue catalog table

I am reading an Athena table which has a column name br_book_gl1 which has values as '-' and '+'. Athena Source data I am getting the '+'value when reading it as glue catalog table but for '-' values, I am getting null. The datatype is String in Athena table and I am using the below code: gluecontext.getCatalogSource(database = database, tableName = tableName).getDynamicFrame().toDF() .select(col("br_book_gl1").as("GainLossSign"))

output

Upvotes: 1

Views: 484

Answers (1)

Carlos Bolanos
Carlos Bolanos

Reputation: 11

Athena can only read table names with alphanumeric or underscore characters.

See this page for more info: https://docs.aws.amazon.com/glue/latest/dg/console-tables.html?icmpid=docs_glue_console.

Upvotes: 1

Related Questions