Non-Snowplow data
For this example, the input data is a json string which looks like this:
{
"name": "Bruce",
"id": "b47m4n",
"batmobileCount": 1
}
The script filters out any data with a batmobileCount
less than 1, otherwise it updates the Data's name
field to "Bruce Wayne", and sets the PartitionKey to the value of id
:
- Javascript
- Lua
assets/docs/configuration/transformations/custom-scripts/examples/js-non-snowplow-script-example.js
loading...
assets/docs/configuration/transformations/custom-scripts/examples/lua-script-example.lua
loading...
The configuration for this script is:
- Javascript
- Lua
assets/docs/configuration/transformations/custom-scripts/examples/js-non-snowplow-config-example.hcl
loading...
assets/docs/configuration/transformations/custom-scripts/examples/lua-config-example.hcl
loading...