HomeForum
Welcome, Guest

Generate Target Filenames Dynamically
(1 viewing) (1) Guest
Data Warehousing and Data integration
  • Page:
  • 1

TOPIC: Generate Target Filenames Dynamically

Generate Target Filenames Dynamically 4 months, 1 week ago #4444

  • Charu
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Hi Experts,

I have a source table table like below.

ID,Vegetable
101,Banana
102,Apple
103,Onion

Now I need to generate three flat files with names 101.dat , 102.dat, 103.dat .

I am giving the sample date in one flat file.

Please assist me with above transformation...

Thanks you,
Chary

Re: Generate Target Filenames Dynamically 4 months, 1 week ago #4445

  • admin
  • OFFLINE
  • Moderator
  • Posts: 2183
  • Karma: 12
The trick is to use SourceChanged in calculation


begin
SetVariable('<file_name>',[F001]);
SourceChanged; // creating new file
Result:='test';
end;

Than use this as target file name

<CommonDocumentsDir>\DBSL\DEMO\Buffer\file_{GetVariable('<file_name>')}.txt

Simple

There are couple of examples in default repository

Albert

Re: Generate Target Filenames Dynamically 4 months, 1 week ago #4446

  • admin
  • OFFLINE
  • Moderator
  • Posts: 2183
  • Karma: 12
Slight correction

<CommonDocumentsDir>\DBSL\DEMO\Buffer\{GetVariable('<file_name>')}.dat

Peter
  • Page:
  • 1
Time to create page: 0.16 seconds

Testimonials

We had two thousands text files in same format. We were able to load them in one click using Visual Importer ETL.

Pol Barret,
Accountant

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