Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CLOSED] Insert Script for logging ETL flow details
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Insert Script for logging ETL flow details
 Login/Join
 
Silver Member
posted
Hi ,
I am new to Iway DM and i have a requirement which is:
Listen to a directory and fetch the csv files in that and insert to a target table.Log the etl flow info everytime the flow runs.
I implemented the main flow which is listening and inserting to target table.
How can i log the details of the flow(like flow start time,end time,status,flow name etc).
Since i am new to Iway DM i am not that familiar with FOCUS code to write a procedure.
It will be really helpful if some one can help me with a sample procedure which takes the job id and insert the flow details into my log table.
I am not sure where to give the adapter name and table name.I didnt find any info about any SQL pass through procedure also in user guide.

This message has been edited. Last edited by: Chuck Wolff,


WF8105,Windows 7
 
Posts: 35 | Location: MI | Registered: September 13, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
You don't have to write anything. All the logging is already done for you.

From the DMC, goto: Workspace/Logs and Traces/DataMigrator Log and Statistics


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1042 | Location: Toronto, Ontario | Registered: May 26, 2004Reply With QuoteReport This Post
Silver Member
posted Hide Post
quote:
Originally posted by dhagen:
You don't have to write anything. All the logging is already done for you.

From the DMC, goto: Workspace/Logs and Traces/DataMigrator Log and Statistics



Actually...my requirement is to create a separate audit table which captures some log information.
so i tried to create a separate procedure which logs data into the audit table.

It is giving some silly error.
-SET &&DATA_FLOW_END_TIME=FPRINT(HGETC(8,'HYYMDS'),'HYYMDS','A');
-SET &&ETLLOG_LAST_SEQ_NO=1;
-SET &&STATUS= IF &&CM__RETURN NE 0 THEN 'ERROR' ELSE 'SUCCESS';

-*SQL SQLMSS SET SERVER CJICLOCAL
ENGINE SQLMSS SET DEFAULT_CONNECTION CON01
SQL SQLMSS
INSERT INTO druganalytics.dbo.audit_table (Serial_No.,Flow_Name,Status,Records_Inserted) VALUES
('1','hi','succ','60');
END
-RUN

-SET &&DATA_FLOW_NAME='hi';
-SET &&DATA_FLOW_START_TIME=&&DATA_FLOW_END_TIME;
-SET &&DATA_FLOW_END_TIME='time';

I tried to insert hard coded value but it gives the following error,

09/18/2017 17:02:13 DEVNODE 0 ERROR AT OR NEAR LINE 6 IN PROCEDURE sreejith/flow_demo
09/18/2017 17:02:13 DEVNODE (FOC295) A VALUE IS MISSING FOR: &&CM__RETURN

How can &&CM_RETURN value is missing.?
confused!!


WF8105,Windows 7
 
Posts: 35 | Location: MI | Registered: September 13, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
&&CM__RETURN is only set after a stored proc is executed. If you are calling your proc after a subflow is submitted using "CMASAP", then you need to know the dependency return code.

Post more code and we might be able to help.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1042 | Location: Toronto, Ontario | Registered: May 26, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CLOSED] Insert Script for logging ETL flow details

Copyright © 1996-2017 Information Builders, leaders in enterprise business intelligence.