--- title: "CreateKeyTable" slug: "createkeytable" updated: 2023-05-16T10:22:45Z published: 2023-05-16T10:22:46Z canonical: "docs.datajet.app/createkeytable" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # CreateKeyTable 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 | Key | Value(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 | | join | true/false | If true, the newly created key table will be joined to the source table. | ### Usage Modelling and PluginsThe 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. ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1684232356487.png) ### Example ```json { "method": "CreateKeyTable", "project": "CurrentProject", "key": "Table.FieldName", "targetTable": "NameOfNewTable", "join": false } ``` ## Related - [Make Key Table](/make-key-table.md) - [FirstDiscrete](/firstdiscrete.md)