Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In data transformation you write custom javascript function (or lambda). This functions accepts only one parameter which is an array of rows. Each row has properties with names corresponding to a selected data columns names.

Code Block
languagejs
// example of a function
function addAdditionalDimension(data) {
  return data.map(row => {...row, newDimension: row.columnA + row.columnB})
}
Code Block
// example of a lambda
data => data.map(row => {...row, newDimension: row.columnA + row.columnB})
Code Block
languagejs
// another example of injecting additional row
function addMissingRow(data) {
  const missingRow = {...};
  data.push(missingRow);
  return data;
}

...