简体   繁体   English

从Excel以特殊字符加载SAP Data Services .csv数据文件

[英]SAP Data Services .csv data file load from Excel with special characters

I am trying to load data from an Excel .csv file to a flat file format to use as a datasource in a Data Services job data flow which then transfers the data to an SQL-Server (2012) database table. 我正在尝试将数据从Excel .csv文件加载为平面文件格式,以用作数据服务作业数据流中的数据源,然后将数据传输到SQL-Server(2012)数据库表。

I consistently lose 1 in 6 records. 我一贯失去了六分之一的记录。

I have tried various parameter values in the file format definition and settled on setting Adaptable file scheme to "Yes", file type "delimited", column delimeter "comma", row delimeter {windows new line}, Text delimeter ", language eng(English) and all else as defaults. 我尝试了文件格式定义中的各种参数值,并决定将Adaptable文件方案设置为“是”,文件类型“定界”,列分隔符“逗号”,行分隔符{windows new line},文本分隔符,语言eng(英文),其他均为默认设置。

I have also set "write errors to file" to "yes" but it just creates an empty error file (I expected the 6,000 odd unloaded rows to be in here). 我也将“将错误写入文件”设置为“是”,但是它只是创建了一个空错误文件(我希望这里有6,000个奇数卸载行)。

If we strip out three of the columns containing special characters (visible in XL) it loads a treat so I think these characters are the problem. 如果我们除去包含特殊字符的三列(在XL中可见),则会加载一种处理方式,因此我认为这些字符是问题所在。

The thing is, we need the data in those columns and unfortunately, this .csv file is as good a data source as we are likely to get and it is always likely to contain special characters in these three columns so we need to be able to read it in if possible. 关键是,我们需要这些列中的数据,但不幸的是,此.csv文件是我们可能获得的很好的数据源,并且在这三列中始终可能包含特殊字符,因此我们需要能够尽可能阅读。

Should I try to specifically strip the columns in the Query source component of the dataflow? 我是否应该尝试专门剥离数据流的“查询”源组件中的列? Am I missing a data-cleansing trick in the query or file format definition? 我是否在查询或文件格式定义中缺少数据清理技巧?

好的,所以没有得到我想要的答案,但是通过将“文本字符串中的行”参数设置为“行定界符”使它起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在PowerShell中使用特殊字符后修剪CSV文件中的数据 - Trim data from CSV file after a Special Character in PowerShell 在 SQL Server 中使用带有特殊字符的 sqlcmd 将数据导出到 csv 文件 - Export data to csv files using sqlcmd with special characters in SQL Server 从csv文件到SQL的批量加载数据转换错误 - Bulk load data conversion error from csv file to SQL 在C#中从数据中删除特殊字符后如何将数百万行数据从dbf文件上传到SQL Server - How to upload millions of rows of data from dbf file to SQL Server after removing special characters from the data in C# 当其中一个单元格必须接受超过255个字符的值时,如何从SQL Server加载Excel中的数据 - How to load data in Excel from SQL Server when one of the cells have to accept value more 255 characters 正则表达式获取带有特殊字符的数据 - Regex to get data with special characters 如何使用SSIS中的查询将数据加载到CSV文件中 - How to Load data in CSV file with a query in SSIS 如何从数据库中检索数据时转义特殊字符? - How to escape special characters when retrieving data from database? 使用pentaho数据集成将数据从mssql移动到mysql时要从数据中删除特殊字符 - To remove special characters from data while moving data from mssql to mysql using pentaho data integration 将数据记录从EXCEL加载到mssql数据库 - Load data records from EXCEL to mssql database
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM