Skip to content

Instantly share code, notes, and snippets.

@kailashbadu
Last active August 29, 2015 14:24
Show Gist options
  • Save kailashbadu/fd1a632cbadb21902659 to your computer and use it in GitHub Desktop.
Save kailashbadu/fd1a632cbadb21902659 to your computer and use it in GitHub Desktop.
sample_data_transformation
{
"company_name": "Boink",
"company_address": "Maroptic",
"revenue": 24006.6421
}
function transformation(unit){
// unit is a json object containing all the information about a unit
// see preview to find out the properties available
// by default, the default output becomes the output
return unit.output
}
{
"company_name": "Boink",
"company_address": "Maroptic",
"revenue": 24006.64
},
{
"input": {
"image_url": "http://placehold.it/32x32"
},
"output": {
"company_name": "Boink",
"company_address": "Maroptic",
"revenue": 24006.64
},
"transformed_output": null,
/**
This is basically the aggregation of the station output.
Right now it could be anything the developers deem appropriate, but in the future
it needs to be restructured to meet the user preferences/needs
**/
"stations" : [
{
"company_name": "Momentia",
"company_address": "Zytrek"
},
{
"revenue": 24006.6421
}
]
"meta" : {
"status" : "completed",
"created_on" : "2015-06-29T22:39:09+00:00"
}
}
{
"input": {
"image_url": "http://placehold.it/32x32"
},
"output" : {
"company_name": "Boink",
"company_address": "Maroptic",
"revenue": 24006.64
}
"meta" : {
"status" : "completed",
"created_on" : "2015-06-29T22:39:09+00:00"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment