Data Definition (.dd) File Format

Overall

This section describes the makeup of a ".dd" file. For some examples of some .dd files, browse to the URL below and examine the “case study” folders:

Note that all the data (lists and dictionaries) created by the declarations described below is “globally shared.”

Note also that all variable names must follow Python's rules except – underscores are treated as separators in the various gDS table, column, and index names.

defineTable

defineTable <table name> — This starts the definition of a table. <table name> is mandatory and can be anything. There can be no underscores in the table name.

defineColumn

-- defineColumn <column name> [<default value>] — This keyword defines a column in a table. <column name> is mandatory> <default value> is optional. The types of column names are:

-- <this table name>_<that table name>_Ref — This defines a reference from the current row in the <this table name> to a row in <that table name>.

-- <this table name>_<anything but the above> — This defines an ordinary column in the current table.

A “Name” column must exist in every table. It is used to identify the terminal row of a reference when dumping a referring table. It does not have to hold unique values unless the column is also cited in a defineIndex citation.

A “RowStatus” column must exist in every table. It will be appended last to the table in all cases. See the Test Platform tab for more information about the uses of this column.

defineIndex

defineIndex <index name> — This keyword defines an index for one column of the table. <index name> is mandatory and must follow the format <table name>_<column name>2Ref, where the column name must be a column in the current table.

Code is generated to check for duplicate values on inserts in the "AddARow" routine, and if detected, the program halts, displaying an execution stack trace.

endTable

This ends the current table definition.

defineUnary

defineUnary <unary name> <initial value> — This keyword defines a list of size (1) to use as a solo value (the "multiprocessing" feature only supports generating "lists" and "dicts"). 

defineList / defineDict

defineList / defineDict <variable name> — These keywords generate an empty list or dict.