我尝试加载数据。它不起作用。
我尝试过的:
多个分隔符、所有带引号的字段、所有不带引号的字段、将 header 保留在数据之外、mlcp 中无分隔符选项、mlcp 中的其他分隔符选项、其他计算机、其他 ML8 版本、其他 Java 版本、更少数据、更多数据、带有和无需转换。
我的 shell 脚本:
#!/bin/bash
# Data laden met transform
#############################################
mlcp.sh import \
-host localhost \
-port 37041 \
-username admin \
-password admin \
-input_file_path sampledata/DIKW \
-input_file_type delimited_text \
-delimiter ";" \
-transform_module /ext/obi/transform/dikw-transform-eval.xqy \
-transform_namespace "http://marklogic.com/dikw" \
-mode local \
-thread_count 1 \
-transaction_size 1 \
-batch_size 1
数据
"INCIDENTID";"DATUM";"TIJD";"HECTOMETERAANDUIDING";"WEGNAAM";"KORTBESCHRIJVING"
161236;02-08-14 00:00;1839-11-23 17:05:20;13.3;A14;"a- 1pa"
错误
15/10/29 11:15:23 ERROR contentpump.DelimitedTextReader: (line 0) invalid char between encapsulated token end delimiter
最佳答案
当使用非标准分隔符时,我发现使用 options file 通常效果更好。
选项.txt:
import
-host
localhost
-port
37041
-username
admin
-password
admin
-input_file_path
sampledata/DIKW
-input_file_type
delimited_text
-delimiter
;
-transform_module
/ext/obi/transform/dikw-transform-eval.xqy
-transform_namespace
http://marklogic.com/dikw
-mode
local
-thread_count
1
-transaction_size
1
-batch_size
1
请注意,它允许您跳过分号周围的引号。然后:
mlcp.sh -options_file options.txt
关于marklogic - MLCP 分隔文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33411676/