ADF doesn't directly modify files but allows you to read data from a source, transform it, and then output it to a destination. Then develop a Databricks notebook that reads your JSON file, performs the necessary transformation by adding the metadata, and then writes the modified JSON back to the desired location.
import json
# Simulate reading a JSON file
data = [
{"Address1": None, "Address2": None, "AddressCity": None, "ApprovedDate": None}
]
# Add metadata
modified_data = {
"ObjectClass": "ProcurementCompanyData",
"RowData": data
}
# Write the modified JSON to a file (or back to a storage service)
with open('modified_data.json', 'w') as f:
json.dump(modified_data, f, indent=4)