Solved

Text file attribute to Excel file.

  • 1 November 2018
  • 4 replies
  • 5 views

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

 

icon

Best answer by takashi 1 November 2018, 12:38

View original

4 replies

Userlevel 2
Badge +17

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)

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 "

Userlevel 2
Badge +17

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

 

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

Reply