场景:我在变量中有一个文件路径(E:\..\abc.xml
),我需要将该文件的内容导入到表格中。
XML内容:
<?xml version="1.0"?>
<x:books xmlns:x="urn:books">
<book id="bk001">
<author>Writer</author>
<title>The First Book</title>
<genre>Fiction</genre>
<price>44.95</price>
<pub_date>2000-10-01</pub_date>
<review>An amazing story of nothing.</review>
</book>
<book id="bk002">
<author>Poet</author>
<title>The Poet's First Poem</title>
<genre>Poem</genre>
<price>24.95</price>
<pub_date>2011-11-11</pub_date>
<review>Least poetic poems.</review>
</book>
</x:books>
我使用this link将内容插入到表中。所以问题是,包正在成功运行,但插入的内容不是XML内容,而是其他语言(中文或日文)。
这是我的包
Get Filepath
,将变量转换为输出列,因此输出列XMLFile
的位置为E:\..\abc.xml
这是我的Import Column
配置
我的输出是
任何建议都会有所帮助。
答案 0 :(得分:2)
此问题可能是由数据类型冲突引起的,只是尝试将目标列数据类型从DT_NTEXT
更改为DT_WSTR
,长度= 4000
如果它不起作用
按照以下链接中的建议进行操作:
解决方法强>
尝试将数据插入到不稳定的表(列类型NVarchar)中,使用执行SQL语句将数据传输到目标。