31 March, 2021
Head is a debug stage that picks top ‘n’ records from all the nodes (or)Specific nodes.
All rows (After skip) = false
Number of rows (preparation) = 2
All Partitions = True
Click on output Do the mapping Ok
Do you want to master DataStage? Then enrol in "DataStage Training" This course will help you to master DataStage
The top 2 records will be displayed
[In Sequential file, if we load multiple files, then set
S.F properties àoptions Keep file partitions = True]
Tail is a debug stage that picks bottom ‘n’ records from all nodes or specific nodes
Number of rows (preparation) = 2 Partitions
All Partitions = false
Click on output mapping
Ex:- Suppose that we have 60 records and we need to display the 30th record to the 40th record.
Sol: In Head properties Set No. of row (per partition) = 40
In TailPropertiesSet No. of row (per partition) = 10
The sample is also a debug stage, which operates in ‘2’ Modes
Period is interval of records if period = 2 , displays 2,4, 6,8,10……….
Per cent =?
Out click number =?
Sample mode – period /per cent
Period (per partition) =2 output à Mapping ok
Since it has multiple outputs it follows the link to order.
Percent = 50
Output link Number =
Percent = 25
Output link number =
Sample Mode = percent Click on link ordering (To know the link label)
1 ↔ t1
2 ↔ t3
Now assign these values accordingly in output – link number
Click on output
Perform the mapping fx t1, t2, t3
Peek is a debug stage that can be used for
Log Detailed info abt execute
S.F load peek we can view data here
No. of Records = 5 (per partition) (All the 5
Records will be sent to the job log)
Peek Records output Mode = Job log
ok After Compilation and Run, Go to “Tool”
Select the job
Click on job log Symbol
Right click on Warning (or) double click Warning Message will be displayed Identify the Warning and try to Eliminate them
Note:- “Missing” record delimiter “/r/n” (one type of error) (it means Mismatch)
In which Cases, we have to put a “Reject link” and capture the mismatched data
Right-click on Yellow Warning Add to Message Handler Actions (Suppress / Demote) Add Ruler ok Warning get converted into Information
Job Right-click filter (put the options)
click on job name we can see 5 records
Rows all the rows (after skip) = false properties
Number of records (per partition) = columns period (per partition)
Peek all input columns = True partitions Skip (per partition)
All partition = true
Peek Records output Mode == Joblog properties
(or) output Deli meter string
Show column Name = True
Suppose we want to see the data at each stage then attach a peek
Stage to each Transformation : Oracle --- Sort Transformation1 Transformation 2 Transformation 3 Data set
Peek 1 peek 2 peek 3
Peek can send data to logs, peek can also send required columns to the logs.
For Ex:- If we have a table that will field and 9 records, and wanted to display only 2 fields with 9 records.
Peek properties No. of Records = 4 (per partition) columns Input column to peek = c id, Input column to peek = State, Peek all input columns = false ok After compile and Run Tools Run Director Select job log Event Detail window appears
Output :- peek 1, 0: cid 1 , state AP
Columns Show column Name = false
Peek properties No. of Records = 5 peek Records output Mode = job log Go to “output” tab Map the data (l1, l2, l3) ok
Compile and run the job Here peek Stage ads as copy stage and copies, The data as it is to the 3 data sets.
Peek properties No. of Records = 5 peek Record output Mode = output Output Map the data ok
When we set peek Record output Mode = output, then the peak output
That is 5 records will be displayed in one of the .ds files, and in the other .ds file, All records will be displayed.
In Data set 3 view data we can see 5 records ( that is peek data)
Suppose the client needs only rejected, but not output, thenHere we use peek as the output stage
Here peek is used as STUB Stage, a place holder to store the data.