cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion in Sender Side

Former Member
0 Kudos

Hi Experts

I am facing a big Challenges in Bring out following requirement.

Kindly help me whether the Blow structure is Possible.

INPUT FILE STRUCTURE

"VarName;""TimeString"";""VarValue"";""Validity"";""Time_ms""",,

"Total_act_Butter;""31-10-2013 21:47:20"";98;1;41578907870",2431,

"Total_act_Liquor;""31-10-2013 21:47:20"";200;1;41578907870",2431,

"Actual_date_time;""31-10-2013 21:47:20"";""1-1-1990 21:47:18"";1;41578907870",2431,

"Cycle_time;""31-10-2013 21:47:20"";8",857966;1;41578907870,2431

"Cycle_number;""31-10-2013 21:47:20"";8;1;41578907870",2431,

"Total_act_Butter;""31-10-2013 21:55:19"";294;1;41578913416",7361,

"Total_act_Liquor;""31-10-2013 21:55:19"";600;1;41578913416",7361,

"Actual_date_time;""31-10-2013 21:55:19"";""1-1-1990 21:55:18"";1;41578913416",7361,

"Cycle_time;""31-10-2013 21:55:19"";14",16882;1;41578913416,7361

"Cycle_number;""31-10-2013 21:55:19"";10;1;41578913416",7361,

OUTPUT Structure Need

<Record>

<Total_act_Butter>98</Total_act_Butter

<Total_act_Liquor>200</"Total_act_Liquor>

<Actual_date_time>1-1-1990 21:47:18</Actual_date_time>

<Cycle_time>8</Cycle_time>

<Cycle_number>8</Cycle_number

<Key>41578907870</Key>

</Record>

<Record>

<Total_act_Butter>294</Total_act_Butter

<Total_act_Liquor>600</"Total_act_Liquor>

<Actual_date_time>1-1-1990 21:55:18</Actual_date_time>

<Cycle_time>16882</Cycle_time>

<Cycle_number>10</Cycle_number

<Key>41578913416</Key>

</Record>

Regard's

PreethiRaja.

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Hi,

As other folks metioned , it is simple to collect all the data into a primary dataset using FCC and filter it in the mapping .

Catch the complete Queue in the mapping Context and use the node function createIf with condition of field name .

f.Ex :  Creatif( elment name is Total_act_Butter )  with value 98

Lemme know if you need any further help.

mvh

Kishore

Former Member
0 Kudos

Hi Anand,

I don't think you can do this with only content conversion, but you can using content conversion and a mapping.

Use content conversion to create a structure like

RecordSet

     Record
          VarName

          TimeString

          VarValue

          Validity

          Time_ms

          Field6

          Field7

Content conversion parameters would be something like:

Recordset name:               RecordSet

Recordset structure:          Record,*

Record.fieldNames:          VarName,TimeString,VarValue,Validity,Time_ms,Field6,Field7

Record.fieldSeparator:     ;

Then create the mapping to map this structure to your required structure.

Kind regards,

Koen

Former Member
0 Kudos

Hello,

I think you have to read entire text file (read each line one by one inside PI) and then using mapping functions u can create ur output structure.

Thanks

Amit Srivastava 

Dimitri
Active Contributor
0 Kudos

Hi,

Just read the entire message using FCC. Afterwards, use a message mapping to filter out the things you need.

Kind regards,

Dimitri

Former Member
0 Kudos

Hi Dimitri,

Kindly can pls provide me any Blogs which helps me to do this .

PreethiRaja.