Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sush
Contributor III
Contributor III

Create Data Model and use the same for different apps

I need some info/help with the below on how to proceed further. Any suggestions/pointers would be of great help

1. I am reading data from a data source and create qvds for each without any manipulation.

2. I was able to read the qvds and achieve what I need by reading those qvds.

3. The same data is required in multiple applications. So I don't want to create the data model with different applications.

Looking for suggestions on how do I need to proceed with. I read in different articles that this can be achieved by creating a common data model and load that data model in the applications.

What I am not clear is that do I need to create a data model  by joining the different qvds created in Step 1 and then store them as another QVD and then read this qvd in applications

OR

What is the process/steps to read the data model across multiple applications?

Thank you.

 

7 Replies
Lisa_P
Employee
Employee

Once you create your data model, you use the same process to create QVDs from that for other apps to be based on.

Use the loop to store all tables at the end of the script:

FOR i = 0 TO NoOfTables() - 1
LET d = TableName(i);
STORE [$(d)] INTO 'lib://QVDFiles/$(d).qvd'(qvd);
NEXT;

sush
Contributor III
Contributor III
Author

Thank you for your response.

What I was asking is the data model has to be again stored into qvd file?

For example,
1. Initially, I am reading the raw data from the original data source
without any manipulation and storing it to qvd files.
2. Now when I create a data model do I need to store this into new QVD
again and consume this in the application where I am using it?

Thanks
Lisa_P
Employee
Employee

Here it is in picture format:

Lisa_P_0-1588028835235.png

 

ArnadoSandoval
Specialist II
Specialist II

Hi @sush 

I think that I understand your goal; You want to create a Qlik Sense Application that loads all the required QVDs, and including referential objects, then you want to use this application (let's called QS-App-DataModel.qvf); as a template when developing new applications sharing the same Data Model (Schema), with this approach, you will have a single application doing the dirty word of loading data, while the new ones just consume its data model; If my understanding is correct, I suggest you to read the Binary statement!

Reference Articles:

Example (illustrating the procedure with Qlik Sense Desktop):

  1. I already have a QlikSense application, its name is: QlikCommunity.qvf; This application already loads some data
  2. This application is physically located at this folder: C:\Usr\QlikResources\QlikCommunity\Dev\98.Apps
  3. I create a new application, naming it Binary-Load-Test (This application will inherit the data model from the QlikCommunity.qvf application).
  4. With its Data Load Editor I created a new folder connection, with the name Binary_Folder.
  5. Binary_Folder-01.jpg
  6. Then, on the very first line of the script (It must be the very first line) the statement Binary [lib://Binary_Folder\QlikCommunity.qvf];

 

Binary [lib://Binary_Folder\QlikCommunity.qvf]; 

SET ThousandSep=','; 
SET DecimalSep='.'; 
SET MoneyThousandSep=',';

 

  1. Now I clicked on the Load data button, and the new application, Binary-Load-Test now features the same Data Model from the QlikCommunity.qvf

I was able to create a different UI for the new application; The procedure to implement Binary loads in the Qlik Sense server is a little different, but not by much.

You understand that the DataModel template application has to refresh the data as often as required, I expect you was to refresh all its children (I did not test that part); another risk, if the template DataModel is changed by removing tables or columns, all its children referencing those removed tables or columns will breakdown.

QS_App_DataModel-01.png

Hope this helps,

 

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
sush
Contributor III
Contributor III
Author

Hi Esso,

Thank you so much for your inputs and suggestions regarding the dirty load if I have a common data model.

Below is the approach which I am following currently

1. Using different Apps reading raw data from SAP tables and created QVDs.

2. Created App to consolidate data - for example - DocumentHeaders. I have created new QVDs which generates the master data. I have set up task to load the data from SAP frequently for the current FY year.

3. Created another App for the report which will consume the Qvd generated in the 2nd step which will load/read some of the qvds created in Step 1.

This is how I am creating and working through, please let me know if this seems to be fine or any issues with respect to it.

Thanks

 

ArnadoSandoval
Specialist II
Specialist II

@sush 

Actually your Qlik solution has three modules:

  • Module 1: QVDs Generation, it creates qvds from your applications (SAP) with a one QVD per one SAP table.
  • Module 2: You transform data from your QVDs (generated by Module 1) creating more complex (or simpler) QVDs for the presentation layer to consume; you may generate from all the QVDs from module 1, creating new QVDs perhaps giving more friendly column names, concatenating columns, etc.  
  • Module 3: The presentation layer, it consumes QVDs from module 2, or module 2 and 1 (if module 2 does not transforms all the QVDs from M-1)

 I try to comply with the SoC (separation of concerns) when writing my applications-QVDs; I think your workflow is similar to mine.

There is a Module X, applicable for some organizations where users could introduce data into the data model, perhaps via Excel files where they define complex business rules, they basically take ownership of generating the QVDs for those Excel files, it is not that fancy, they just have to copy their latest version of the Excel file in a folder and a QVD generator app (previously written) generate the QVD for the latest Excel file.

Regards,

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
sush
Contributor III
Contributor III
Author

Thank you