General Discussions

Discuss any topics that are not product-specific here.
SOLVED

Split dataset records into half

Khaled_Eid
6 - Meteoroid

hi

how can split the dataset records into half and load it in two different destination (without use the total number of records)

7 REPLIES 7
ShankerV
17 - Castor

Hi @Khaled_Eid 

 

One way to do is with the Sample tool.

 

ShankerV_0-1681969561666.png

 

ShankerV_1-1681969585803.png

 

Input contains 8 records. 

 

ShankerV_0-1681969660072.png

 

Note: Using the output tool, you can save the output to new destination.

 

Many thanks

Shanker V

 

ShankerV
17 - Castor

Hi @Khaled_Eid 

 

When the input contains 14 records in input, below is the output.

 

ShankerV_0-1681969802246.png

 

Many thanks

Shanker V

RobertZiegl
8 - Asteroid

I would create a row id per row and then use the mod function to split the file into 2 halfs and then output the data to two destinations (you can add the prefix/suffix to the output table)

2023-04-20 07_53_01-Window.png

Khaled_Eid
6 - Meteoroid

Okay but how can i get The Second half into another output 

ShankerV
17 - Castor

Hi @Khaled_Eid 

 

The below highlighted will help you to get the second half.

 

ShankerV_0-1681970348788.png

 

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @Khaled_Eid 

 

Step 1: Input

 

ShankerV_0-1681970413655.png

 

Step 2: 

 

ShankerV_1-1681970443507.png

Step 3:

 

ShankerV_2-1681970461441.png

 

ShankerV_3-1681970470186.png

 

Step 4:

ShankerV_4-1681970489738.png

 

ShankerV_5-1681970497987.png

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @Khaled_Eid 

 

If in need, the second half should be in same order as input. Then add these 2 tools in additional.

 

Additional steps if in need, 

ShankerV_0-1681970668193.png

ShankerV_3-1681970723607.png

 

 

Additional steps if in need, 

 

ShankerV_1-1681970692976.png

 

ShankerV_2-1681970702144.png

 

Many thanks

Shanker V

Labels