R
RACHAK
InPut File
============
BUCKET|Drawing Type|Assembly|Stage|1|GTTBRG001_ASM|
BUCKET|Drawing Type|Machining|Stage|2|GTTBRG002|
LOCKING BUCKET|Drawing Type|Machining|Stage|3|GTTBRG003|
NOZZLE TURBINE|Drawing Type|Assembly|Stage|3|GTTBSG003_ASM|
NOZZLE TURBINE|Drawing Type|Machining|Stage|3|GTTBSG003|
STUB SHAFT COMPRESSOR|Drawing
Type|Machining|Stage|0|LOCATION|FWD|GTCPRO000|
COMPRESSOR|Drawing Type|Machining|Stage|1|LOCATION|FWD|SUB
LOCATION|FWD1|GTTCRX001|
The above data is in a input file, will be dynamic, can change over a
period and more Key Value pairs can be added
File Description:
First Column is Header Info for each record Example:
COMPRESSOR
Last Column is the Final Value that has to be returned. EXAMPLE:
GTTCRX001
Remaining Columns are represented/used as Key Value Pairs.
Expample:
Drawing Type, Machining
Stage,1
LOCATION,FWD
SUB LOCATION, FDW1
We can add any number of Key Value pairs for each record.
Help:
Can some one provide me a solution for doing this task.
Read the File & For each record ( combination of First & Last Column
: get all the Key Value Pairs )
Check this key value pairs exists in a list "INLIST" and if all the
Key Value Pairs are found Return the last Column
INLIST: ( Is not a file but output of another Process )
{COMPRESSOR-> Drawing Type->Machining->Linear
Assembly->BKT->Stage->1->LOCATION->FWD1->SUB
LOCATION->FWD1->CAP->Assembly }
Example:
Drawing Type->Machining ( Key Value Match found for Column1=COMPRESSOR
when compared between INLIST and input File )
+
Stage->1 ( Key Value Match for Column1=COMPRESSOR when compared
between INLIST and input File )
+
LOCATION->FWD1 ( Key Value Match for Column1=COMPRESSOR when compared
between INLIST and input File )
+
SUB LOCATION->FWD1 ( Key Value Match for Column1=COMPRESSOR when
compared between INLIST and input File )
Since all the 4 Key Value Pairs exists in the "INLIST"
Retrun Last Column from InputFile "GTTCRX001"
Thanks in Advance
RACHAK
============
BUCKET|Drawing Type|Assembly|Stage|1|GTTBRG001_ASM|
BUCKET|Drawing Type|Machining|Stage|2|GTTBRG002|
LOCKING BUCKET|Drawing Type|Machining|Stage|3|GTTBRG003|
NOZZLE TURBINE|Drawing Type|Assembly|Stage|3|GTTBSG003_ASM|
NOZZLE TURBINE|Drawing Type|Machining|Stage|3|GTTBSG003|
STUB SHAFT COMPRESSOR|Drawing
Type|Machining|Stage|0|LOCATION|FWD|GTCPRO000|
COMPRESSOR|Drawing Type|Machining|Stage|1|LOCATION|FWD|SUB
LOCATION|FWD1|GTTCRX001|
The above data is in a input file, will be dynamic, can change over a
period and more Key Value pairs can be added
File Description:
First Column is Header Info for each record Example:
COMPRESSOR
Last Column is the Final Value that has to be returned. EXAMPLE:
GTTCRX001
Remaining Columns are represented/used as Key Value Pairs.
Expample:
Drawing Type, Machining
Stage,1
LOCATION,FWD
SUB LOCATION, FDW1
We can add any number of Key Value pairs for each record.
Help:
Can some one provide me a solution for doing this task.
Read the File & For each record ( combination of First & Last Column
: get all the Key Value Pairs )
Check this key value pairs exists in a list "INLIST" and if all the
Key Value Pairs are found Return the last Column
INLIST: ( Is not a file but output of another Process )
{COMPRESSOR-> Drawing Type->Machining->Linear
Assembly->BKT->Stage->1->LOCATION->FWD1->SUB
LOCATION->FWD1->CAP->Assembly }
Example:
Drawing Type->Machining ( Key Value Match found for Column1=COMPRESSOR
when compared between INLIST and input File )
+
Stage->1 ( Key Value Match for Column1=COMPRESSOR when compared
between INLIST and input File )
+
LOCATION->FWD1 ( Key Value Match for Column1=COMPRESSOR when compared
between INLIST and input File )
+
SUB LOCATION->FWD1 ( Key Value Match for Column1=COMPRESSOR when
compared between INLIST and input File )
Since all the 4 Key Value Pairs exists in the "INLIST"
Retrun Last Column from InputFile "GTTCRX001"
Thanks in Advance
RACHAK