Hi All,
I have a sample batch macro attached. Obviously I do not know what I am doing. Basically I am trying to take 50 different tables from one database and import them into a different database. The query is simple but the tables are all of different structure.
Select * from TABLE where lastupdatedt >=dateadd(day,-5,Getdate())
I have attached an example.
I basically have two questions:
1. How do I finish this macro? How do I tell it to update my local tables?
I am getting a error saying
Warning: Dynamic Input (5): The file "" has a different number of fields than the 1st file in the set and will be skipped
2. What does this mean?
Solved! Go to Solution.
Hey @JohnMaty
A batch macro works through a list of things one at a time, for example in your case you may feed it a list of table that you want to query. It will finish when there are no more things in the list.
You are using the dynamic input tool here (not a batch macro)...it is complaining because the default behaviour of Dynamic Input is to union all of the outputs together....but if the outputs of the tables do not have the same schema it will not work.
So what you really need is a dynamic input tool and an output tool within a batch macro.....this will run your query and output each tables results into a separate output files
Thanks for the info.
I do not know how to do that.
Additionally do you mean that the dynamic input AND output tool need to both be in the (same) batch macro?
Hey @JohnMaty
So your batch will look something like this:
How to use...in the batch macro attached...set the output name for the file...Save it
Drop this macro onto a new canvas and then plug in your text input...this is now a batch macro.
There are some really good videos on youtube for creating batch macros...have a look at some
I will take a look Thanks a bunch!