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

MongoDbToBigQuery - ISO standard for date and time #2132

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

OreOreDa
Copy link

We have noticed that the format of dates and timestamp are broken, compared to the mongodb fields, e.g. a date appears as "Mar 12, 2024, 3:05:34 AM", instead of the original ISO format

This PR fixes the issue, thanks !

Copy link
Contributor

@Abacn Abacn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix! Left a few comment.

@@ -119,7 +141,8 @@ public static Document getMongoDbDocument(String uri, String dbName, String coll
return doc;
}

public static TableRow getTableSchema(Document document, String userOption) {
public static TableRow getTableSchema(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a unit test for legacy / iso time format?

order = 2,
optional = true,
description = "Use legacy time format.",
helpText =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description is "use legacy time format" but the option name is "useIsoTimeFormat". The helpText (default is true) is also not true. Please fix.

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

Successfully merging this pull request may close these issues.

2 participants