CreateKeyTable
  • 1 Minute to read
  • Dark
    Light
  • PDF

CreateKeyTable

  • Dark
    Light
  • PDF

Article summary

Creates a new table from the unique values of the specified field

Use this method to create a resolution table for analysis or to reduce the number of records passed into engineering functions.

Method

KeyValue(s)Description
method"CreateKeyTable"Creates a table with one row for each unique value in provided key field.
project"CurrentProject"The active project.
key"TableName.FieldName"Fully qualified key field.  
The maximum number of discrete values in the key field is dependant on available memory.
A well-resourced server should support keys of ~ 20 million discrete values.
The underlying constraint is whether or not there is sufficient resource to do a FirstDiscrete on the field in question. See FirstDiscrete for details on limitations with this function.
targetTable
The name of the key table to create
jointrue/falseIf true, the newly created key table will be joined to the source table.


Usage

Modelling and Plugins
The CreateKeyTable technique is often used to reduce the size of a problem set.    To see examples of this, open Script Editor, select a new script, and then choose one of the following Plugins:
  • Alt Double Metaphone
  • Fuzzy Double Metaphone
  • Fuzzy NYSIIS

CreateKeyTable takes every unique value in Source Table for the specified key, and uses it to make a fully unique key in a new Key Table.  The Key Table then becomes the primary table in the join. 


Example

{
  "method": "CreateKeyTable",
  "project": "CurrentProject",
  "key": "Table.FieldName",
  "targetTable": "NameOfNewTable",
  "join": false
}







Was this article helpful?