# How do I ETL name-value pair data?

**URL:** <https://forum.cloverdx.com/t/how-do-i-etl-name-value-pair-data/1092>\
**Category:** CloverDX Platform\
**Created:** [July 6, 2012, 12:00am UTC](https://forum.cloverdx.com/t/how-do-i-etl-name-value-pair-data/1092 "2012-07-06T00:00:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eec](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@eec](https://forum.cloverdx.com/u/eec)\
**Post date:** [July 6, 2012, 12:00am UTC](https://forum.cloverdx.com/t/how-do-i-etl-name-value-pair-data/1092/1 "2012-07-06T00:00:00Z")

</div>

I cannot seem to find a control or a way to ETL a flat file like this:

firstname|bob  
lastname|lyons  
address1|123 yellow brick road  
city: Emerald City  
State: AZ  
zip: 34344

#### 

firstname|jane  
lastname|doe  
address1|54321 long street Street  
address2|aprtment 5  
city| Springville  
State: OH  
zip: 55555

#### 

firstname|jack  
lastname|straw  
address1| 65 Pine Way  
city| Longdale  
State: GA

#### 

Thanks in advance for any suggestions.

- Edd

---

<div class="post-metadata">

**Author:** ![eec](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@eec](https://forum.cloverdx.com/u/eec)\
**Post date:** [July 6, 2012, 4:09pm UTC](https://forum.cloverdx.com/t/how-do-i-etl-name-value-pair-data/1092/2 "2012-07-06T16:09:40Z")

</div>

actually, the data has a consistent separator:

firstname|bob  
lastname|lyons  
address1|123 yellow brick road  
city|Emerald City  
state|AZ  
zip|34344

#### 

firstname|jane  
lastname|doe  
address1|54321 long street Street  
address2|aprtment 5  
city|Springville  
state|OH  
zip|55555

#### 

firstname|jack  
lastname|straw  
address1|65 Pine Way  
city|Longdale  
state|GA

#### 

my apologies

---

<div class="post-metadata">

**Author:** ![David\_Hlidek](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@David\_Hlidek](https://forum.cloverdx.com/u/David_Hlidek)\
**Post date:** [July 9, 2012, 8:56am UTC](https://forum.cloverdx.com/t/how-do-i-etl-name-value-pair-data/1092/3 "2012-07-09T08:56:39Z")

</div>

Hi eec,

1] read lines into records with metadata [key, value] (mark value as optional for separator ####)

2] use Reformat component to translate [key, value] into [id, key, value] (ignore separator lines, but increment id when occurs). So your data will look like:

0|firstname|bob  
0|lastname|lyons  
0|address1|123 yellow brick road  
0|city|Emerald City  
0|state|AZ  
0|zip|34344  
1|firstname|jane  
1|lastname|doe  
1|address1|54321 long street Street  
1|address2|aprtment 5  
1|city|Springville  
1|state|OH  
1|zip|55555

3] use [http://doc.cloveretl.com/documentation/ … pivot.html](http://doc.cloveretl.com/documentation/UserGuide/index.jsp?topic=/com.cloveretl.gui.docs/docs/pivot.html) for translation into records (Key=id Field defining output field name=key Field defining output field value=value). Output records must have metada like: [firstname, lastname, address1, …]

I hope this helps

---

<div class="post-metadata">

**Author:** ![eec](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@eec](https://forum.cloverdx.com/u/eec)\
**Post date:** [July 9, 2012, 2:33pm UTC](https://forum.cloverdx.com/t/how-do-i-etl-name-value-pair-data/1092/4 "2012-07-09T14:33:57Z")

</div>

Thank Jaroslav for the reply, that looks like a nice solution and will try that out  
edd
