The dictionary created by the to_dict function will not contain the partitions key and primary key if the value is an empty object.
Added the argument 'always_key' to the to_dict function and write_to_json functions.
Default value of argument is set to False.
If always_key = False, no impact on the output.
If always_key = True and value is an empty object, the partitions key and primary key will be in the dictionary with a value of null.
This functionality is required to extract metadata in the expected format in the analytical-platform-data-engineering repo.
The dictionary created by the to_dict function will not contain the partitions key and primary key if the value is an empty object. Added the argument 'always_key' to the to_dict function and write_to_json functions. Default value of argument is set to False. If always_key = False, no impact on the output. If always_key = True and value is an empty object, the partitions key and primary key will be in the dictionary with a value of null. This functionality is required to extract metadata in the expected format in the analytical-platform-data-engineering repo.