LongSequenceKey
  • 1 Minute to read
  • Dark
    Light
  • PDF

LongSequenceKey

  • Dark
    Light
  • PDF

Article summary

General: LongSequenceKey

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

Purpose

Use this function to:
  • Create a unique primary key on an existing table where the number of records may exceed 2 billion 
  • Identify and select specific records by number

Return Value

PropertyValue
FieldTypeLongInteger
FieldSizeContinuous
DataTypeContinuous
DataSizeLongInteger


Example Return Value: 1.....N where N = number of records in the table.
FieldSize and DataSize will depend on the number of records in the table:
  • LongSequenceKey will be a Continuous DataSize and FieldSize. See FieldType and DataTypes for more information.
  • LongSequenceKey is valid for a stupidly large number of records (+- 263 -1). For tables larger than this, find a quantum computer…

Parameters

ParameterJSONDescription
Table“targetTable”: “MyTableName”The target table on which the new field will be created
Filter“dataset”: {DataSet_JSON}NOT USED
Function"function":"longsequencekey"LongSequenceKey

JSON Sample

{
  "method": "BuildBakedField",
  "project": "D3",
  "targetTable": "transactions",
  "overwrite": true,
  "name": "LongKey",
  "function": "longsequencekey"
}

Usage Notes

LongSequenceKey does not support filters.

See Also:   

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

Example

ExampleDetails
DescriptionCreate Unique Key of record number
Input
  • Table: = [transactions]
  • Filter: = [No Filter]
  • Function: = LongSequenceKey
  • Name: = LongKey
Sample





Was this article helpful?