Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
marco_puccetti
Partner - Creator
Partner - Creator

Config file inclusion

Hello i need to know if the LOAD INLINE statement included in a config file are visible in the script at the reload process.

I have a table like this:

TAB:

LOAD * INLINE [

A, B

VAL1, VAL2

];

in the config file included with this statement $(include=../SETTINGS/config.txt);


but when i use this expression in the script: LET noRows = NoOfRows('TAB');

i get NULL.

Is it correct?


Thanks

Marco

33 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Posting the Document log would be useful.

It could be that the statement preceding the load is a SET stmt that is missing a semicolon.

-Rob

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Next time, post the Document Log as an attachment

I see that the script failed? Do you have a log from a successful run?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Marco, the reason why NoOfRows() doesn't work in this case is the one we suggested all along. Your tables are being autoconcatenated. And you can find out yourself in the above script log. Look at the message between code lines 0144 and 0149. It says "due linee recuperate" but there is only one line in InstagramSites.

That means that QV decides to autoconcatenate the data from InstagramSites to the previous table with an identical layout: TwitterSites. That's why QV tells you it did a load of 2 lines.

To prove my point, have a look at the document in attachment. It contains the script code from approx. SentimentAPIs until after InstagramSites, LET-statements and all. When you run this script, the Table Viewer shows only 2 tables while there should be three. If you Preview the TwitterSites table (rightclick) you will discover that the row from InstagramSites resides in this table.

As Rob suggested, add NOCONCATENATE before the InstagramSites LOAD-statement and you will be fine. Check the remainder of your script for other spots where this problem might occur. Better too many NOCONCATENATEs than too few.

Peter

BTW you can add long log files as a text attachment to your post. Use the Advanced Editor to get the option.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Marco, were you able to correct your script with NOCONCATENATE?

Peter