DiscreteIntegerSequence
  • 1 Minute to read
  • Dark
    Light
  • PDF

DiscreteIntegerSequence

  • Dark
    Light
  • PDF

Article summary

General: DiscreteIntegerSequence

Produces a field that is the record number in a table, stored as a discrete integer

Purpose

Use this function to:
  • Create a unique primary key on an existing table of less than 1 million rows
  • Identify and select specific records by row number
  • Create a record key for use in preparing source data for modelling

Return Value

PropertyValue
FieldTypeInteger
FieldSizeLow / Med / High 
DataTypeDiscrete
DataSizeInteger
Example Return Value: 1.....N    where N = number of records in the table.

DiscreteIntegerSequence_Sample


Parameters

ParameterJSONDescription
Table“targetTable”: “MyTableName”The target table on which the new field will be created
Filter“dataset”: {DataSet_JSON}Optional.   If a filter is applied, records not in the filter recordset will be returned as null.
Function"function":"DiscreteIntegerSequence"DiscreteIntegerSequence

JSON Sample

{
  "method": "BuildBakedField",
  "project": "Model1",
  "targetTable": "worldcities",
  "overwrite": true,
  "name": "KeyField",
  "function": "discreteintegersequence"
}


Usage Notes

See Also:   

Example

ExampleDetails
DescriptionCreate a discrete key field to give each worldcity an ID
Input
  • Table: = [worldcities]
  • Filter: = [No Filter]
  • Function: = DiscreteIntegerSequence
  • Name: =KeyField
SampleDiscreteIntegerSequence_Example





Was this article helpful?

What's Next