Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ioannaiogr
Creator II
Creator II

Analyze Qlik Data in Python

Hello all,

i want to try out something new and I really want your input.

I would like to go on and try some predictive modeling in python. I don't have a DB warehouse, so the only way I have my data modeled the way I like is in Qlik Sense apps. How do you usually get that data into Python for further analysis?

My initial thought was to just make a table and get all the info/fields needed in it and download it as .csv , then work in Python. Do you approve of it? Is there any other quicker/smarter way I could work on it?

 

Thank you so much in advance. I look forward to doing this!

 

Labels (4)
4 Replies
KGalloway
Creator II
Creator II

We do a couple of things with Python and Qlik at my company. Both use the load script and assume that your data is already formatted and structured appropriately for Python in the load script.

  1. Store the data in the load script to a csv file: https://help.qlik.com/en-US/sense/August2023/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegula.... Then the data updates each time the app reloads and saves you the extra steps of needing to download it from a table in the app.
  2. Use a python-based SSE in the load script to call pre-made scripts and functions that will take your data as input and provide some output. This is significantly more work to setup.

Let me know if I can clarify anything.

ioannaiogr
Creator II
Creator II
Author

Hello @KGalloway , thank you for replying!

I believe for the 2nd one I can talk with my colleague that works with QMC, but for the 1st one you mean after I've created my data model for the app in my data load editor at the end of it I do a store csv command? And this stays there the whole time?

KGalloway
Creator II
Creator II

That is correct.

Whenever the load script runs (either manually or by a reload task) the table you store will be stored again. This will cause it to overwrite existing csvs with the same name each time the script runs.

If you want to create new ones each time, you should be able to make the name of the file it is saved to a variable that can change each time the script runs.

For example,

let vToday = today();

store my_table into [lib://Your Data Connection/Your Folder Path/YourFileName_$(vToday).csv] (txt);

ioannaiogr
Creator II
Creator II
Author

@KGalloway  Alright, I'll try it! Thank you for your time!