How to create a temporary table in SSIS control flow task and then use it in VAL flow task? -


i have control flow create temp database , table in t-sql command. when add dataflow query table can't because table doesn't exist grab information from. when try errors logging in because database doesn't exist (yet). have delay validation true.

if create database , table manually add dataflow query , drop database sticks doesn't seem clean solution.

if there better way create temporary staging database , query in dataflows please let me know.

if absolutely must have database exists during fleeting moments package executing this... first control flow item execute sql statement creates database. followed execute sql statement creates table. next, dataflow table , queries. finally, last control flow item execute sql statement drop database command. done, temporary database.

the caveat - you've noticed - in order design dataflow, database must exist first. there no way around this. objects designing dataflow against must exist in order design it. however, problem exists during design phase. it's temporary. once dataflow design done, can save package , drop database. it'll stay gone until run package again. setting "delay validation" ensures dataflow won't attempt validate existence of database @ top of package. wait juuust before needed, after create database statement. you're there.

however, before implement design, have ask. why using database variable? why create drop moments later? i'm going go out on limb , guess doing because wish have data in sql can leverage sql language selectively query and/or manipulate it? if thats case, point of ssis type of manipulation or querying using provided dataflow transformation tools. also, didn't mention in question, final destination of data? aren't loading database have dropped. end up? flatfile?


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -