Data Connection vs Environmental Variables

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
iq_etl
Premium Member
Premium Member
Posts: 105
Joined: Tue Feb 08, 2011 9:26 am

Data Connection vs Environmental Variables

Post by iq_etl »

Hi all,

We've recently migrated from 7.5 to 8.7 and shortly will go to 9.1 Enterprise Edition to make use of parallel jobs.

Currently, we're connecting with environmental variables that are grouped in parameter sets.

We're considering the Data Connection option though.

Will the Data Connection provide more flexibility in regards to access to metadata? What about when we migrate jobs to a different environment, would we need to re-compile the jobs? Currently, with environmental variables we're having to re-compile and we'd like to move away from that if possible.

Thanks!
iq_etl
Premium Member
Premium Member
Posts: 105
Joined: Tue Feb 08, 2011 9:26 am

Post by iq_etl »

Here's a follow-up question.

I'm attempting to use some of our user defined Environmental Variables in a 'new' parameter set to attach to a Data Connection (Oracle Connector).

I have been able to include the Environment Variables with no problem in other parameter sets that I've created. However, Data Connection looks to require the creation of a new parameter set and this doesn't look to allow me to add Environment Variables as the 'Add Environment Variable...' button is disabled.

So, how can I include previously created Environment Variables in my Data Connection?

Thanks!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Here's how I'd do it.

Create Data Connection.

Create associated Parameter Set.

Load parameters in Parameter Set with environment variable references.
The Add Environment Variable button should not be disabled; it's enabled on my site. Take that particular issue up with your official support provider.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
iq_etl
Premium Member
Premium Member
Posts: 105
Joined: Tue Feb 08, 2011 9:26 am

Post by iq_etl »

Thanks for the tip, Ray.

I've got the Data Connection set up, but what I'm really hoping to do is use Data Connection in two different projects (Test and Production) with the test Data Connection point to Test and the production Data Connection pointing to Production.

Currently, I've got the two different Data Connections set up with the correct environmental variables (the Data Connections are named the same in each environment, but the values are different) and when I deploy my job to the production project I have to re-compile or the job now in productions still points to test (that is, it retains the test environmental values unless I compile).

I'm hoping to find a way to turn off the compiler in production and when I deploy the jobs into the production project they will use the appropriate Data Connection variables.

Is this possible?

Thanks!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's not possible. The scope of a Data Connection is the project.

Why not set the default values of the environment variable parameters to $PROJDEF so that they pick up their value from the project settings?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
iq_etl
Premium Member
Premium Member
Posts: 105
Joined: Tue Feb 08, 2011 9:26 am

Post by iq_etl »

Ray,

Thank you for that confirmation.

We had initially used $PROJDEF in our jobs, then moved to parameter sets in the hope of saving time, but found that we had to recompile the job each time we migrate the jobs into our production project.

With $PROJDEF working for jobs that are migrating across projects, Parameter Sets working great for values within a project, when is the best time to use Data Connector?

Thanks again!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The best time to use a Data Connection is always. (Recall that re-use is one of the holy grails of all IT.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply