MakeContinuousKey
  • 1 Minute to read
  • Dark
    Light
  • PDF

MakeContinuousKey

  • Dark
    Light
  • PDF

Article summary

General: MakeContinuousKey

Produces a new continuous integer field from a discrete field of any data type

Purpose

Use this function to:
  • Create a continuous field from a discrete field so that it can be used to join with a continuous field from another table.

Return Value

PropertyValue
FieldTypeInteger
FieldSizeContinuous
DataTypeContinuous
DataSizeInteger
Example Return Value: 1.....N  where N = number of discrete values in the source field


Parameters

ParameterJSONDescription
Table“targetTable”: “MyTableName”The target table on which the new field will be created
Filter“dataset”: {DataSet_JSON}NOT USED
Function"function":"makecontinuouskey"MakeContinousKey
Discrete Field“p1”: “DiscreteFieldName”Required.
The field providing the distinct values to use in building the key.
Fields with DataSize of Continuous are not valid as a Discrete Field parameter.

JSON Sample

{
  "method": "BuildBakedField",
  "project": "D3",
  "targetTable": "transactions",
  "overwrite": true,
  "name": "Cont_Key_DATE",
  "function": "makecontinuouskey",
  "p1": "date"
}

Usage Notes

Depending on field characteristics, statistics may not be calculated.

See Also:   

  • Engineering | Expression Field
  • IntegerSequenceKey (General Functions)
  • LongSequenceKey (General Functions)

Example

ExampleDetails
DescriptionCreate a continuous key from a date field
Input
  • Table: = [transactions]
  • Filter: = [No Filter]
  • Function: = MakeContinuousKey
  • Discrete Field:= date
  • Name: =Cont_Key_Date
Sample





Was this article helpful?

What's Next