I have the variable total_lines
on a jython command that I needs to be accessed on the refreshing command of a ODI variable.
with open('file.txt') as file_name:
for total_lines, line in enumerate(file_name):
pass
print total_lines
total_lines += 1
For this I thought of passing it through a Java Beanshell variable using <@ @>. Like so: in the jython command:
<@int totallines = total_lines; @>
in the refreshing command:
select '<@=totallines@>' from dual;
Is this possible? How can I attribute a jython variable to a beanshell variable? What are my alternatives?
Cheers