Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

loading script in few sheets

Hello everybody,

I'am trying to execute only one sheet of an loading script, but i haven't foun the way to do it???

Can anybody help me???

thank you...........

1 Solution

Accepted Solutions
Not applicable
Author

You could put each tab' script in a sub routine and then you call these sub routines commenting out the ones you don't want to execute.

View solution in original post

7 Replies
sczetty
Partner - Contributor
Partner - Contributor

There is a feature called Partial Reload, but this is not meant to run just a specific tab, rather it allows you to add or replace values in selected tables. This is a special feature, that could cause more problems than you want, unless you are quite sure as to what you are adding and or replacing in your currently loaded data.

There simply is no feature in QV to execute just a snippet of your code.it is all or nothing. You can stop execution at a predetermined point in your script using the debugger, but that still isn't what you are asking for.

johnw
Champion III
Champion III

If I just want to load one sheet, I comment out everything else. One or two /* */ blocks usually does the trick, as they span across sheets if I remember correctly.

Anonymous
Not applicable
Author

John,
Correct, they do spread accross sheets, but at the same time they merge all the following sheets. To avoid this, I usually set /* on the top and */ on the bottom of each sheet which I want to comment out.
It would be helpful to have some sort of checkbox to include/exclude sheet.

Not applicable
Author

You could put each tab' script in a sub routine and then you call these sub routines commenting out the ones you don't want to execute.

Not applicable
Author

thank you everybody.......

using subrotines I think it can be a nice idea.....

regards to all of you

nizamsha
Specialist II
Specialist II

can any one tell how to call the subroutine , i want the no of rows from one table

SUB TraceRowCount (SourceTable)

IF '$(SourceTable)' <> ''

LET vNoOfRows = NoOfRows('$(SourceTable)');

TRACE >>> Number of rows in $(SourceTable): $(vNoOfRows);

LET vNoOfRows = Null();

ELSE

TRACE >>> No table name specified;

END IF

END SUB

I am using this, but i am not getting .

beneath the table i used CALL TraceRowCount('Aircraft Types');

can u explain what is subroutine how to solve my probelm

while i am loading, error is coming from this part IF '$(SourceTable)' <> ''

then else

then endif

kevinpintokpa
Creator II
Creator II

I found an easy way to do this:

At the start of the section that you don't want to execute, start an if statement:

IF 1 = 0 Then

At the end of the section that you don't want to execute, terminate the if statement:

ENDIF

The IF and ENDIF can be on different tabs in the load script.

This will work well provided that your subsequent code does not need any variables or tables from the section that was skipped.