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

Add column type timestamp with time zone to athena adapter #347

Merged
merged 1 commit into from Sep 21, 2021

Conversation

til
Copy link
Contributor

@til til commented Jun 2, 2021

Previously when running an Athena query with e.g. from_iso8601_timestamp(), it would not be automatically rendered as a linechart, because the column type was not recognized and parsed as timestamp.

The subsequent call to ActiveSupport::TimeZone['Etc/UTC'].parse will convert the value to UTC when the string value contains a different timezone than UTC:

irb(main):001:0> ActiveSupport::TimeZone['Etc/UTC'].parse('2021-05-05 09:00:00 CEST')
=> Wed, 05 May 2021 07:00:00 UTC +00:00

Or would you prefer to keep the time zone? Then I could change it to use e.g. DateTime.parse.

@ankane
Copy link
Owner

ankane commented Jun 30, 2021

Thanks for another PR @til. Will test this out with #353.

@ankane ankane merged commit 41d2cd8 into ankane:master Sep 21, 2021
@ankane
Copy link
Owner

ankane commented Sep 21, 2021

Thanks for this one as well!

@til til deleted the athena-add-timestamp-with-time-zone branch September 21, 2021 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants