Logging map executions to a table

Some tips for the use of DataSlave

Moderators: Tom, ian

Logging map executions to a table

Postby ian » Mon Dec 04, 2006 8:19 am

Brett asked, “I would like to create an entry into a database each time I successfully run a map file. I plan to create quite few maps and run them automatically, and hence would like to use this database to check if the maps are running successfully”.

Let’s assume we want a timestamp in another table, say TBL_execution_Log.
Listed below are the steps you should take:

    Place a Custom table on the bottom of your map. If it at the bottom it will run last.
    Create columns as required, perhaps three: Mapname, Timestamp, Machinename.
    Add one row of data to the Custom table with default data.
    Feed the output of the Custom table into a Transform.
    Use three Literal functions (found in the General Toolbar) to set the data. Use the Dynamic option with Date, Map name and machine name.
    Connect the output of the Transform to for example a Write Access function connected to TBL_ execution_Log.

When the map runs a row is added to the table.

Please also note that the DataSlave Loader can be used to execute a map unattended and can create a log file.
ian
 
Posts: 364
Joined: Sat Dec 18, 2004 8:13 am
Location: UK

Return to Tips

Who is online

Users browsing this forum: No registered users and 1 guest

cron