# How to split up file

**URL:** <https://forum.cloverdx.com/t/how-to-split-up-file/959>\
**Category:** CloverDX Platform\
**Created:** [November 5, 2011, 12:00am UTC](https://forum.cloverdx.com/t/how-to-split-up-file/959 "2011-11-05T00:00:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rvanwass](https://avatars.discourse-cdn.com/v4/letter/r/dfb087/32.png) [@rvanwass](https://forum.cloverdx.com/u/rvanwass)\
**Post date:** [November 5, 2011, 12:00am UTC](https://forum.cloverdx.com/t/how-to-split-up-file/959/1 "2011-11-05T00:00:00Z")

</div>

Hi,

being new to Clover (and ETL in general) I have perhaps a basic question.

I’m trying something out in the graphical interface, in order to be able to use this with Oracle Identity Analytics.

What I try to do:  
I have as input a flat text file with 2 types of entries immediately after one another:

U;usernameA;field2;…field8  
U;usernameB;field2;…field8  
R;usernameA;field2;…;field5  
R;usernameA;field2;…;field5  
R;usernameB;field2;…;field5

The U records are user names, the R ones responsibilities attributed to these users.

What I need to get in the end are User records, with the responsibilities attributed to them. What I try to do is first isolate the U records and the R ones and then combine them.

When I try to filter the data with metadata assigned on the correct edge, I get an error when I run the graph because the number of records is different.  
I then tried to have a separate metadata especially for the filter (with only the first character filtered out), and then after the filter try to apply the full metadata I get an error that I the metadata is different. Well, of course it is.

How could this be done?

Thanks in advance,

Rik

---

<div class="post-metadata">

**Author:** ![mzatopek](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@mzatopek](https://forum.cloverdx.com/u/mzatopek)\
**Post date:** [November 7, 2011, 4:29pm UTC](https://forum.cloverdx.com/t/how-to-split-up-file/959/2 "2011-11-07T16:29:00Z")

</div>

If I understand right you have a single file with two different data records (user information and resposibility information).

For this purpose we have special reader component - Complex Data Reader [http://www.cloveretl.com/documentation/UserGuide/topic/com.cloveretl.gui.docs/docs/complexdatareader.html](http://www.cloveretl.com/documentation/UserGuide/topic/com.cloveretl.gui.docs/docs/complexdatareader.html)

After few minutes I was able to prepare simple graph which reads your desired data format. Check out the attached project.

- [ComplexReaderExample.zip](https://cdn.cloverdx.com/forum/302%5F6d90f85f22fe564dacd3d5d8188657f6/ComplexReaderExample.zip)
