- 2 Minutes to read
- Print
- DarkLight
- PDF
Function Overview
- 2 Minutes to read
- Print
- DarkLight
- PDF
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.
See Baked Fields for an overview of Baked Fields
Find Function
Accessed via Engineering | Functions | Find Function
The Find Function dialog allows functions to be searched for via keywords:
It is also possible to filter results by function group.
Double-click a function to bring up the function selector.
Function Selector
Accessed via Engineering | Functions | Selector
The Function Selector Dialog first requires either a function group, or a general function to be selected.
(Click the search icon to bring up the function search dialog)
Select a function/group and sub function
- Enter table that that field is to be created on
- Apply a filter of records to be included when building the new field (optional - if not provide, all records in the source table will be included)
- Enter parameters
- Specify a name for the new field
- Click Build
Parameters
Parameters can be of two types:
- fields
- fixed values
fixed values must be prefixed by the pound sign (#):
- Drag and drop from the Database Explorer
- Type the parameter name or value
- Select the required field in the Database Explorer, press CTRL C to copy the field name to clipboard, and then do CTRL V to paste into the fnuction dialog
- Select the required field from the drop down
Do Not Ordinalize
If available and checked, this will force the field to be created as a continuous field. Note this added the "flags": "NOORD" key to the executed JSON:
{
"method": "BuildBakedField",
"project": "Election5",
"targetTable": "PA_All",
"overwrite": true,
"name": "NoOrd",
"function": "string",
"p1": "CONCAT(A,B,C,D,E,F)",
"p2": "geo_id",
"p3": "#_",
"p4": "locality_fips",
"flags": "NOORD"
}
Properties
To see the JSON that was used to create a BakedField, select the field in the Database Explorer, right-click and choose Properties:
Existing Fields
Functions
The following function groups are available on the function menu:
- 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
The function menu can be accessed via:
- Engineering | Functions - Hover over a function to display the tooltip description of the function's purpose:
- Database Tree | Field Right-Click | Engineering