OData Service Example
Find the example decision flow below with two disconnected SQL Transformation stages. This example accepts two datasets contained within two files, customers.txt and orders.txt. Two Dataframes, orders.result.transformation and customers.result.transformation, will be returned. These dataframes will be the exact original tables from the two input files (customers.txt and orders.txt). Both will be stored in the SQLite DB file. The input files are both included in the in the RASON Examples Download file as explained within the section, Uploading Data from an External Data File within the chapter, Using the RASON Services Web IDE.
{
"workflow": "sqlWorkflow",
"customers": {
"comment": "transformation: SQL",
"datasources": {
"srcCustomers": {
"type": "csv",
"connection": "customers.txt"
}
},
"datasets": {
"customers": {
"binding": "srcCustomers",
"colNames": [ "CustomerID", "Country", "Age" ],
"indexCols": ["CustomerID"]
}
},
"transformer": {
"mySQLTransformer": {
"type": "transformation",
"algorithm": "sql",
"parameters": {
"query": "SELECT * FROM [customers];"
}
}
},
"actions": {
"result": {
"action": "transform",
"evaluations": [ "transformation" ]
}
}
},
"orders": {
"comment": "transformation: SQL",
"datasources": {
"srcOrders": {
"type": "csv",
"connection": "orders.txt"
}
},
"datasets": {
"orders": {
"binding": "srcOrders",
"colNames": [ "OrderID", "CustomerID", "Price", "Quantity" ],
"indexCols": ["OrderID", "CustomerID"]
}
},
"transformer": {
"mySQLTransformer": {
"type": "transformation",
"algorithm": "sql",
"parameters": {
"query": "SELECT * FROM [orders];"
}
}
},
"actions": {
"result": {
"action": "transform",
"evaluations": [ "transformation" ]
}
}
}
}
|