fix: Add timestamp parsing logic to JSON flattener#19686
Merged
kodiakhq[bot] merged 3 commits intomainfrom Nov 25, 2024
Merged
Conversation
erezrokah
approved these changes
Nov 25, 2024
erezrokah
approved these changes
Nov 25, 2024
kodiakhq bot
pushed a commit
that referenced
this pull request
Nov 25, 2024
#### Summary Transformer plugins are currently owned by data framework. This should unblock my review to #19686
kodiakhq bot
pushed a commit
that referenced
this pull request
Nov 25, 2024
🤖 I have created a release *beep* *boop* --- ## [1.1.0](plugins-transformer-jsonflattener-v1.0.3...plugins-transformer-jsonflattener-v1.1.0) (2024-11-25) ### Features * Add license information ([#19642](#19642)) ([a81edd6](a81edd6)) ### Bug Fixes * Add timestamp parsing logic to JSON flattener ([#19686](#19686)) ([ec27826](ec27826)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.69.0 ([#19677](#19677)) ([84cd7bd](84cd7bd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes https://github.com/cloudquery/cloudquery-issues/issues/2821
The timestamp field parsing logic on the JSON Flattener is just plain wrong: it was assuming that timestamp type subfields would be of type
time.Time, and this is not the case.The
TypeSchemareports timestamp types astimestamp[us, tz=UTC], but in practice I've already seen two slightly different date formats.Therefore, in this change, for timestamp subfields, if the underlying type of the subfield is
string, we will try to parse the string datetime using a variety of popular formats, including some reported by our customers and some seen in the AWS plugin in tests.