Could be possible with ComplexDataReader?

Support/help with CloverETL (4.9) and CloverDX (5.0 or newer) implementation problems

rickymartin06
Posts: 23
Joined: Tue Jun 14, 2016 3:19 pm

Could be possible with ComplexDataReader?

Postby rickymartin06 » Tue Jun 14, 2016 6:31 pm

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

imriskal
Posts: 397
Joined: Wed Aug 15, 2012 8:18 am

Re: Could be possible with ComplexDataReader?

Postby imriskal » Thu Jun 16, 2016 2:57 pm

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.
---
Lubos Imriska
CloverCARE Support
CloverDX

Visit us online at http://www.cloverdx.com

rickymartin06
Posts: 23
Joined: Tue Jun 14, 2016 3:19 pm

Re: Could be possible with ComplexDataReader?

Postby rickymartin06 » Thu Jun 16, 2016 9:49 pm

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.
Attachments
CashBalanceTransactionAudit.7z
(3.32 KiB) Downloaded 160 times

rickymartin06
Posts: 23
Joined: Tue Jun 14, 2016 3:19 pm

Re: Could be possible with ComplexDataReader?

Postby rickymartin06 » Fri Jun 17, 2016 9:26 pm

Was able to use the selector, moving all the transitions to the selector tab, last version attached.
Attachments
CashBalanceTransactionAudit.7z
(9.63 KiB) Downloaded 155 times

vazquezrosariop
Posts: 151
Joined: Mon Feb 29, 2016 5:33 pm

Re: Could be possible with ComplexDataReader?

Postby vazquezrosariop » Mon Jun 27, 2016 4:14 pm

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
Attachments
Main.grf
(24.46 KiB) Downloaded 160 times
---
Pedro X. Vazquez Rosario
CloverCARE Support
CloverDX

Visit us online at http://www.cloverdx.com


cron