mdf_reader.data_models.code_tables
¶
This module has functions to manage data model code table files and objects according to the requirements of the data reader tool
Module Contents¶
Functions¶
|
Reads a data model code table file to a dictionary. |
Lists the name of the available code table templates |
|
|
Copies a code table template to an output |
|
|
|
|
|
|
|
Attributes¶
-
read_table
(table_path)[source]¶ Reads a data model code table file to a dictionary. It completes the code table to the full complexity the data reader expects, by appending information on secondary keys and expanding range keys.
- Parameters
table_path (str) – The file path of the code table.
- Returns
Code table
- Return type
dict
-
templates
()[source]¶ Lists the name of the available code table templates
- Returns
Code table template aliases
- Return type
list
-
copy_template
(table, out_dir=None, out_path=None)[source]¶ Copies a code table template to an output file or path
- Parameters
table (str) – Code table template name to copy
- Keyword Arguments
out_dir (dict, opt) – Directory to copy code table file template to
out_path (dict, opt) – Full filename to copy code table file template to
out_dir or out_path must be provided (Either) –