Hello, and welcome again...!
Can we use the same QlikView application for fetching the data from two different database servers if they are having same db name and structure.
We have created two system DSNs with name
as ‘MySQL’ and ‘Redshift’ as –
Our target is, to use single “QVW” file where the user should be able to switch
between the DSN names. Below are the steps which we can use for same -
- Keep all the column names in small case in views for both MySQL and Redshift Server
- Create a Variable in Qlikview, like ‘vDSN’ which will be used in ODBC CONNECT statement like, and having System DSN name
- Selecting all records from the view using “select *” statement is not a good practice, but as we have only created the views and includes only the required columns, so we have written below statement to fetch the data from views –
- Lastly, add, the RENAME functionality in Qlikview using Mapping LOAD, for aliasing purpose –
- Try to run the code, change the variable ‘vDSN’ and check the result:
- Variable Overview to “MySQL” as –
Reload
the data
- Variable Overview to “Redshift” as
Reload the data
This kind of behaviour, when we have same structure of database, tables, views in different DB servers, and we still want to achieve the same functionality using single QlikView Application.
Hope this helps.
That's it for this post, stay tuned for more and more articles. Lets give Power to Data...!!!







































