English 中文(简体)
在信息社会首脑会议中进口一个标注的档案,其范围大于255
原标题:Importing a tab delimited file in SSIS with one field bigger than 255 characters

我进口了一张标有限定的档案,并发现了这一错误。

Error: 0xC02020A1 at Task 3 - Data Load for Core Data, Flat File Source [14]: Data conversion failed. The data conversion for column "Column 85" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

Error: 0xC020902A at Task 3 - Data Load for Core Data, Flat File Source [14]: The "output column "Column 85" (448)" failed because truncation occurred, and the truncation row disposition on "output column "Column 85" (448)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component. Error: 0xC0202092 at Task 3 - Data Load for Core Data, Flat File Source [14]: An error occurred while processing file "C:Metrics eport-quoteCoreData.csv" on data row 540. Error: 0xC0047038 at Task 3 - Data Load for Quote Core Data, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Flat File Source" (14) returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more

当我对其中一个领域置之不理时,似乎进口了。

不幸的是,我终于来到这里。

Column A ( customer ) Column B ( Location ) Column C ( should be Y or N )
Jimmy                        New York               ssssss  ( instead of Y ) 

就这一段而言,我前面有一个超过255个特点的领域,并在信息社会首脑会议中产生上述权利。 如果我告诉它忽略这一错误,我就拿到了错误的数据。 “......”是指超过255个特性的领域。

这里的解决办法是什么?

最佳回答

Within your Flat File Connection Manager, you will need to adjust the OutputColumnWidth property of every column that is not sufficient to hold the incoming values. In your example, Column 85 is currently defined at 255 characters so bump it up to a reasonable value. The goal is to make that value large enough to cover the incoming data but not so large that you re wasting memory space.

一旦您更换了联系管理人,使用同一CM的任何数据流都将报告,该栏定义已经改变,你将需要进入,双点击,让新的元数据trick滴。

enter image description here

我看到了一些情况,即元数据在某些类型的转变之后不会自动复现(Uon All I m 看你)。 作为一种疗效检查,在您的指定之前,两度点击了联系人(可能是OLE DB Destination)。 点击元数据表,确保<代码>第85栏<代码>为500条或您分配的任何价值。 否则,你就会把你的工作推向链条,找到它 st的路。 简单的解决办法通常是删除令人不安的转变并重新处理。

enter image description here

问题回答

我在进口含有超过255个特性的CSV档案时,面对这一问题,我用假日解决问题。

简单地进口CSVin数据基,然后计算每行每张显示值的长度。

then sort the dataframe in descending order. This will enable SSIS to allocate maximum space for that field as it scans the first 3 rows to allocate storage

df = pd.read_csv(f,sheet_name=0,skiprows = 1)
df = df.drop(df.columns[[0]], axis = 1)
df[ length ] = df[ Item Description ].str.len()
df.sort_values( length , ascending=False, inplace=True)
writer = ExcelWriter( Clean/Cleaned_ +f[5:])
df.to_excel(writer,sheet_name= Billing ,index=False)
writer.save()




相关问题
Performance impact of indexed view in MS SQL Server 2008

Does anyone have experience with using indexed view in MS SQL Server 2008? I am trying to find out how does indexed view affect performance of insert / update statements, that are adding / updating ...

Lock Escalation - What s happening here?

While altering a table (removing a column) in SQL Server 2008, I clicked the Generate Change Script button and I noticed that the change script it generated drops the column, says "go" and then runs ...

Round to nearest 5 in SQL Server

I have a Money column in my SQL Server 2008 table. In my below query how can I round it to nearest 5$ select FineAmount from tickets Thanks

热门标签