Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
varmekontrol
Creator
Creator

Load using variable in .csv filename

Hi

I am trying to use a variable in the .csv file I intend to load on a daily basis, and because of this, I am using today() as a reference. 

But for some reason, nothing I do makes me able to use today() in the filename I want to load. 

 

Let vCreatedDate = date(today(), 'YYYY-MM-DD');
Let vFileName = 'PropertyErrorList_$(vCreatedDate).csv';

AMM_Property_error_list:
LOAD 
     id, 
     message, 
     propertyNumber
FROM
[c:\property_error_list\Data\$(vFileName)] 
(txt, unicode, embedded labels, delimiter is ';', msq);

 

 

1 Solution

Accepted Solutions
marcus_sommer

Try it in this way:

Let vFile = 'PropertyErrorList_' & date(today(), 'YYYY-MM-DD') & '.csv';

AMM_Property_error_list:
LOAD  id, message, propertyNumber
FROM [c:\property_error_list\Data\$(vFile)]
(txt, unicode, embedded labels, delimiter is ';', msq);

- Marcus

View solution in original post

1 Reply
marcus_sommer

Try it in this way:

Let vFile = 'PropertyErrorList_' & date(today(), 'YYYY-MM-DD') & '.csv';

AMM_Property_error_list:
LOAD  id, message, propertyNumber
FROM [c:\property_error_list\Data\$(vFile)]
(txt, unicode, embedded labels, delimiter is ';', msq);

- Marcus