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: 
FakeJupiter
Creator
Creator

Composite FROM statement

Hi!

I'm wondering, is it possible to make a composite FROM statement in script?

For instance, instead of:

FROM
[C:/user/QlikView/test.xlsx]


I'd like something like:

FROM
'C:/user/QlikView/' & 'test.xlsx'

 

Is that in any way possible?

I'm asking, because I want to load specific files by using a variable that defines which files to load.
I understand something like that can be done with a macro, but doing it this way would be far simpler.

Thank you,
Ray

Labels (3)
1 Solution

Accepted Solutions
Kushal_Chawda

@FakeJupiter  Yes, you can use the variable in middle of the path as well like below 

FROM C:/Files/sales / $(salesDate).xlsx

or

FROM 'C:/Files/sales / $(salesDate).xlsx'

or

FROM [C:/Files/sales / $(salesDate).xlsx]

View solution in original post

4 Replies
Taoufiq_Zarra

@FakeJupiter 

you can use for example :

Set PathFolder='C:\user\QlikView';

then

LOAD *
FROM
'$(PathFolder)\YOURFILE'
...
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
FakeJupiter
Creator
Creator
Author

Thank you for your reply.

I understand that a variable can be used as a prefix, but is it possible to have variable in the middle of the load statement? For instance:

C:/Files/sales & $(salesDate) & .xlsx

Kushal_Chawda

@FakeJupiter  Yes, you can use the variable in middle of the path as well like below 

FROM C:/Files/sales / $(salesDate).xlsx

or

FROM 'C:/Files/sales / $(salesDate).xlsx'

or

FROM [C:/Files/sales / $(salesDate).xlsx]

FakeJupiter
Creator
Creator
Author

Thanks!