Baked Fields
  • 1 Minute to read
  • Dark
    Light
  • PDF

Baked Fields

  • Dark
    Light
  • PDF

Article summary

Function fields - also known as "BakedFields" - are inbuilt DataJet functions that can be applied to existing data fields in order rapidly create new fields.  Along with Expressions, DataSetFields and User-Defined Fields they play a key role in the transformation of data.

The engineering functions are organised into groups:

  • General - general functions, including key creation, discrete value processing, access to indexes, joinlayer functions and quantiles.
  • DateTimeTransform - transformations involving hours, minutes and seconds
  • DateTransform - transformations involving years, months and days
  • DMath - transformations producing decimal fields
  • LMath transformations that produce integer fields
  • FLogic - logical functions that evaluate conditions and produce flag fields
  • Geo - geographical functions, including distance calculations
  • Statistical - distributions and transformation that support data modelling and cleaning
  • String - transformations of string data
  • UserAgent - extractions of web data

Creating Baked Fields

BakedFields (or functions) can be created in a variety of ways:

Baked Fields are optimised functions that are designed to work quickly on very large datasets.   Not all functions are supported for all data and field types.  If a bakedfield function is not available for the particular field or data type that needs to be transformed, try one of the following:

  • Expression Builder - (note, expressions may be slower than BakedFields)
  • User-Defined Field
  • Casting, or pre-engineering

See Engineering - Functions for more details.


JSON and Parameters

Baked Fields have a common parameter structure:

Example Baked field (YMDH - Year Month Date Hour)

{
  "method": "BuildBakedField",
  "project": "Election5",
  "targetTable": "PA_All",
  "overwrite": true,
  "name": "YMDH",
  "function": "datetimetransform",
  "p1": "YMDH(A)",
  "p2": "TimeStamp"
}


{
  "method": "BuildBakedField",
  "targetTable": "transactions",
  "overwrite": true,
  "name": "Engineering-DMath",
  "function": "dmath",
  "p1": "A/B",
  "p2": "profit",
  "p3": "price",
  "nullIsZero": true,
  "project": "RegressionDB2"
}





Was this article helpful?