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: 
Anonymous
Not applicable

tFileInputDelimited unable to read file as context variable

I have some very odd behaviour with a basic job I'm building.

I have a tFileInputDelimited with the filename set by a context variable.

0693p000009RIA6AAO.png

0693p000009RIALAA4.png

The job errors with a File Not Found error.

However, if I change the tFileInputDelimited component to point to the specific file directly.

0693p000009RIBdAAO.png

Exact same file, but this job then works.

This makes no sense to me why it would do that because it's being given the exact same path.

It's as thought tFileInputDelimited component cannot read files that are passed to it by a context variable.

The source CSV is going to be different every time so I can't use a FileDelimited Metadata to achieve this. Instead I'm using the dynamic schema instead each time.

I have another job that uses tFileList to iterate over multiple files in a directory and processes all the CSV files. That works great, so no idea why this more simple job wouldn't work.

Labels (2)
3 Replies
manodwhb
Champion II
Champion II

@Steve Williams​ , Parameter type should be string in the context tab.change it and let me know.

 

 

Thanks,

Manohar

madhukolli2003
Contributor III
Contributor III

Hi @Steve Williams​ ,

We can define type as file and you did it correctly there.

Please check other options in the tFileinputDelimited and make sure you placed the file in the correct directory .

Also file name is a case sensitive.

 

Thanks & Regards,

Madhu Kolli

madhukolli2003
Contributor III
Contributor III

Hi @Steve Williams​ ,

 

Please find below example, I was able to do it with file type.

 

Context variable Declaration ::

 

0693p000009RW6wAAG.jpg

 

tFileInputDelimited::

 

 

0693p000009RW7LAAW.jpg

 

Please let me know if you still having issue .

 

Thanks & Regards,

Madhu Kolli