using global variable inside "janino" script block

120 views
Skip to first unread message

nitin malik

unread,
Apr 23, 2014, 2:51:10 AM4/23/14
to scrip...@googlegroups.com
Hi Fyodor,

I need to use a global variable inside janino script block which is initialized in some other block.

I am trying to achieve this using etl global variable but is not able to do.
Need your help on this.

Thanks,
Nitin

Natacha Léone

unread,
Nov 24, 2014, 4:59:22 AM11/24/14
to scrip...@googlegroups.com
Hi, 

I have the same problem. 
Have you found a solution ?

Thanks for your help. 
Natacha

nitin malik

unread,
Nov 24, 2014, 6:14:04 AM11/24/14
to scrip...@googlegroups.com
Hi Natacha,

I have added the variable as a system variable. Please refer to the code below :

<properties>
count = 0;
</properties>

<query connection-id="destdb">
    select COUNT(*) AS count FROM transcount;
    <script connection-id="js">
        java.lang.System.setProperty('rowCount', count);
        </script>
</query>

<script connection-id="destdb">
DELETE FROM transcount LIMIT $rowCount;
</script>

Regards,
Nitin Malik


--
You received this message because you are subscribed to a topic in the Google Groups "Scriptella ETL" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scriptella/IqRSjrIz1DY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scriptella+...@googlegroups.com.
To post to this group, send email to scrip...@googlegroups.com.
Visit this group at http://groups.google.com/group/scriptella.
For more options, visit https://groups.google.com/d/optout.



--
Thanks.

Warm Regards,
Nitin Malik

Natacha Léone

unread,
Nov 24, 2014, 7:01:46 AM11/24/14
to scrip...@googlegroups.com
Thanks a lot for your help. 

Regards, 
Natacha
Reply all
Reply to author
Forward
0 new messages