July 16, 2013 at 4:13 pm
I am attempting to set a connection string within an excel manager dynamically based on the latest file in a particular folder. Both the file name and sheet name is dynamic from file to file. I have two script tasks for two variables, one for the full file path for the connection string and the second for the sheet name. I have set "delay validation" to true on both the excel connection manager as well as the data flow task.
When I execute I'm receiving the error: "external columns for Excel Source are out of synchronization with the data source columns".
I cannot view the available columns in the excel data flow component because the sheet and file is determine during execution.
I'm not sure where to go from here. Any assistance would be greatly appreciated.
Thank you!
July 17, 2013 at 12:07 am
Are the column names exactly the same in all of the files?
Is there exactly the same number of columns in all of the files?
Are the columns in exactly the same order in all of the files?
If the answer to any of the above is no, you will probably have to rethink your approach.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
July 17, 2013 at 6:15 am
Yes the columns are the exact same, the only change is the file name and sheet name.
I want to also make sure that I'm configuring the data flow correctly, due to the excel task not having an explicit file associated until run time, should I first manually browse to a file and figure the columns in the excel source and SQL destination tasks? Then update the excel task to an expression? Or is that even relevant?
July 17, 2013 at 6:22 am
J0shu@ (7/17/2013)
Yes the columns are the exact same, the only change is the file name and sheet name.I want to also make sure that I'm configuring the data flow correctly, due to the excel task not having an explicit file associated until run time, should I first manually browse to a file and figure the columns in the excel source and SQL destination tasks? Then update the excel task to an expression? Or is that even relevant?
Yes that's exactly what you should do. Put an Excel file somewhere that your process will never use, and create all of the meta data using that.
If you like, the default (or initial) value of your expression can still point to this file, meaning that you do not need to worry about setting 'DelayValidation' either.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
July 17, 2013 at 9:21 am
That was the issue. Once I built the metadata with a template file the issue was resolved. I also found that I needed to set the "FirstRowHasColumnName" via expression once I updated the connectionstring as an expression but not a big deal. Thank you so much for the assistance!!!
July 17, 2013 at 10:51 am
No problem. Well done on getting it working.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply