Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to create a connection to a sql server in qlik sense, but I would like the server to be driven by a variable. Is this possible?
thanks for your advice!
Yes, it is possible to dynamically make connections. This is how it works:
You can best start from an existing CONNECT TO statement with unscrambled credentials. For an OLE DB connection, there are user ID and password parameters that accept unscrambled values. For example (using the SQL Server Native Client):
CONNECT TO
[Provider=SQLNCLI11;Server=$(vServerAddress); Database=$(vDataBase);Uid=$(vUsername);Pwd=$(vPassword);];
You can find the exact connection string in the QMC > Data connections > YourConnector > Connection string
Hope it helps!
Yes, it is possible to dynamically make connections. This is how it works:
You can best start from an existing CONNECT TO statement with unscrambled credentials. For an OLE DB connection, there are user ID and password parameters that accept unscrambled values. For example (using the SQL Server Native Client):
CONNECT TO
[Provider=SQLNCLI11;Server=$(vServerAddress); Database=$(vDataBase);Uid=$(vUsername);Pwd=$(vPassword);];
You can find the exact connection string in the QMC > Data connections > YourConnector > Connection string
Hope it helps!
So use the same concept that was in the include in qlikview and update the connection string in cmc for the library?
Thanks for the advice!
When I try this for Rest connection I am getting below error for Qlik sense .
CONNECTs other than LIB CONNECT are not available in this script mode.
This answer is not correct as it is required legacy mode ,
correct method is using with connection
https://community.qlik.com/t5/Qlik-Design-Blog/REST-connector-Using-WITH-CONNECTION/ba-p/1523257
https://community.qlik.com/t5/App-Development/REST-Connector-WITH-CONNECTION-Syntax/td-p/1314