Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
StavG
Contributor II
Contributor II

REST connection in PROD Space

Is there a way to insert a REST connection in PROD app in Qlik Sense. I can insert the REST connection in Target app but I am not able to insert the connection in PROD app as the data load editor is not available in PROD.

@mbj , @richbyard , @pawwy1415,@ ErikWetterberg,@rohitk1609,@Mp3Leaks@petter@Michael_Tarallo

Labels (1)
1 Solution

Accepted Solutions
marksouzacosta

Hi @StavG,

A Data Connection belongs to a Space, not to an application.
So, if you need a Prod and Dev Data Connection in separated Spaces, you must recreate the REST Connection in the Production Space (Managed Space) and change the way you connect to your Data Connection.

In your case, LIB CONNECT TO 'Target_Dashboards:REST_API'; is hard coded. You'll have to change to something like the options below:

1. Using variables:

LET vCurrentSpace = GetSysAttr('spaceName');
LET vDataConnectionSpace = 'Target_Dashboards'; // Set Dev Space as Default

If Match('$(vCurrentSpace)','some condition') Then // Do some logic here to check if is the Prod Space
	LET vDataConnectionSpace = 'Prod Space';
End If

LIB CONNECT TO '$(vDataConnectionSpace):REST_API';

 

2. If your application lives in the same Space of the Data Connection, just remove the Space from the LIB Connection statement:

LIB CONNECT TO ':REST_API';

 

Regards,

Mark Costa

 

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

View solution in original post

1 Reply
marksouzacosta

Hi @StavG,

A Data Connection belongs to a Space, not to an application.
So, if you need a Prod and Dev Data Connection in separated Spaces, you must recreate the REST Connection in the Production Space (Managed Space) and change the way you connect to your Data Connection.

In your case, LIB CONNECT TO 'Target_Dashboards:REST_API'; is hard coded. You'll have to change to something like the options below:

1. Using variables:

LET vCurrentSpace = GetSysAttr('spaceName');
LET vDataConnectionSpace = 'Target_Dashboards'; // Set Dev Space as Default

If Match('$(vCurrentSpace)','some condition') Then // Do some logic here to check if is the Prod Space
	LET vDataConnectionSpace = 'Prod Space';
End If

LIB CONNECT TO '$(vDataConnectionSpace):REST_API';

 

2. If your application lives in the same Space of the Data Connection, just remove the Space from the LIB Connection statement:

LIB CONNECT TO ':REST_API';

 

Regards,

Mark Costa

 

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com