Hello: I have an oracle query that I need to generate as a json file. The query contains all of the feature necessary for the output however, there can be multiple addresses for a given project name. For projects that have multiple addresses, I need to repeat the following attributes: street, cagisID, addressID
I had this structure in a JSONTemplater but when a project contains multiple rows (with the differing address), it generates all of the elements below multiple times. I tried to configure the "SUB" feature of the transformer but I must need to only send a project query to the ROOT and all of the possible address variations for a project to the SUB. But then I could figure out how to link the two for this to work.
{
"totalInvestment": fme:get-attribute("totalInvestment"),
"squareFootageRetail": fme:get-attribute("squareFootageRetail"),
"squareFootageOffice": fme:get-attribute("squareFootageOffice"),
"squareFootageManufacturing": fme:get-attribute("squareFootageManufacturing"),
"recordType": fme:get-attribute("recordType"),
"projectStage": fme:get-attribute("projectStage"),
"projectName": fme:get-attribute("projectName"),
"projectId": fme:get-attribute("projectId"),
"projectDescription": fme:get-attribute("projectDescription"),
"projectDate": fme:get-attribute("projectDate"),
"propertyAddresses":[{
"street": fme:get-attribute("street"),
"cagisId": fme:get-attribute("cagisId"),
"addressId": fme:get-attribute("addressId")
}],
"programType": fme:get-attribute("programType"),
"numberOfUnits": fme:get-attribute("numberOfUnits"),
"numberOfSqFt": fme:get-attribute("numberOfSqFt"),
"numberOfParkingSpaces": fme:get-attribute("numberOfParkingSpaces"),
"numberOfHotelRooms": fme:get-attribute("numberOfHotelRooms"),
"neighborhood": fme:get-attribute("neighborhood"),
"jobsRetained": fme:get-attribute("jobsRetained"),
"jobsCreated": fme:get-attribute("jobsCreated"),
"developer": fme:get-attribute("developer"),
"category": fme:get-attribute("category"),
"cagisId": fme:get-attribute("cagisId"),
"address": fme:get-attribute("address")
}