Here are some notes as to what happened during the hackolade cli input/output process. The Steps are separated by the use of jsonschemacompliance
, between full
and extended
.
Note
All operations are run from within the root folder.
Refer to hackolade_experiment.hck.json
Note
Files are located inside of the full
folder.
hackolade forweng \
--outputtype jsonschema \
--format js \
--jsonschemacompliance full \
--skipUndefinedLevel true \
--structuredpath false \
--path full/1_hack-to-json/ \
--model hackolade_experiment.hck.json \
--enable-logging
Result: Refer to content in full/1_hack_to_json
Note
Before this step, a copy of the original source hackolade file was placed in the full/2_json-to-hack
folder.
hackolade revengjson \
--model full/2_json-to-hack/hackolade_experiment.hck.json \
--target MONGODB \
--targetVersion "v7.x" \
--files "full/1_hack-to-json/hackolade_experiment/experimental_database/\*.json" \
--container experimental_database \
--conflictresolution merge \
--maxerdentityboxes true \
--enable-logging
Result: hackolade_experiment.hck.json
in full/2_json-to-hack
Caution
The Key is missing the attribute name. Index settings are retained, but the Key is missed
Caution
The Technical name of the model has somehow reset to “new_model” without any clear reason
hackolade forweng \
--outputtype jsonschema \
--format js \
--jsonschemacompliance full \
--skipUndefinedLevel true \
--structuredpath false \
--path full/3_hack-to-json-again/ \
--model full/2_json-to-hack/hackolade_experiment.hck.json \
--enable-logging
hackolade forweng \
--outputtype script \
--format shell \
--jsonschemacompliance full \
--skipUndefinedLevel true \
--structuredpath false \
--path full/4_hack-to-mongosh \
--model full/2_json-to-hack/hackolade_experiment.hck.json \
--enable-logging
Caution
Missing index names (as expected, at this point)
hackolade forweng \
--outputtype jsonschema \
--format js \
--jsonschemacompliance extended \
--skipUndefinedLevel true \
--structuredpath false \
--path extended/1_hack-to-json/ \
--model hackolade_experiment.hck.json \
--enable-logging
Result: in extended/1_hack-to-json
Note
Before this step, a copy of the original source hackolade file was placed in the extended/2_json-to-hack
folder.
hackolade revengjson \
--model extended/2_json-to-hack/hackolade_experiment.hck.json \
--target MONGODB \
--targetVersion "v7.x" \
--files "extended/1_hack-to-json/hackolade_experiment/experimental_database/\*.json" \
--container experimental_database \
--conflictresolution merge \
--maxerdentityboxes true \
--enable-logging
Caution
The key for each index is entirely missing now. Index settings appear to be retained.
Caution
The Technical name of the model has somehow reset to “new_model” without any clear reason
hackolade forweng \
--outputtype jsonschema \
--format js \
--jsonschemacompliance extended \
--skipUndefinedLevel true \
--structuredpath false \
--path extended/3_hack-to-json-again/ \
--model extended/2_json-to-hack/hackolade_experiment.hck.json \
--enable-logging
hackolade forweng \
--outputtype script \
--format shell \
--jsonschemacompliance extended \
--skipUndefinedLevel true \
--structuredpath false \
--path extended/4_hack-to-mongosh \
--model extended/2_json-to-hack/hackolade_experiment.hck.json \
--enable-logging
Caution
The resultant script is missing the index key, making this invalid