Export Data from the Subscriber Database
The subscriber_export.yaml file is a sample configuration file that is provided for you to use with the data_export.jar utility for converting checkpoint data to CSV format. The utility also generates script files to create SQL tables and to load the exported subscriber data into the SQL tables.
Procedure
-
(Optional) Run the
/opt/mtx/bin/create_checkpoint.py file to create
a new checkpoint of the in-memory databases.
This step is necessary only if a recent checkpoint does not exist on the shared storage device. The publishing blade creates these at a configured interval. The MTX_INPUT_DIRECTORY parameter described in step 2 must point to the directory where the checkpoint files are located.
-
Run the
/opt/mtx/bin/data_export.jar utility with the sample
subscriber_export.yaml file as the entry for
exportConfigFile or the file that you customized
previously.
java -jar data_export.jar <inputFolder> <outputFolder> <customMdcConfigFile> <MtxVersion> <exportConfigFile> [sqlSchemaName]
For example:java -jar /opt/mtx/bin/data_export.jar /opt/mtx/checkpoints/mtx_ckpt_v5100.2.1421221572 /tmp/subscriber_export/csv /opt/mtx/conf/mdc_config_custom.xml 5100 /opt/mtx/data/subscriber_export.yaml
See the discussion about data_export.jar for a complete description of each of the data_export.jar parameters.
Three sets of files are generated when the data_export.jar utility successfully completes:- Extracted subscriber data that is written to one or more CSV files.
- A script file to create SQL tables for importing the extracted subscriber data.
- A script file to load the exported subscriber data into the SQL tables after they are created.
- Run the create_tables.sql script to create new SQL tables.
- Run the load_tables.sql script to import the CSV data into the new SQL tables.