We have moved to www.dataGenX.net, Keep Learning with us.

Tuesday, June 30, 2015

Maximum number of DataStage Jobs in a project


Filesystems can have a hard limit on number of subdirectories that can be contained in a directory, for example 32766 (32K -2) for Linux

For every job, DataStage will create hash files as subdirectories in the project directory. Here is a list of the subdirectories created for every job. In this list "nn" represents the number (or id) of the job:

DS_TEMPnn
RT_CONFIGnn
RT_STATUSnn
RT_LOGnn
RT_BPnn
RT_BPnn.O
RT_SCnn (only for parallel jobs)

Monday, June 29, 2015

Get nth Highest or Lowest data from Table


Here, we are considering a table student and we need to find out Nth highest and lowest marks of a student.

Nth Highest

select * from student s1 where N-1 = ( select count(distinct(marks)) from student s2 where s1.marks > s2.marks)

Saturday, June 27, 2015

SQL Scenario - 1

You have a table like below :

Name Age Gender
Atul         11 F
Ram 10 F
Disha  6 M
Pavan  8 F
Mani         10 M
Lovely 10 M
Rani    9 M

Unlocking XMETA locks from jobs

How can I unlock an XMETA locked job?

The job cannot be exported and when attempting to open the job, the following error appears:

Unable to open the Job
The Job 'TestJob' is locked by user 'dsadm'
(SessionID '8F1B0326-4F7E-45A8-B8EC-EAA8C4780528')

Do you want to continue and open a read-only view of the Job?
This issue arises when a lock still remains in XMETA for the corresponding job. Information Server will lock the job to ensure that there is no indeterminancy regarding the editing and saving of a job.
The most common causes of this is when a user has closed a client window unexpectedly (e.g. Force Terminate).

Wednesday, June 24, 2015

What happen when Import Sequential File with Extra Column


Job reads sequential file and load into RDBMS table.

What happen if sequential file has extra column in the back of each record?

It depends on data type of last column defined by DS and RDBMS table.
  • If data type of last column = varchar, extra column will be included as last column.

Sunday, June 21, 2015

DataStage Installation Checklist


  • Review the system requirements.
  • learn about tiers and components.
  • Design the topology of your installation.
  • Determine whether to pre-install your database system.
  • Determine whether to pre-install IBM WebSphere Application Server or pre-configure an existing installation of WebSphere Application Server.

Tuesday, June 16, 2015

trim leading 0's from decimal in DataStage


1. Convert the decimal (or whatever it was) to String.
2. then trim '0's from left.

Friday, June 05, 2015

Thursday, June 04, 2015

Error - mongod shell doesn't start, /data/db doesn't exsist


Error - mongod shell doesn't start, /data/db doesn't exsist


If you face this error while starting MongoDB (mongod), most probably there are 2 reasons for this -

a.  /data/db is not exist at all
b. mongod process don't have access on /data/db

Solution :-


The default db path for mongodb is /data/db/.
So when you run:

Wednesday, June 03, 2015

MongoDB Configuration in Linux


DOWNLOAD the stable version of MongoDB. It will a tar file.

1. Create a folder named 'learn' ( or whatever you want to give )
     $ mkdir -p /learn/mongodb  /app/dbMongo
      # /learn/mongodb  = Holds the MongoDB source
      # /app/dbMongo = Holds the MongoDB database




2. Extract the Mongo DB zip file in /learn folder
  $ tar -xvf MongoDB.tar  /learn/mongodb






3.  change the permission of folder to user who run the db here-  In my case User - atul and Group - atul
  $ chown -R atul:atul  /learn/mongodb  /app/dbMongo








Monday, June 01, 2015

Trigger types in Sequencer Job



While designing Sequencer jobs when we are using any Sequencer Stage ( Job activity, Command activity or others ), it has a tab named 'trigger' which actually determine the actions that occur when the activity runs. Each activity can output different trigger types. 

Three types of triggers are available, with some types having subtypes.
Conditional
A conditional trigger runs the target activity if the source activity fulfills the specified condition. The condition is defined by an expression, and can be one of the following types: