Skip to main content
Solved

Text file attribute to Excel file.

  • November 1, 2018
  • 4 replies
  • 66 views

venu
Contributor
Forum|alt.badge.img+5

Dear All,

I have big text file Like shown below as sample

 

Name / Company 01

Location : ABC

TYPE : A

Name / Company 02

Location : DEF

TYPE : Industry

Category : Production

Name / Company 03

Location : DEF

TYPE : Industry

Category : Production

ManagerID : 01

The expected output like shown below,

 

Name,Location,Type,Category,ManagerID

Company 01,ABC,A

Company 02,DEF,Industry,Production

Company 03,DEF,Industry,Production,01

 

In above in each company there are many new attributes available (around 100+)

Please advise.

 

Thanks

Venu

 

Best answer by takashi

Hi @venu, I think this workflow does the trick. Assuming that each destination feature always starts with "Name" entry.

text-to-table.fmwt (FME 2018.1.0.3)

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

takashi
Celebrity
  • Best Answer
  • November 1, 2018

Hi @venu, I think this workflow does the trick. Assuming that each destination feature always starts with "Name" entry.

text-to-table.fmwt (FME 2018.1.0.3)


venu
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • November 2, 2018

Hi @venu, I think this workflow does the trick. Assuming that each destination feature always starts with "Name" entry.

text-to-table.fmwt (FME 2018.1.0.3)

@takashi, Thanks..

may I know how its coming same like counter _feature_id same order for Tester failed port using with VariableRetriever transformer.Please can explain about the _feature_id retrieve using "VariableRetriever "


takashi
Celebrity
  • November 2, 2018

Hi @venu, I think this workflow does the trick. Assuming that each destination feature always starts with "Name" entry.

text-to-table.fmwt (FME 2018.1.0.3)

FME processes features one by one until meeting a blocking transformer. Hopefully this table helps you to understand how the workflow works.

text_line_dataTesterCounterVariableSetterVariableRetrieverName / Company 01Passed_feature_id = 0vFeatureId = _feature_id

 

Location : ABCFailed

 

 

_feature_id = vFeatureIdTYPE : AFailed

 

 

_feature_id = vFeatureIdName / Company 02Passed_feature_id = 1vFeatureId = _feature_id

 

Location : DEF

 

Failed

 

 

_feature_id = vFeatureIdTYPE : Industry

 

Failed

 

 

_feature_id = vFeatureIdCategory : Production

 

Failed

 

 

_feature_id = vFeatureIdName / Company 03

 

Passed_feature_id = 2vFeatureId = _feature_id

 

Location : DEF

 

Failed

 

 

_feature_id = vFeatureId

 


venu
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • November 3, 2018

FME processes features one by one until meeting a blocking transformer. Hopefully this table helps you to understand how the workflow works.

text_line_dataTesterCounterVariableSetterVariableRetrieverName / Company 01Passed_feature_id = 0vFeatureId = _feature_id

 

Location : ABCFailed

 

 

_feature_id = vFeatureIdTYPE : AFailed

 

 

_feature_id = vFeatureIdName / Company 02Passed_feature_id = 1vFeatureId = _feature_id

 

Location : DEF

 

Failed

 

 

_feature_id = vFeatureIdTYPE : Industry

 

Failed

 

 

_feature_id = vFeatureIdCategory : Production

 

Failed

 

 

_feature_id = vFeatureIdName / Company 03

 

Passed_feature_id = 2vFeatureId = _feature_id

 

Location : DEF

 

Failed

 

 

_feature_id = vFeatureId

 

Dear @takashi ,

 

Thank you so much making me understand the workflow