Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
neetha_p
Master
Master

Load data from ruby file

Hi All,

Please any can help me how to get data from ruby file

15 Replies
Not applicable

Click the 'Use advanced editor' option to attach the files in the reply.

Peter_Cammaert

This is a weird discussion. Here's the result of my guesswork.

QlikView is a capable ETL tool that easily reads data in various formats and databases. Some manual work is still necessary however when attempting to read novels, tax forms, license plates and source code. Your example contains only four groups of setting so I took the time to manually convert them into something QlikView can understand. See attachments.

If in reality there are many more groups in the ruby source, you may consider writing a tool in a general purpose scripting language (like perl) to process groups of values into comma-separated lines.

Note that the ruby code is a little bit inconsistent. The last value is stored in a variable alternately called r_name or retailer_name.

Good luck,

Peter

neetha_p
Master
Master
Author

hi Peter,

Thanks for help and Its a typo mistake,retailer_name is correct.

i don't have idea how ruby file is converted to csv or excel.

its a regular update we need from ruby file.

Thanks

Nitha

Peter_Cammaert

Well, the attachment is only an example of what to feed into QlikView.

If you need updates on a regular basis, that means that someone or something is updating the ruby code on a regular basis as well. These updates can be done anywhere (csv, ruby program, database table) as long as you don't have to do them twice and in different places. As far as I can see with limited information, you have two options to handle this quickly:

  • Change your ruby code so that the configuration information is read from an external (csv?) file. The updates need only be done in a single spot, the external file, and both the ruby program and your QlikView application will follow suit. Your r_for_retailer subroutine now needs to do a csv table load, a lookup with the value of parameter retailer, and a load of the different variables with the values found in the corresponding columns.
  • Or recode the ruby program so that the settings for every retailer value are listed in a table-like format at the beginning of the program (a dictionary or whatever this is called in ruby). If you tag the table with comment-like items before and after the actual rows, QlikView can be programmed to extract these lines without too much difficulty.

But keep in mind that the QlikView script engine is no parser construction toolkit.

Peter

neetha_p
Master
Master
Author

Hi All,

Please check rb file i attached and help me with solution

neetha_p
Master
Master
Author

Thanks,please check rb file attachment