-
Notifications
You must be signed in to change notification settings - Fork 54
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
Fix some warnings and add command line parsing for unordered field keys #330
Conversation
Codecov Report
@@ Coverage Diff @@
## master #330 +/- ##
==========================================
+ Coverage 71.06% 71.10% +0.04%
==========================================
Files 35 35
Lines 1441 1450 +9
Branches 115 120 +5
==========================================
+ Hits 1024 1031 +7
- Misses 417 419 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This fixes #103 |
| --lhs=<path> LHS File path or BigQuery table | ||
| --rhs=<path> RHS File path or BigQuery table | ||
| --output=<output> File path prefix for output | ||
| --ignore=<keys> ',' separated field list to ignore | ||
| --unordered=<keys> ',' separated field list to treat as unordered | ||
| --unorderedFieldKey=<key> ',' separated list of keys for fields which are unordered nested records. Mappings use '->' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking of switching this to :
delimited
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like : better than ->
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to confirm, this was already available in scala, we're just adding to CLI? if so, looks good, though I prefer the different delimiter
| --lhs=<path> LHS File path or BigQuery table | ||
| --rhs=<path> RHS File path or BigQuery table | ||
| --output=<output> File path prefix for output | ||
| --ignore=<keys> ',' separated field list to ignore | ||
| --unordered=<keys> ',' separated field list to treat as unordered | ||
| --unorderedFieldKey=<key> ',' separated list of keys for fields which are unordered nested records. Mappings use '->' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like : better than ->
@@ -240,6 +242,15 @@ class BigDiffyTest extends PipelineSpec { | |||
keyValues.toString shouldBe "foo_bar" | |||
} | |||
|
|||
"BigDiffy unorderedKeysMap" should "work with multiple unordered keys" in { | |||
val keyMappings = List("record.nested_record->key", "record.other_nested_record->other_key") | |||
val unorderdKeys = BigDiffy.unorderedKeysMap(keyMappings) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: typo, unordered
Don't know if this is a good idea or not but it was annoying to me to have to import ratatool as a dependency just to use this feature (and therefore commit diff jobs into a pipeline repo). Basically allows
->
demarcated field key mappings for nested records that can be ',' delimited to specify multiple field mappings. Let me know what you think