HomeForum
Welcome, Guest

Conditional Insert using Text Files
(1 viewing) (1) Guest
Data Warehousing and Data integration
  • Page:
  • 1

TOPIC: Conditional Insert using Text Files

Conditional Insert using Text Files 9 months, 1 week ago #3634

  • Paul
  • OFFLINE
  • Fresh Boarder
  • Posts: 11
  • Karma: 0
Hello

I have a data transformation task similar to this one.
www.altova.com/forum/default.aspx?g=posts&t=300

Can I achieve the same result with Advanced ETL processor?

Paul

Re: Conditional Insert using Text Files 9 months, 1 week ago #3635

  • admin
  • OFFLINE
  • Moderator
  • Posts: 2183
  • Karma: 12
Thank you for the question

Sure it is possible.

I have created a working example.

Download zip file
extract all files into c:\support folder.

Basically you need to identify the last record in the group

HDR,100,xxx,xxx,xxx,xxx,xxx,xxx,xxx
DTL,100,xxx,xxx,xxx,xx,xx,xxx,xxx,xxxx,xxx,xx,xxx,
RSN,100,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx <=== last record
HDR,200,xxx,xxx,xxx,xxx,xxx,xxx,xxx
DTL,200,xxx,xxx,xxx,xx,xx,xxx,xxx,xxxx,xxx,xx,xxx,
RSN,200,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx
RSN,200,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx
RSN,200,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx <=== last record
HDR,300,xxx,xxx,xxx,xxx,xxx,xxx,xxx
DTL,300,xxx,xxx,xxx,xx,xx,xxx,xxx,xxxx,xxx,xx,xxx,
RSN,300,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx
RSN,300,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx <=== last record

This can be done by generation row number and sorting the data twice

So the record with number 1 indicates last record
Than we clone last record and use lookup to get record from the file

Mike
Attachments:
  • Page:
  • 1
Time to create page: 0.14 seconds

Testimonials

"Using Visual Importer ETL was a lot easier than we expected it to be, and had a lot more functionality than our other software."

Daniel Boel,
Information Technology Manager

User Login

You only need to log in or register to use our support forum



Our customers

BP

BBC

HSBC


Databases we work with

Go to top