Hello,
I have a basic mapping which populate a table. I want to create a process to store into a log table the name of the target table, the number of inserted rows, the mapping name, .... And finaly only put this process behind one or more mapping, in order to use only one process to log the flows.
I could use the stambia log tables, but i believe that all those informations are available into the sessions variables.
So i tried to do something like :
insert into %x{$LOG_TABLE/tech:physicalPath()}x%
values (
'${/CORE_SESSION_ID}$',
null,
%e(rhino){__ctx__.sumVariable("SQL_STAT_INSERT","../MAP_TST_RLA_100")}e(rhino)%,
'${../MAP_TST_RLA_100/CORE_BEGIN_DATE}$',
'${../MAP_TST_RLA_100/CORE_END_DATE}$',
'${../MAP_TST_RLA_100/CORE_DURATION}$'
);
It is ok, but in this example i need to put manually the mapping name (how to do it automatically ??), so i created a variable to store the mapping name and i tried this one :
insert into %x{$LOG_TABLE/tech:physicalPath()}x%
values (
'${/CORE_SESSION_ID}$',
null,
%e(rhino){__ctx__.sumVariable("SQL_STAT_INSERT","../%{V_MAP_NAME}%")}e(rhino)%,
'${../%{V_MAP_NAME}%/CORE_BEGIN_DATE}$',
'${../%{V_MAP_NAME}%/CORE_END_DATE}$',
'${../%{V_MAP_NAME}%/CORE_DURATION}$'
);
It is ok for the line with "rhino..." but not possible for the others.
Is there a way to do this ?
How can i know the different methods like "sumVariable" that i can use ? Cause it it should be possible to do it only with scripting. I found nothing into the documentation
Thank a lot