Athena Query Error

0

Getting these errors when I run a query in Athena following successful AWS glue crawler run, kindly help

HIVE_BAD_DATA: Error Parsing a column in the table: fieldValue should not be null This query ran against the ‘pbr’ database, unless qualified by the query.

HIVE_BAD_DATA: Error reading field value: For input string: "2023-02-23" This query ran against the ‘pbr’ database, unless qualified by the query.

Tes
gefragt vor 6 Monaten375 Aufrufe
1 Antwort
1
Akzeptierte Antwort

Hello,

Issue 1:

Error: HIVE_BAD_DATA: Error Parsing a column in the table: fieldValue should not be null This query ran against the ‘pbr’ database, unless qualified by the query.

This error usually occurs if there is a null value in your underlying data. I would suggest you to cross verify the datatypes and make sure there are no null values. Alternatively you can try to change the datatype to STRING and then cast it later.

Issue 2:

Error: HIVE_BAD_DATA: Error reading field value: For input string: "2023-02-23" This query ran against the ‘pbr’ database, unless qualified by the query.

Errors that specify an input string with a value occur under one of the following conditions:

  • The data type defined in the table definition doesn't match the actual source data.
  • A single field contains different types of data (for example, an integer value for one record and a decimal value for another record).

For resolution, please see [+] https://repost.aws/knowledge-center/athena-hive-bad-data-parsing-field-value

AWS
Ankur_J
beantwortet vor 6 Monaten
profile picture
EXPERTE
überprüft vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen