Hi, I'm completely new to Qlik Sense and am really struggling with working out how to import multiple data files.
My data sets are very simple in that they are two column CSV files with the first column containing the Timestamp and the second column a list of values. Unfortunately all of my data is in separate CSV's so I can have many different files, none of which have headings on the columns; the only unique identifiers are the filenames.
I am able to manually import these files one at a time, type in field-heading names (Timestep for column 1, whatever the filename is for column 2) and associate the files. But this is very time consuming and I'm sure there is a way to script this process.
That's not given me quite what I'm looking for. It appears to have brought all of the data in to a single table. When I import the CSV files manually they all come in as separate files and I'm able to associate them with each other. This is what I'm trying to achieve.
And any suggestion for automatically naming the field heating using each CSV filename?
If the files are identical i.e. the number and name of columns, delimiters, header sizes (where the first row starts), etc are the same, then using a wildcard load should concatenate them into one table.
If your tables are loaded as separate tables, I suggest you to check the above attributes of the files just so that you make sure everything is ready for an automatic concatenation.
Your script should look something like:
Column1 As TimeStamp,
Column2 As Value
(txt, utf8, embedded labels, delimiter is ',', msq);
I don't want to concatenate the files into one table; each CSV file represents a different variable (15 minute readings from different sensors in a building) so I'd like to import them all as separate tables.
Also, each file has different time-steps and row numbers. I could send an example if that helps?
Also my question on naming Column2 automatically using each CSV file name.
Thank you so much for helping, it's really appreciated.
Unfortunately, the new code has again not quite given what I'm looking for. It's imported all of the data but still into a single large table. It also added a third column containing the full library location and filename, and a fourth column titled Column2 containing the File Base Name.
That's partly worked; it's now imported my tables separately but it's also created a load of other tables titled INLFED, INLFED-1, INLFED-2....etc. I can't understand what these are referring to
It won't let me Synchronise Scripted Tables so I cannot see the data in the Data Manager and no longer recognises the timestamp as a date field so I cannot use the Calendar Measures.
I really appreciate the help. You can download the script I'm using, the CSV files I'm trying to import and a screenshot of what it's giving me in Data Manager using this link. It'd be great if you could have a look at this and make any sense of it.