Thread: Re: [Servingxml-help] Transformation on Flat files
Brought to you by:
danielaparker
From: Daniel P. <dan...@sy...> - 2006-01-11 13:41:43
|
When I've received an example from you showing an original and expected file layout, that covers off your use cases, I'll have a look at it. In the meantime, you can use the other options mentioned in my response. Regards, Daniel Parker ----- Original Message ----- From: "Bala Murali" <sba...@ya...> To: "Daniel Parker" <dan...@sy...> Sent: Tuesday, January 10, 2006 11:38 PM Subject: Re: [Servingxml-help] Transformation on Flat files > Hi Daniel > > I was trying to modify your examples books to acheive > this, so there are no new sample files, I would of > course test them once you put in the release and let > you know my findings. I assume this is going to be a > generic record element which can take any operation > like concat, replace, trim etc with parameters via > sx:property > > Regards > > Bala > > > > --- Daniel Parker <dan...@sy...> wrote: > >> Hello Bala, >> >> Currently, flat to flat transformation as shown in >> the examples does not >> support transformations other than with a Java >> record filter. An >> alternative option would be to use the record >> mapping to XML followed by an >> inverse record mapping to flat, which would work, >> but might be a little >> excessive for the purpose at hand. It is, however, >> relatively easy to add a >> new element, say sx:changeRecordFilter, which would >> allow you to do these >> things simply. I'll put out a new release in about >> a week with the new >> element. The element could also be made available >> as a patch to your >> exisiting release. >> >> If possible, it would be appreciated if you could >> provide a simple example >> with an original and target flat file, to test that >> the element covers off >> all your cases. >> >> Regards, >> Daniel Parker >> >> ----- Original Message ----- >> From: "Bala Murali" <sba...@ya...> >> To: <ser...@li...> >> Sent: Tuesday, January 10, 2006 12:51 AM >> Subject: [Servingxml-help] Transformation on Flat >> files >> >> >> > Hi >> > >> > I am working on a flat file to flat file >> > transformation resource files where I would like >> to >> > apply multiple >> > functions like >> > >> > - concat >> > - Replace >> > - substring >> > - trim >> > etc. Is there a way to do this, I see this is >> possible >> > in xml with various sx:replace. >> > >> > Any help most welcome >> > >> > Thanks >> > >> > Bala >> > >> > >> > >> > __________________________________________ >> > Yahoo! DSL - Something to write home about. >> > Just $16.99/mo. or less. >> > dsl.yahoo.com >> > >> > >> > >> > >> > ------------------------------------------------------- >> > This SF.net email is sponsored by: Splunk Inc. Do >> you grep through log >> > files >> > for problems? Stop! Download the new AJAX search >> engine that makes >> > searching your log files as easy as surfing the >> web. DOWNLOAD SPLUNK! >> > >> > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click >> > _______________________________________________ >> > Servingxml-help mailing list >> > Ser...@li... >> > >> > https://lists.sourceforge.net/lists/listinfo/servingxml-help >> > >> >> >> > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > |
From: Daniel P. <dan...@sy...> - 2006-01-16 04:38:40
|
Version 0.3.3 has been released, which includes this example as "bookorders" in the "Flat to Flat" section of the on-line examples. Regards, Daniel Parker ----- Original Message ----- From: "Bala Murali" <sba...@ya...> To: "Daniel Parker" <dan...@sy...> Sent: Wednesday, January 11, 2006 10:08 PM Subject: Re: [Servingxml-help] Transformation on Flat files > Hi Daniel > > Please see the attached zip file > > 1.resources-testconversion.xml converts positional to > delimited > > 2.input-books-pos is the input file > > 3.output-books-delim is the output file if you run > with the existing resource-testconversion.xml > > 4.However the expected output is > expected-output-books-delim.txt. The expected output > file should have INV static text appended to InvoiceNo > and the date format of InvoiceDate is converted from > dd/MMM/YYY to dd/mm/YYYY. So we need a transformation > of concat and changeDate, similarly there could be > other use cases like trim, replace etc. > > Regards > > Bala > > --- Daniel Parker <dan...@sy...> wrote: > >> When I've received an example from you showing an >> original and expected file >> layout, that covers off your use cases, I'll have a >> look at it. In the >> meantime, you can use the other options mentioned in >> my response. >> >> Regards, >> Daniel Parker >> >> ----- Original Message ----- >> From: "Bala Murali" <sba...@ya...> >> To: "Daniel Parker" <dan...@sy...> >> Sent: Tuesday, January 10, 2006 11:38 PM >> Subject: Re: [Servingxml-help] Transformation on >> Flat files >> >> >> > Hi Daniel >> > >> > I was trying to modify your examples books to >> acheive >> > this, so there are no new sample files, I would of >> > course test them once you put in the release and >> let >> > you know my findings. I assume this is going to be >> a >> > generic record element which can take any >> operation >> > like concat, replace, trim etc with parameters via >> > sx:property >> > >> > Regards >> > >> > Bala >> > >> > >> > >> > --- Daniel Parker <dan...@sy...> >> wrote: >> > >> >> Hello Bala, >> >> >> >> Currently, flat to flat transformation as shown >> in >> >> the examples does not >> >> support transformations other than with a Java >> >> record filter. An >> >> alternative option would be to use the record >> >> mapping to XML followed by an >> >> inverse record mapping to flat, which would work, >> >> but might be a little >> >> excessive for the purpose at hand. It is, >> however, >> >> relatively easy to add a >> >> new element, say sx:changeRecordFilter, which >> would >> >> allow you to do these >> >> things simply. I'll put out a new release in >> about >> >> a week with the new >> >> element. The element could also be made >> available >> >> as a patch to your >> >> exisiting release. >> >> >> >> If possible, it would be appreciated if you could >> >> provide a simple example >> >> with an original and target flat file, to test >> that >> >> the element covers off >> >> all your cases. >> >> >> >> Regards, >> >> Daniel Parker >> >> >> >> ----- Original Message ----- >> >> From: "Bala Murali" <sba...@ya...> >> >> To: <ser...@li...> >> >> Sent: Tuesday, January 10, 2006 12:51 AM >> >> Subject: [Servingxml-help] Transformation on Flat >> >> files >> >> >> >> >> >> > Hi >> >> > >> >> > I am working on a flat file to flat file >> >> > transformation resource files where I would >> like >> >> to >> >> > apply multiple >> >> > functions like >> >> > >> >> > - concat >> >> > - Replace >> >> > - substring >> >> > - trim >> >> > etc. Is there a way to do this, I see this is >> >> possible >> >> > in xml with various sx:replace. >> >> > >> >> > Any help most welcome >> >> > >> >> > Thanks >> >> > >> >> > Bala >> >> > >> >> > >> >> > >> >> > __________________________________________ >> >> > Yahoo! DSL - Something to write home about. >> >> > Just $16.99/mo. or less. >> >> > dsl.yahoo.com >> >> > >> >> > >> >> > >> >> > >> >> >> > >> > ------------------------------------------------------- >> >> > This SF.net email is sponsored by: Splunk Inc. >> Do >> >> you grep through log >> >> > files >> >> > for problems? Stop! Download the new AJAX >> search >> >> engine that makes >> >> > searching your log files as easy as surfing the >> >> web. DOWNLOAD SPLUNK! >> >> > >> >> >> > >> > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click >> >> > _______________________________________________ >> >> > Servingxml-help mailing list >> >> > Ser...@li... >> >> > >> >> >> > >> > https://lists.sourceforge.net/lists/listinfo/servingxml-help >> >> > >> >> >> >> >> >> >> > >> > >> > __________________________________________________ >> > Do You Yahoo!? >> > Tired of spam? Yahoo! Mail has the best spam >> protection around >> > http://mail.yahoo.com >> > >> >> >> >> >> > ------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. Do >> you grep through log files >> for problems? Stop! Download the new AJAX search >> engine that makes >> searching your log files as easy as surfing the >> web. DOWNLOAD SPLUNK! >> > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click >> _______________________________________________ >> Servingxml-help mailing list >> Ser...@li... >> > https://lists.sourceforge.net/lists/listinfo/servingxml-help >> > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com |
From: Daniel P. <dan...@sy...> - 2006-03-07 04:26:14
|
Bala, This feature is now supported in version 0.4.1. New elements sx:crcFlatFileSignature and sx:sizeFlatFileSignature have been introduced to allow flat files to be signed with the CRC value and byte count of their data sections, with the signature values placed in header or trailer records. These values will be checked when the file is read and created when the file is written. See the "flat to flat" example "checked books" in the on-line examples. Regards, Daniel Parker ----- Original Message ----- From: "Bala Murali" <sba...@ya...> To: "Daniel Parker" <dan...@sy...> Sent: Wednesday, January 18, 2006 5:08 AM Subject: Re: [Servingxml-help] Transformation on Flat files > In the flat file processing we have a common > requirement of checking integrity of the file. > Typically the header record will contain CRC value of > the file. We would like to > > 1.Extract CRC from the header. > > 2.Strip the header record from the file, compute CRC > > 3. Check CRC if it matches > > Now if we use servingxml to map the CRC element of the > header to a target field, I am not sure how to do the > next step since the file is in a streamed processing > mode. Pls let me know is there an elegant solution to > this, since I do not want to put an extraction logic > for each and every format of the file. The extraction > should really happen within this framework > > Regards > > Bala > |