Using a map in a Data Integration Job
Create a Job to convert a JSON file into a CSV.
About this task
In this example, you have a JSON file containing customer information,
including arrays of different types of phone numbers. The goal is to convert it into a
simple CSV file with a column for each piece of information. You can use the following
JSON sample as
input:
{
"customers":[
{
"firstName":"John",
"lastName":"Smith",
"age":25,
"address":{
"streetAddress":"21 2nd Street",
"city":"New York",
"state":"NY",
"postalCode":"10021"
},
"phoneNumber":[
{
"type":"home",
"number":"202-555-0109"
},
{
"type":"mobile",
"number":"202-555-0181"
}
]
},
{
"firstName":"Jane",
"lastName":"Doe",
"age":31,
"address":{
"streetAddress":"19 4th Street",
"city":"New York",
"state":"NY",
"postalCode":"10021"
},
"phoneNumber":[
{
"type":"home",
"number":"202-555-0178"
},
{
"type":"mobile",
"number":"202-555-0123"
},
{
"type":"work",
"number":"202-555-0163"
}
]
}
]
}