This commit is contained in:
gowthaman.b 2023-06-16 14:26:26 +05:30
parent db05f0a059
commit 6e9b0bcc4f
2 changed files with 3 additions and 3 deletions

View File

@ -11,9 +11,9 @@ Steps
* required `--output <dir of output csvs>`
* (optional) to merge all json to single csv `--single`
* required `--schema <path to schema.json>`
* (optional) # of records to check records for all headers `--metadata <number or records>` defaults to 100
* (optional) # of records to check records for all headers `--metadata <number or records>` defaults to 1000
* required `--join-column <column name from first level to use as merge column>`
* required `--name <base-name of data`
* required `--name <base-name of data>`
* example
* `python3 main.py --input /var/tmp/input --output /var/tmp/outputs --schema /var/tmp/schema.json --name transactions --single --metadata 1000 --join-column origin_id`

View File

@ -12,7 +12,7 @@ parser.add_argument("--input", help="folder containing input json(s)", required=
parser.add_argument("--output", help="folder to place csv", required=True, type=pathlib.Path)
parser.add_argument("--schema", help="schema json", required=True, type=pathlib.Path)
parser.add_argument("--single", action="store_true", help="merge all json files to single output csv")
parser.add_argument("--metadata", type=int, help="how many records to parse for building metadata", default=100)
parser.add_argument("--metadata", type=int, help="how many records to parse for building metadata", default=1000)
parser.add_argument("--join-column", help="join column from top-level to merge nested json", required=True)
parser.add_argument("--name", help="join column from top-level to merge nested json", required=True)