I try to load aggregated XML files using MLCP into ML8.
This is my data:
<?xml version="1.0" encoding="UTF-8"?>
<export:batch xmlns:export="http://schemas.dikw.nl/exporter/1.0" xmlns="http://schemas.dikw.nl/export/1.0">
<cdm:BerichtInhoud xmlns:cdm="http://schemas.dikw.nl/data/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.dikw.nl/data.xsd">
<cdm:berichtMetaData>
<cdm:Bericht>first message</cdm:Bericht>
</cdm:berichtMetaData>
</cdm:BerichtInhoud>
<cdm:BerichtInhoud xmlns:cdm="http://schemas.dikw.nl/data/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.dikw.nl/data.xsd">
<cdm:berichtMetaData>
<cdm:Bericht>second message</cdm:Bericht>
</cdm:berichtMetaData>
</cdm:BerichtInhoud>
</export:batch>
And this is the mlcp command I use:
mlcp.sh import \
-host localhost \
-port 27041 \
-username admin \
-password admin \
-input_file_path ../sampledata/thijstest \
-input_file_type aggregates \
-aggregate_record_element BerichtInhoud \
-aggregate_uri_id berichtId \
-output_uri_prefix /sample/thijstest/ \
-mode local
The result on the command-line is this:
15/09/10 10:23:51 INFO contentpump.ContentPump: Hadoop library version: 2.6.0
15/09/10 10:23:51 INFO contentpump.LocalJobRunner: Content type: XML
15/09/10 10:23:51 INFO input.FileInputFormat: Total input paths to process : 1
15/09/10 10:23:51 INFO contentpump.LocalJobRunner: completed 100%
15/09/10 10:23:51 INFO contentpump.LocalJobRunner: com.marklogic.contentpump.ContentPumpStats:
15/09/10 10:23:51 INFO contentpump.LocalJobRunner: ATTEMPTED_INPUT_RECORD_COUNT: 0
15/09/10 10:23:51 INFO contentpump.LocalJobRunner: SKIPPED_INPUT_RECORD_COUNT: 0
15/09/10 10:23:51 INFO contentpump.LocalJobRunner: Total execution time: 0 sec
So I conclude that the element 'BerichtInhoud' is not found, I have tried to include the namespace like -aggregate_record_element cmd:BerichtInhoud.
Maybe it has something to do with this 'bug', although it's from january.
Loading data with mlcp - namespace issue