moj-analytical-services / etl_manager

A python package to create a database on the platform using our moj data warehousing framework
21 stars 8 forks source link

meta.py - changes to to_dict & write_to_json functions #147

Closed lalithanagarur closed 1 year ago

lalithanagarur commented 1 year ago

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.