Trying to upload assets and asset hierarchy following the documentation available online is not working as shown.
Trying to upload an ndjson with assets and hierarchy with the following files:
myHierarchy.Manifest.yaml
kind: Assets
type: dataSet
dataSetExternalId: compressor_demo_datasetmyHierarchy.Assets.yaml
{"externalId": "Compressor_Demo", "name": "Compressor Demo", "depth": 0}
{"externalId": "Compressor_Demo_Geonosis","name": "Geonosis", "parentExternalId": "Compressor_Demo", "depth": 1}
{"externalId": "Compressor_Demo_Geonosis_Central-Utilities","name": "Central Utilities", "parentExternalId": "Compressor_Demo_Geonosis", "depth": 2}
{"externalId": "Central-UtilitiesCompressedAir_Cell","name": "Compressed Air", "parentExternalId": "Compressor_Demo_Geonosis_Central-Utilities", "depth": 3}
{"externalId": "AirCompressor1_Central-UtilitiesCompressedAir_Cell", "name": "Air Compressor 1", "parentExternalId": "Central-UtilitiesCompressedAir_Cell", "depth": 4}
{"externalId": "AirCompressor2_Central-UtilitiesCompressedAir_Cell", "name": "Air Compressor 2", "parentExternalId": "Central-UtilitiesCompressedAir_Cell", "depth": 4}
{"externalId": "IngersollRand_42", "name": "IngersollRand_42", "parentExternalId": "AirCompressor1_Central-UtilitiesCompressedAir_Cell", "depth": 5}
{"externalId": "KaeserKompressoren_23", "name": "KaeserKompressoren_23", "parentExternalId": "AirCompressor2_Central-UtilitiesCompressedAir_Cell", "depth": 5}
{"externalId": "IngersollRand_42", "name": "IngersollRand_42", "parentExternalId": "AirCompressor1_Central-UtilitiesCompressedAir_Cell", "depth": 5}
{"externalId": "KaeserKompressoren_23", "name": "KaeserKompressoren_23", "parentExternalId": "AirCompressor2_Central-UtilitiesCompressedAir_Cell", "depth": 5}
{"externalId": "IngersollRand_42", "name": "IngersollRand_42", "parentExternalId": "AirCompressor1_Central-UtilitiesCompressedAir_Cell", "depth": 5}
{"externalId": "KaeserKompressoren_23", "name": "KaeserKompressoren_23", "parentExternalId": "AirCompressor2_Central-UtilitiesCompressedAir_Cell", "depth": 5}
{"externalId": "IngersollRand_42", "name": "IngersollRand_42", "parentExternalId": "AirCompressor1_Central-UtilitiesCompressedAir_Cell", "depth": 5}
{"externalId": "KaeserKompressoren_23", "name": "KaeserKompressoren_23", "parentExternalId": "AirCompressor2_Central-UtilitiesCompressedAir_Cell", "depth": 5}dataset.Manifest.yaml
kind: Assets
type: dataSet
dataSetExternalId: compressor_demo_datasetwhen running the upload command as described on the documentation an error message (full message attached as txt file) appears:
cdf data upload dir "kalypso-16/input_directory/" --verboseerror:
ERROR (ToolkitRuntimeError): An error occurred during execution: ValidationError 1 validation error for tagged-union[NodeRequest,EdgeRequest]
Unable to extract tag using discriminator 'instance_type' | 'instanceType' [type=union_tag_not_found, input_value={'externalId': 'Compresso...rnalId': '', 'depth': 1},
input_type=dict]
For further information visit https://errors.pydantic.dev/2.13/v/union_tag_not_found
Check the
documentation
Ask the
Community
Take a look
at
Academy
Cognite
Status
Page
Contact
Cognite Support
