HOw Hash Partion Works

Thank you in Advance

i have doubts on Hash Partion TEch Could please give me the
clear understandable notation

example

e_id,dept_no
1,10
2,10
3,20
4,20
5,30
6,40

i have TWo Nodes/Three Nodes

My questions are:

1).if i select hash key as e_id how Hash partion will
distribute the data in to two NOdes/three NOdes
2).if i select hash key as dept_no how Hash partion will
distribute the data in to two NOdes/three NOdes


sivakumar.katta7@gmail.com

Answers were Sorted based on User's Feedback



HOw Hash Partion Works Thank you in Advance i have doubts on Hash Partion TEch Could please g..

Answer / shar

Well The basic idea is:
Same key column values are given to the same node.

Hence
1.(e_id)
node1 node2 node1 node2 node3
1,10 2,10 1,10 2,10 3,20
3,20 4,20 4,20 5,30 6,40
5,30 6,40

2. (dept_no)
node1 node2 node1 node2 node3
1,10 3,20 1,10 3,20 5,30
2,10 4,20 2,10 4,20 6,40
5,30 6,40
(This is where pranay went wrong 6,40 will go to node3
instead of node1.)

Is This Answer Correct ?    1 Yes 0 No

HOw Hash Partion Works Thank you in Advance i have doubts on Hash Partion TEch Could please g..

Answer / pranay

Consider you r having two nodes node 1 and node and u
selected e_id as hash key then
for two nodes for three nodes
node 1 node 2 node 1 node 2 node 3
1,10 2,10 1,10 2,10 3,20
3,20 4,20 4,20 5,30 6,40
5,30 6,40

if u selected dept_no as hash id then
for two node for three node
node 1 node 2 node1 node2 node3
1,10 3,20 1,10 3,20 5,30
2,10 4,20 2,10 4,20
5,30 6,40 6,40

Is This Answer Correct ?    6 Yes 6 No

HOw Hash Partion Works Thank you in Advance i have doubts on Hash Partion TEch Could please g..

Answer / pranay

i don't know y some one ticked my ans as wrong, please give me explanation, n correct ans if i'm not correct. don't tick blindly as no.

Harikrishna, ur ans is correct if it is 4 node configuration and dept_no is key column, read the question properly he asked (1) 2 or 3 node and key column as e_id
(2) 2 or 3 node and key column is dept_id

Is This Answer Correct ?    0 Yes 0 No

HOw Hash Partion Works Thank you in Advance i have doubts on Hash Partion TEch Could please g..

Answer / harikrishna chidrala

Hi Pranay,

Sorry I got confused with your answer thats Y i messed it up

Is This Answer Correct ?    0 Yes 0 No

HOw Hash Partion Works Thank you in Advance i have doubts on Hash Partion TEch Could please g..

Answer / harikrishna chidrala

If U make Dept_no as Key Then data will be as below:
node 1 node2 node3 node4
1,10 3,20 5,30 6,40
2,10 4,20

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Data Stage Interview Questions

Why do you need stage variables?

0 Answers  


Is it possible to implement parallelism in Mainframe Jobs ? If Yes how ? If no why ?

0 Answers   IBM,


How and where you used hash file?

0 Answers  


how many write modes are there in ds

2 Answers   IBM,


What is diff between Junk dimensions and conform dimension?

4 Answers   Polaris,






Drop duplicate records ... SOURCE LIKE .......... ID flag1 flag2 100 N Y 100 N N 100 Y N 101 Y Y 101 N Y 102 Y N 103 N N 104 Y Y 105 N N 106 N Y 102 N Y 105 Y Y in above file if any id having both the flags as "N" then that corresponding id records should be dropped, in above case o/p should be as ID flag1 flag2 101 Y Y 101 N Y 102 Y N 102 N Y 104 Y Y 106 N Y Steps to do : 1) Identified the id’s that got duplicated (both the flag values having vales “N”) 2) Look up with these id’s to existing id’s to drop .

2 Answers  


What is the difference between odbc and drs stage?

0 Answers  


What a datastage macro?

0 Answers  


Hi All, Could you please let me know whether Datastage server and px supports oredb? OREDB:It's a Oracle Retail Embedded Database.Previousely It was called as Acumate data base. It's a multidimensional database. Please help me on this issue ASAP. Thanks in advance Ashok

1 Answers   Accenture,


how do u convert date in 20-12-07 to dec-20-2007 or 20-dec- 2007 or 20-dec-07 in parallel

3 Answers   Wipro,


I have 100 records how can I load at a time from the single time

1 Answers  


pls ,tell me good Training centre with Job Oppertunity for Data stage in chennai?

1 Answers  


Categories