Skip to main content

Using MarkLogic Content Pump (mlcp)

Prepare to Run the Examples

This section leads you through creating a work area and sample data with the following file system layout:

gs/
  import/
    one.xml
    two.json
  export/

Follow this procedure to set up the example work area:

  1. Download and install mlcp according to the instructions in Installation and Configuration.

  2. Ensure the mlcp bin directory and the java commands are on your path. For example, the following example command places the mlcp bin directory on your path if mlcp is installed in MLCP_INSTALL_DIR:

    Linux: export PATH=${PATH}:MLCP_INSTALL_DIR/bin
    Windows: set PATH=%PATH%;MLCP_INSTALL_DIR\bin
  3. Create a directory to serve as your work area and change directories to this work area. For example:

    mkdir gs
    cd gs
  4. Create a sub-directory to hold the sample input and output data. For example:

    mkdir import
  5. Create the sample input files in the import/ directory:

    1. Use the following commands on Linux:

      echo '<data>1</data>' > import/one.xml
      echo '{"two": 2}' > import/two.json
    2. Use the following commands on Windows:

      echo ^<data^>1^</data^> > import\one.xml
      echo {"two":2} > import\two.json