-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New --remove-empty-schema-columns flag to flatten
Original work done by @Bjwebb #241 OpenDataServices/cove#1019
- Loading branch information
Showing
13 changed files
with
127 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$ flatten-tool flatten --remove-empty-schema-columns --root-list-path=cafe --main-sheet-name=cafe --schema=examples/receipt/cafe.schema examples/flatten/remove-empty-schema-columns/input.json -o examples/flatten/remove-empty-schema-columns/actual |
3 changes: 3 additions & 0 deletions
3
examples/flatten/remove-empty-schema-columns/expected/cafe.csv
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
id,name | ||
CAFE-HEALTH,Healthy Cafe | ||
CAFE-VEG,Vegetarian Cafe |
6 changes: 6 additions & 0 deletions
6
examples/flatten/remove-empty-schema-columns/expected/table.csv
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
id,table/0/id,table/0/number | ||
CAFE-HEALTH,TABLE-1,1 | ||
CAFE-HEALTH,TABLE-2,2 | ||
CAFE-HEALTH,TABLE-3,3 | ||
CAFE-VEG,TABLE-16,16 | ||
CAFE-VEG,TABLE-17,17 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"cafe": [ | ||
{ | ||
"id": "CAFE-HEALTH", | ||
"name": "Healthy Cafe", | ||
"table": [ | ||
{ | ||
"id": "TABLE-1", | ||
"number": "1" | ||
}, | ||
{ | ||
"id": "TABLE-2", | ||
"number": "2" | ||
}, | ||
{ | ||
"id": "TABLE-3", | ||
"number": "3" | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "CAFE-VEG", | ||
"name": "Vegetarian Cafe", | ||
"table": [ | ||
{ | ||
"id": "TABLE-16", | ||
"number": "16" | ||
}, | ||
{ | ||
"id": "TABLE-17", | ||
"number": "17" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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