Focal Point
[SOLVED]using variable to define source tables?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/5687025396

June 01, 2020, 06:19 AM
nox
[SOLVED]using variable to define source tables?
Hi,

Using iWay Datamigrator-

I have designed a flow manually with "Product01" as my source table to load into "Product_new" as my target. I also create a schedule to run this flow daily. Each day will create new table name "ProductXX"(where "XX" would be a counter) so my second day would be "Product02" to append into "Product_new" . is there a way to schedule this flow via source's name change dynamically/sequentially?

This message has been edited. Last edited by: nox,


WebFOCUS v8.2.06 , Windows
June 01, 2020, 11:08 AM
FP Mod Chuck
Nox

What is the database of Product01? Is it a SQL table or a sequential file?


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
June 01, 2020, 09:01 PM
nox
Hi Chuck,

Sorry for lack of information. It is SQL Server Database. Base on a daily script it generate the sequential table daily by using different name.


WebFOCUS v8.2.06 , Windows
June 02, 2020, 09:43 AM
FP Mod Chuck
Nox

Yes this should be possible, you will need to run a DM Stored Procedure prior to the load that will set a &variable with the source table name that will be referenced in the productxx access file in the TABLENAME section. So you only need a single master file for the source file and the TABLENAME portion of the access file will be dynamic based on the &variable, You will need to keep the counter in another table that you increment and then look it up to set the &variable in the DM stored procedure. Hope that makes sense...


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
June 04, 2020, 03:18 AM
nox
Thanks, I'll give it a try.


WebFOCUS v8.2.06 , Windows