BookmarkSubscribeRSS Feed
JJP1
Pyrite | Level 9

i am trying to create job where splitting the dataset based on below condition

 

type='ggg' & date >=6monthsold

 

please note that type and date are columns.iam using splitter transformation.would you please suggest how can i write condition under  "Subset Data". in splitter transformation pease

4 REPLIES 4
Patrick
Opal | Level 21

@JJP1 

With the Splitter Transformation you've got 1 source and n targets. You then can define the row selection criteria by target. 

The syntax you've posted could be such a condition for one target table.

 

Not sure what else I could tell you that's not also documented in detail.

http://support.sas.com/documentation/cdl/en/etlug/65016/HTML/default/viewer.htm#p13z8u5ou5fm8rn17fqv... 

 

My standard advice is always: Look into the generated code as this lets you understand how things that you define in the transformation translate into generated code.Once you understand this relationship transformations become "demystified" and you can tweak them much better.

JJP1
Pyrite | Level 9

Thanks @Patrick for reply.

I need to split the data based on column "type " where it  hold values like "666" ,"hhh " where type="666" and type="hhh"

 

and i need to keep data only for last 6 records for type="666" but not for type"hhh" please.

 

sorry if this doesnot make any sense to you please.please help on best way to do this please.

 

thanks patrick for standard advice.iam following

LinusH
Tourmaline | Level 20

It sounds a bit confusing (at least to me), please exemplify using sample input and output data.

Data never sleeps
Patrick
Opal | Level 21

@JJP1 

I can't know how your source data looks like. Why don't you post a SAS Data step which creates a representative sample of your source data. Then show us how the two target data sets need to look like and explain the logic required for splitting.

May be forget about DIS in the moment. Let's just get something working with simple SAS datastep code. Once we've got something working then converting the logic into DIS shouldn't be that hard anymore.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1570 views
  • 0 likes
  • 3 in conversation