data_export.jar
The data_export.jar program generates the Java classes that are used to extract data from a database checkpoint or MEF and export the data to comma-separated values (CSV) files.
Command Name
data_export.jar
Syntax
java -jar data_export.jar inputFolder outputFolder customMdcConfigFile MtxVersion exportConfigFile [sqlSchemaName]
Options
- inputFolder
- Directory where the checkpoint and MEF files are located.
- outputFolder
- Directory where the exported CSV files are written (this directory must be empty when the utility is executed).
- customMdcConfigFile
- Path to the
mdc_config_custom.xml file.
Note: By default, custom MDCs are defined in the /opt/mtx/conf/mdc_config_custom.xml file.
- MtxVersion
- The MATRIXX release version used to create the checkpoint files.
- exportConfigFile
- Path to the configuration YAML file to use to control the behavior of the data_export.jar program. Note: The configuration YAML file can either be one of the included example files or one that you create and customize. The example configuration YAML files include subscriber_export.yaml, event_export.yaml, and data_export.yaml.
If your data includes fields in custom MDCs, you can run your YAML file through the add_custom_field_to_export.py Python utility. The add_custom_field_to_export.py utility takes your YAML file as input and when the utility encounters a field that is not a list, array, or struct, it creates an MTX object entry for the field with the appropriate function code for processing the entry as a custom field. When the utility finishes, it generates an updated version of the YAML file for you to use as the exportConfigFile input for the data_export.jar program.
- sqlSchemaName
- Optional. If specified, the value given for sqlSchemaName overrides the
value of the
schemaName
parameter that is specified in the exportConfigFile.yaml file.
Example
java -jar /opt/mtx/bin/data_export.jar /opt/mtx/checkpoints/mtx_ckpt_v5100.2.1421221572 /tmp/data_export/csv $MTX_CONF_DIR/mdc_config_custom.xml 5100 /opt/mtx/data/data_export.yaml
For more information about the MATRIXX environment variables, see the discussion about container directories and environment variables in MATRIXX Installation and Upgrade.