Could be possible with ComplexDataReader?

Hello, i have this .txt file that i need to parse is it possible to do it with ComplexDataReader?

i’ve been trying with no luck, thanks.

Format:
Store|TransDate|TransID|BEFAFT|Type|Qty|Amount (something like that)

File Example:

Cash Balancing Transaction Changes Log Time: 7:13:32
Store: 50 Trans Date: 4/26/11 Register: 1
Store CCY: USD U.S. Dollars
TRANS: 23551
BEFORE: Trn Type: EB END BALANC Trn Time: 19:15:38 Trn Amount: 1,940.810
Till: 29359 Acct Type: Acct No:
Cashier: 29359 Cust No:
Seq Type Description SKU Quantity Unit Price Discounts Ext Price Sts
1 YY CUR. TENDE .000 .00 1,940.81 0
1 XY MEMO ONLY .000 1,940.81 1,940.81 0

AFTER: Trn Type: EB END BALANC Trn Time: 19:15:38 Trn Amount: 1,951.390
Till: 29359 Acct Type: Acct No:
Cashier: 29359 Cust No:
Seq Type Description SKU Quantity Unit Price Discounts Ext Price Sts
1 YY CUR. TENDE 1.000 1,951.39 1,951.39 0
2 XY MEMO ONLY .000 1,951.39 1,951.39 0

Hi,

Can you please share how the output file would look like for the mentioned input file? I mean not just the metadata structure but all data records. I am not sure what values you would like to see in some of the fields.

Thanks.

Hi i attached the project i managed to display the output the way i like but im having problems using the selector functionality.

I have the “Detail” section:

BEFORE: Trn Type: EB END BALANC Trn Time: 19:15:38 Trn Amount: 1,940.810
Till: 29359 Acct Type: Acct No:
Cashier: 29359 Cust No:
Seq Type Description SKU Quantity Unit Price Discounts Ext Price Sts
1 YY CUR. TENDE .000 .00 1,940.81 0
AFTER: Trn Type: EB END BALANC Trn Time: 19:15:38 Trn Amount: 1,940.810
Till: 29359 Acct Type: Acct No:
Cashier: 29359 Cust No:
Seq Type Description SKU Quantity Unit Price Discounts Ext Price Sts
1 YY CUR. TENDE .000 .00 1,940.81 0

but i can have multiple transactions:

BEFORE: Trn Type: EB END BALANC Trn Time: 19:15:38 Trn Amount: 1,940.810
Till: 29359 Acct Type: Acct No:
Cashier: 29359 Cust No:
Seq Type Description SKU Quantity Unit Price Discounts Ext Price Sts
1 YY CUR. TENDE .000 .00 1,940.81 0
1 XX CUR. TENDE .000 .00 1,950.81 0
AFTER: Trn Type: EB END BALANC Trn Time: 19:15:38 Trn Amount: 1,940.810
Till: 29359 Acct Type: Acct No:
Cashier: 29359 Cust No:
Seq Type Description SKU Quantity Unit Price Discounts Ext Price Sts
1 YY CUR. TENDE .000 .00 1,940.81 0
1 XX CUR. TENDE .000 .00 1,950.81 0
i need to use selector to loop until he finds word AFTER: to continue to the next metadata, but aparently i dont know how to use the selector because when i manually add a new transaction and try to loop until he finds prefix " AFTER:" it causes an error.

Thanks.

Was able to use the selector, moving all the transitions to the selector tab, last version attached.

Hi,

I was able to modify your graph with the following changes

  • I set up two output ports in the ComplexDataReader, passing the Before data and the second port the After data

  • I later combined the data streams using the Combine component

You should be able to see that the Before and After data are all in the same record