-
Cumulative Sum Calculation
Solve with steps in datastage
employee_id, salary
--------------------------
10, 1000
20, 2000
30, 3000
40, 5000
Display as
employee_id, salary, cumulative_sum
-----------------------------------
10, 1000, 1000
20, 2000, 3000
30, ... -
Sequence Job Creation Scenario
You are given 2 jobs say job A and Job B with parameters x and y respectively. You need to create a sequence job. If you pass parameter x then Job A should run, If you pass parameter y then Job B should run, if you dont pass any parameter then Both Job A & B should run
-
Splitting a Large Job DataStage into Smaller Jobs
What is the process to split the large datastage job into smaller jobs?
-
Validation and Row Counts
I need help validating rows. 1st. I have a sequential file that has 139 rows, 2 columns (TABLENAME, CLOB). Of those rows, two (in TABLENAME column) are named "HEADER" and "TRAILER". I do not want these in my output. How do I keep the 137 rows and cut off the HEADER & TRAILER. 2nd. In the TRAILER row (TABLENAME column), there is a number that reads 00000000137 (in the CLOB column), which is the 137...
-
Add a Sequence Number for a Table/Row
I have a file structure that I need to add things to and it is as follows:
TABLENAME
PROV_TB
ADDR_TB
ADDR_TB
AFFL_TB
TAX_TB
ETAX_TB
EPAY_TB
PROV_TB
I need to know how to create a sequence number the tables in between the PROV_TB. The PROV_TB has been assigned a number I created (153365000 is the 1st, 153365001 is the... -
Abort Job When Records Exceeds 100
Given a file with 1000 records, design a job which will abort if it exceeds the record count more than 100
-
Maximum score details among 10 records using transformer stage
I have 5 records in student table. I want maximum score student details. How to do this with transformer stage.
Example:Input::: Student table
Sno smarks
1 50
2 45
3 34
4 50
5 33
I want output like this::
sno smarks
1 50
4 50 -
Implement Bulk Collect methodology in Datastage
We are using Bulk Collect methodology in Database to load the bunch of records at a time.How we will implement the same operation in Datastage. If my source having millions of records, I want to load the bunch of records in to target at a time. How?
-
How we can implement Bulk Collect methodology in Datastage
I have faced an interview question recently.
In database we are using Bulk Collect concept to load the bunch of records ata time.
How we will achieve the same process in Datastage ?
Can we use any paticular stage or any other methodology we can implement.
Can any one help me on this.
Thanks in advance.
Aloka -
Store Rejected Record
In join stage how we will store the rejected record in one file?
-
Which table will load first - Fact or Dimension Table?
In Data warehouse which table will load first and why? Fact or Dimension?
-
Generate Surrogate Key in Database
How we will generate Surrogate Key in Database not in Datastage.
-
Load a date field value from sequencial file to databse table with out using Transformer
I have an input file in below format
Name DOB
------ ------
A 10-05-1990
B 07-12-2000
Q1 -> How we will load the above file data into a target data base table in a simplest method without using Transformer ?
Q2 -> How will load the Date column into 3 splitted columns(DD|MM|YYYY). Like below
Name DOB
------ ------- -
Which Case you will go for star schema and snow flake schema
In your project Which Case you will go for star schema designing and which Case you will go for snow flake schema designing?
-
Track Source File name in Target File
I have 5 source files. In target I need to write it into a single file. But in the output file I need the corresponding input file name i.e which records are coming from which source file. How to achieve this?
-
Dsjob run command in Unix platform
We are using below command in Unix to run a Datastage Job:
dsjob run mode project_name job_name
When we are executing the above command in Unix what exactly it returns? -
Add New Parameter Set
I have a job with 2 parameters sets, I added new parameters sets, is it necessary to compile the job or not?
-
Merge Two Columns into One Column in Target
I have a file having columns C1,C2,C3,C4,C5 with comma delimited.In target I want store the first two columns value into one column.
Like below
Input Output I need
-------------- ----------------------
C1 C2 C3 C4 C5 C1(C1 & C2 value) C3 C4 C5
That means my input is 5 columns & Output will be 4 columns.
Can... -
Implement SCD stage using Lookup Stage
Can we implement SCD stage using Lookup stage? If Yes then how?
-
SCD Insert, Update and Link Data
While implementing SCD, there are two output links updating data to same table. One link for insert and one link for update. How it is possible? Will it not result a write lock on a table if two links accessing same table for writing?
DataStage Interview Questions
Ans