BookmarkSubscribeRSS Feed
Rohit_1990
Calcite | Level 5

Hi All,

i have four datasets as follows

data one

col1 cls_id
1 a
2 c
3 a


data two

col1 cls_id
1 d
6 e
8 d


data three

col1 cls_id
7 h
9 f
8 h

data four

col1 cls_id
10 m
5 l
9 m

Now from these tables i need to create a final table so that each common element from these tables have a common cls_id
and all associated elements to that common element in different table also do have same common cls_id.

* FYI Actually i was running optnet to link elements but because of data size i am not able to run in a single go.
Hence,I had to split the data and run optnet and try to merge these four tables .


In table one and two element 1 is common and 8 is a associated element further 8 is also present in table 3 with
7 attached to it.

hence 1,3,7,8 should share same cluster id

similarly 9 and 10 should have same id


Any help would be greatly appreciated.

Regards

 

 

 

 

7 REPLIES 7
tomrvincent
Rhodochrosite | Level 12
So you want up to 4 separate cls_id columns per col1 or up to 4 cls_id records per col1?
PGStats
Opal | Level 21

So, what should the "final table" be for these data?

PG
Rohit_1990
Calcite | Level 5

the final table should be something like this

 

col1    final_cls_id

1            h

2            c 

3            h

5            l  

6            e

7            h

8            h

9            m

10          m

 

 

so since value 1 in  col1 indifferent tables i associated to 3 & 8  and 8 is again attached to 7 as they have same cls_id in different tables.

 

Hence I have assigned same cls_id to all these values.

 

 

I have a table which contains 70 million records but I am able to run proc optnet on some 15 million records only . Is there any way to run optnet based on group by condition.

 

Thanks and Regards

 

 

PGStats
Opal | Level 21

Are you using the concomp algorithm? What do you use as node labels (IDs)?

PG
Rohit_1990
Calcite | Level 5
Yes I am using concomp algorithm
PGStats
Opal | Level 21

What do you use as node labels (IDs). Numbers or character strings?

 

Please post your optnet code.

PG
Rohit_1990
Calcite | Level 5
I am using number strings

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 883 views
  • 0 likes
  • 3 in conversation