Derived Column and #n/a


i have relatively data flow, imports data csv.  pipeline has derived column , data conversion transformation before importing data sql server.  csv came excel , of columns populated vlookup, , when there isn't match, there #n/a.  string columns, not problem , derived column transformation able null values, however, have 1 column dt_ui4, , when pipeline reaches #n/a in column, chokes.  formula below, error message.

 

(dt_wstr,50)(personnelnumber) == "#n/a" ? "" : personnelnumber

 

i have tried (dt_wstr,50)(personnelnumber) == "#n/a" ? null(dt_ui4) : personnelnumber

but did not work either.

 

my error:

 

onpipelinepreendofrowset,,data flow task 1,{b60822ad-776c-49b6-ba4c-3609280d9acf},{43207801-47d0-4108-a812-75c2c2f0bef1},8/26/2008 12:49:36 pm,8/26/2008 12:49:36 pm,0,0x,a component given end of rowset signal. : 89 : data conversion : 90 : data conversion input


onerror,,data flow task 1,{b60822ad-776c-49b6-ba4c-3609280d9acf},{43207801-47d0-4108-a812-75c2c2f0bef1},8/26/2008 12:49:36 pm,8/26/2008 12:49:36 pm,-1071607780,0x,there error input column "personnelnumber" (323) on input "destination input" (43). column status returned was: "the value not converted because of potential loss of data.".

 

onerror,,import bizops sessions,{5686a1a9-1b3d-4d1f-88ce-b30ae2a11bfd},{43207801-47d0-4108-a812-75c2c2f0bef1},8/26/2008 12:49:36 pm,8/26/2008 12:49:36 pm,-1071607780,0x,there error input column "personnelnumber" (323) on input "destination input" (43). column status returned was: "the value not converted because of potential loss of data.".

 

i'm running execute package utility , modifing in bids.  if modify source file , remove #n/a, naturally pipeline processes file normally, don't want have modify file each time, , rather have pipeline remove #n/a me.

 

any suggestions?

so, here had solve this.  source marked (dt_str, 20), , expression now:

 

(dt_wstr, 255) personnelnumber == "#n/a" ? null(dt_ui4) : (dt_ui4) personnelnumber

 

no matter did, though, if source column dt_ui4, received truncation error.

 



SQL Server  >  SQL Server Integration Services



Comments

Popular posts from this blog

Reindexing

Users List

List of charts