Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Athena queries fail when json parsing error occurs #635

Closed
sruti opened this issue Dec 4, 2019 · 3 comments
Closed

Athena queries fail when json parsing error occurs #635

sruti opened this issue Dec 4, 2019 · 3 comments

Comments

@sruti
Copy link
Sponsor Contributor

sruti commented Dec 4, 2019

Athena queries were failing with the following error:
HIVE_CURSOR_ERROR: Row is not a valid JSON Object - JSONException: Unterminated string at 198 [character 199 line 1]

The offending file was cut off mid-line and looked like this:
image

Temporary fix was to replace the file in s3 with the line removed.

Possible permanent fixes:

  • Set up alerts for Athena query failures
  • Modify lambda function to detect json errors before gzipping
@jflasher
Copy link
Contributor

jflasher commented Dec 8, 2019

Would be great to alarm on this! I just looked and CloudWatch does not provide any native alarms for Athena. I think we may be able to modify Fluffy to watch out for this? It could probably look something like https://github.com/openaq/openaq-api/pull/424/files#diff-3467d50aec9f3331a916f24fa115bdacR288 where we check over the recent executions and see if anything is failing. Once we allow user submitted queries for Athena, this may make less sense though, since we don't really care if users are creating queries that fail, we only care about the system ones. There may also just be a way to use the API to loop over /locations and see when the last updated was, that might be easiest.

@majesticio
Copy link
Contributor

@russbiggs is this still a bug? I have not used Athena in this context yet

@russbiggs
Copy link
Member

This has been replaced by the new ingest process i believe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants