Create a Custom Data Export Configuration File

You can customize the entries in the YAML file that determine which MTX objects and fields are exported to CSV files. If you have custom MATRIXX Data Containers (MDCs) that extend MDCs, you can use the add_custom_field_to_export.py script to create a new YAML configuration file that includes your custom fields.

About this task

Adjust the entries in any of the following sample YAML files found in the /opt/mtx/data directory to customize how your data is exported to CSV files:

  • subscriber_export.yaml — Use to export the Subscriber database.
  • event_export.yaml — Use to export event data from MATRIXX Event Files (MEFs).
  • data_export.yaml — Use to export both subscriber data in static checkpoint files and event data in MEFs to CSV format.
Important: CSV files generated for wallet data, such as balances, balance values and thresholds, are not customizable.

You can also copy any of these sample files to use as a template to create your own custom YAML file to use with the data_export.jar utility.

Procedure

  1. Log in to the host server as user mtx.
  2. Copy an existing sample YAML file that you want to modify or use as a template and open the copy with a text editor.
  3. Modify the lines that contain the configuration parameters that control the behavior of the data_export.jar utility.
    For example, you can modify the number of threads:

    numberOfThreads:15

  4. Edit the MTX object entries to add, modify, or remove entries to customize the list of MTX objects you want to export.
    Important: The entries in the YAML file you create must follow the parameter values and MTX object parameter format described in the discussion about database export configuration.
  5. Save and close the file.
    You can use this file as the template for a new YAML file that includes custom fields in your private MDCs.
  6. Create a new custom YAML file that includes custom fields in your custom MDCs.
    add_custom_field_to_export.py inputConfigFile updatedConfigFile

    Where inputConfigFile is one of the sample YAML files or an edited file you created in the previous steps and updatedConfigFile is a unique name for the custom YAML file.

    For example,

    add_custom_field_to_export.py /opt/mtx/data/data_export.yaml /opt/mtx/custom/my_data_export.yaml

    Important: Specify two different file names for inputConfigFile and outputConfigFile. Do not re-use the input file for output.
    An updated YAML file is created.
  7. Edit the custom YAML file to remove any custom MDC fields that you do not want to export.
    Use this updated YAML file as the input for the data_export.jar utility.