When you are controlling a chain of sequences in the job stream and taking advantage of reusable (multiple instances) jobs it is useful to be able to pass the Invocation ID from the master controlling sequence and have it passed down and assigned to the job run. This can easily be done with needing to manual enter the values in each of the sequences, by leveraging the DSJobInvocationId variable. For this to work:
The job must have ‘Allow Multiple Instance’ enabled
The Invocation Id must be provided in the Parent sequence must have the Invocation Name entered
The receiving child sequence will have the invocation variable entered
At runtime, a DataStage invocation id instance of the multi-instance job will generate with its own logs.
Variable Name
DSJobInvocationId
Note
This approach allows for the reuse of job and the assignment of meaningful instance extension names, which are managed for a single point of entry in the object tree.
IBM Knowledge Center > InfoSphere Information Server 11.5.0
InfoSphere DataStage and QualityStage > Designing DataStage and QualityStage jobs > Building sequence jobs > Sequence job activities > Job Activity properties
While working with a client’s 9.1 DataStage version, I ran into a situation where they wanted to parameterize SQL where clause lists in an Oracle Connector stage, which honestly was not very straight forward to figure out. First, if the APT_OSL_PARAM_ESC_SQUOTE is not set and single quotes are used in the parameter, the job creates unquoted invalid SQL when the parameter is populated. Second, I found much of the information confusing and/or incomplete in its explanation. After some research and some trial and error, here is how I resolved the issue. I’ll endeavor to be concise, but holistic in my explanation.
When this Variable applies
This where I know this process applies, there may be other circumstances to which is this applicable, but I’m listing the ones here with which I have recent experience.
Infosphere Information Server Datastage
Versions 91, 11.3, and 11.5
Oracle RDBMS
Versions 11g and 12c
Configurations process
Here is a brief explanation of the steps I used to implement the where clause as a parameter. Please note that in this example, I am using a job parameter to populate on a portion of the where clause, you can certainly pass the entire where clause as a parameter, if it is not too long.
Configure Project Variable in Administrator
Add APT_OSL_PARAM_ESC_SQUOTE to project in Administrator
Populate the APT_OSL_PARAM_ESC_SQUOTE Variable \
APT_OSL_PARAM_ESC_SQUOTE Project Variable
Create job parameter
Following your project name convention or standard practice, if you customer and/or project do not have established naming conventions, create the job parameter in the job. See jp_ItemSource parameter in the image below.
Job Parameter In Oracle Connector
Add job parameter to Custom SQL in Select Oracle Connector Stage
On the Job parameter has been created, add the job parameter to the SQL statement of the job.
Job Parameter In SQL
Related References
IBM Knowledge Center > InfoSphere Information Server 11.5.0
Connecting to data sources > Databases > Oracle databases > Oracle connector
How to know if your Oracle Client install is 32 Bit or 64 Bit
Sometimes you just need to know if your Oracle Client install is 32 bit or 64 bit. But how do you figure that out? Here are two methods you can try.
The first method
Go to the %ORACLE_HOME%\inventory\ContentsXML folder and open the comps.xml file.
Look for <DEP_LIST> on the ~second screen.
If you see this: PLAT=”NT_AMD64” then your Oracle Home is 64 bit
If you see this: PLAT=”NT_X86” then your Oracle Home is 32 bit.
It is possible to have both the 32-bit and the 64-bit Oracle Homes installed.
The second method
This method is a bit faster. Windows has a different lib directory for 32-bit and 64-bit software. If you look under the ORACLE_HOME folder if you see a “lib” AND a “lib32” folder you have a 64 bit Oracle Client. If you see just the “lib” folder you’ve got a 32 bit Oracle Client.
Since the Infosphere, information server, repository, has to be installed manually with the scripts provided in the IBM software, sometimes you run into difficulties. So, here’s a quick script, which I have found useful in the past to identify user permissions for the IAUSER on Oracle database’s to help rundown discrepancies in user permissions.
SELECT *
FROM ALL_TAB_PRIVS
WHERE GRANTEE = ‘iauser’
If we cannot run against the ALL_TAB_PRIVS view, then we can try the ALL_TAB_PRIVS view:
I’ve had these notes laying around for a while, so, I thought I consolidate them here. So, here are few guidelines to ensure the quality of your dimension table structures.
Dimension Table Effective Practices
The table naming convention should identify it as a dimension table. For example:
Suffix Pattern:
<<TableName>>_Dim
<<TableName>>_D
Prefix Pattern:
Dim_<TableName>>
D_<TableName>>
Have Primary Key (PK) assigned on table surrogate Key
Audit fields – Type 1 dimensions should:
Have a Created Date timestamp – When the record was initially created
have a Last Update Timestamp – When was the record last updated
Job Flow: Do not place the dimension processing in the fact jobs.
Every Dimension should have a Zero (0), Unknown, row
Fields should be ‘NOT NULL’ replacing nulls with a zero (0) numeric and integer type fields or space ( ‘ ‘ ) for Character type files.
Keep dimension processing outside of the fact jobs
The APT_TSortOperator warning happens when there is a conflict in the portioning behavior between stages. Usually, because the successor (down Stream) stage has the ‘Partitioning / Collecting’ and ‘Sorting’ property set in a way that conflicts with predecessor (upstream) stage’s properties, which it is set to preserver. This can occur when the successor stage has the “Preserve Partitioning” property set to:
‘Default (Propagate)’
‘Propagate’, or
‘Set’
Preserve Partitioning Property – list
Message ID
IIS-DSEE-TFOR-00074
Message Text
<<Link Name Where Warning Occurred>>: When checking operator: Operator of type “APT_TSortOperator”: will partition despite the preserve-partitioning flag on the data set on input port 0.
Warning Fixes
First, if the verify that the partitioning behaviors of both stages are correct
If so, set the predecessor ‘Preserve Partitioning’ property to “Clear”
If not, then correct the partitioning behavior of the stage which is in error