创建 TDE Marklogic 时不支持列名称中的点

Dot in Column name not supported while creating TDE Marklogic

我们正在将 csv 数据导入 marklogic。一些列的名称中有一个点 (.)。它可以很好地加载到 MarkLogic 中(连同点)。

但是,当我们创建 TDE 模板以创建视图时,该点未被接受。向我抛出以下错误:

[1.0-ml] TDE-INVALIDTEMPLATE: (err:FOER0000) Invalid TDE template: TDE-INVALIDSQLNAMENODE: Invalid SQL object name: "DataType." for /tde:template/tde:rows/tde:row/tde:columns/tde:column[3]/tde:name

我可以用下划线替换点,但一直在寻找其他建议。

在tde.xsd中,名称定义如下:

<xs:simpleType name="name">
    <xs:annotation>
        <xs:documentation>
            A generic name type.
        </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:NCName">
        <xs:minLength value="1"/>
        <xs:pattern value="[^.\-\p{Z}]+"/>
    </xs:restriction>
</xs:simpleType>

意思是,列名中不允许有点。 您可以在 Config/tde.xsd.

中的 MarkLogic 安装目录中找到 xsd

我建议用下划线替换点或使用驼峰式命名您的列名。