SSIS: How to change metadata on flat file connection manager -


i working in bids. have ssis package loops on files in given directory , imports of them table. so, control flow has foreach loop container data flow task inside of it. data flow task goes straight flat file source ole db destination. because directory can change, have made foreach directory dynamic (i.e., gave package variable, can change when directory changes). files field has stuff*.pip, such files in directory match pattern imported. variable mappings tab has file name variable, same variable used in expressions of flat file connection manager.

when set flat file connection manager, had point existing file pick file's metadata. changed file connection manager dynamic (i.e., added file name variable in expressions property) such foreach loop container pick files (that match pattern).

since then, metadata on file has changed. so, when open solution file, throws warning on flat file source in data flow task. resolve this, have temporarily change flat file connection hard-coded path such can change metadata on new file. make dynamic again (i.e., use file name variable in expressions, overrides hard-coded file path). (finally, double-click on flat file source in data flow task automatically update metadata in flat file source.)

is correct way update metadata on flat file? seems bit clunky me.

you can prevent error occurring editing properties on flat file manager , setting validateexternalmetadata=false. may need set delayvalidation=true on data flow task contains flat file manager.

this prevent warning - if file's metadata changes reason (columns change, data types change) , not remember update metadata runtime error.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

Maven Javadoc 'Cannot find default setter' and fails -