Skip to main content
Skip table of contents

<database>.DBPrimaryKeys

This file defines primary key columns in the textual database. If there are no primary keys then this file can be left empty, but the file must exist even if it is empty in order for this to be considered a valid TDD.

Each line in the file contains a comma separated list of values that define the primary key or keys for a single table:

TEXT
<table_name>, <column_name> 

The values are as follows:

EntryDescription
<table_name>
The name of the table this primary key applies to. Each table can only be listed once in the primary keys file. If there are multiple primary keys in a table then they must be specified together on a single line.
<column_name>
The name of the column in this table that is a primary key. Multiple column names can be specified, separated by commas, if the table has multiple primary keys.

For example:

People.DBPrimaryKeys

TEXT
GENDER_CLASS,code
CITY_CLASS,code
CITY_CLASS1,code
__SUPER_CHANNEL__,reg_key
FACTS,TABLENAME
CLASSIFICATIONS, TABLENAME
MEASURES, TABLENAME, COLUMNNAME
DATABASE_LABEL, LABEL 

In this example, most of the tables have a single primary key (for example, the code column is the primary key for the GENDER_CLASS, CITY_CLASS and CITY_CLASS1 tables).

The MEASURES registry table has two primary key columns: TABLENAME and COLUMNNAME.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.