Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Error in Loading CSV file Expand / Collapse
Author
Message
Posted Wednesday, May 7, 2014 8:17 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 9:45 AM
Points: 134, Visits: 419
Hi All,

I am getting when loading data from csv file..

[Flat File Source [9007]] Error: Cannot open the datafile "20140505_Sales_new.csv".

[SSIS.Pipeline] Error: component "Flat File Source" (9007) failed the pre-execute phase and returned error code 0xC020200E.


Anyone any clue.

Regards
Shaun
Post #1568495
Posted Wednesday, May 7, 2014 9:15 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 10:58 PM
Points: 2,214, Visits: 5,974
Does the file exist and is the path correct?
Or was the file created in Excel and still open in Excel?
Post #1568530
Posted Wednesday, May 7, 2014 9:35 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 9:45 AM
Points: 134, Visits: 419
The path is correct as it goes through Foreachloop container and through sequence container, also it goes check the the audit table and delete the rows but fail to load data as displayed in the attachment.



  Post Attachments 
Capture_1.PNG (14 views, 24.86 KB)
Capture_2.PNG (5 views, 11.55 KB)
Post #1568543
Posted Wednesday, May 7, 2014 9:52 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, October 8, 2014 5:53 PM
Points: 143, Visits: 316
Check this if the package fails for the second time in the loop :

I think you haven't specified the file to be picked by expression by using the value from For each loop and may be at the end of the package you are deleting your first file. So the second time, it's going into the loop it's failing.

If it's failing for the first time it self, like others said make sure the package is in the right folder you have specified in the package. It's worth a check.


Good Luck :) .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.
Post #1568558
Posted Wednesday, May 7, 2014 10:09 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 10:58 PM
Points: 2,214, Visits: 5,974
Shaun2012 (5/7/2014)
The path is correct as it goes through Foreachloop container and through sequence container, also it goes check the the audit table and delete the rows but fail to load data as displayed in the attachment.



How are you passing the file name to the flat file connection manager?
Check if it is correct there, that's where it counts
Post #1568571
Posted Wednesday, May 7, 2014 10:14 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 10:58 PM
Points: 2,214, Visits: 5,974
Quick thought, what rights has the user (running the package) in the file system, I've seen this where users can list but not open directory content.
Post #1568575
Posted Wednesday, May 7, 2014 10:23 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 9:45 AM
Points: 134, Visits: 419
Hello All,

I had found the cause of it..
Reason: In Foreach Loop Container, the retreive file name, name and extension was selected but should have been fully qualified

Solved: Selected "fully qualified" which can be viewed by double clicking the Foreach Loop Container.

Regards
Shaun
Post #1568586
Posted Wednesday, May 7, 2014 10:29 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 10:58 PM
Points: 2,214, Visits: 5,974
Good stuff!
Post #1568594
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse