DTL transform¶
This is a transform that lets you apply Data Transformation Language transformations on the entities stream produced by the data source.
Properties¶
Property |
Type |
Description |
Default |
Req |
---|---|---|---|---|
|
Object |
The named rules of the DTL transform. The |
Yes |
|
|
Boolean |
If |
|
Example configuration¶
Pipe configuration that reads entities from the
Northwind:Customers
dataset and transforms them using the Data
Transformation Language before writing them to the
customer-with-orders
dataset.
{
"_id": "customer-with-orders",
"name": "Customers with orders",
"type": "pipe",
"source": {
"type": "dataset",
"dataset": "Northwind:Customers"
},
"transform": {
"type": "dtl",
"rules": {
"default": [
["copy", "_id"],
["add", "name", "_S.ContactName"],
["add", "orders", ["apply", "order", ["hops", {
"datasets": ["Northwind:Orders o"],
"where": [
["eq", "_S._id", "o.CustomerID"]
]
}]]]
],
"order": [
["add", "order_id", "_S.OrderID"],
["add", "order_date", "_S.OrderDate"]
]
}
}
}