Visual Importer ETL support a full range of file operations:

  • Copy Files(s)
  • Move Files(s)
  • Rename File
  • Create Directory
  • Delete File(s)
  • Merge File(s)
  • Change File Attribute(s)
  • Compare files using creation, date size or MD5
  • Check if file(s) exists

All of them can be performed using a mask, so unlike SSIS or DTS no loops or additional programming is required

File operation example

In some ETL scenarios, when processing files, it is necessary to move the already processed files to a different location. With Visual Importer ETL, you can accomplish that in a single step using the File System Task. In this example, the first step checks if we have something to load, then data is loaded into the SQL server, a New archive directory is created and files are moved into it. On success DBA is notified on error IT support team.

File Operations Package
Create directory is using <archive> directory location, plus it creates new directory every day by using functions  in directory name as follows:

GETSYSTEMVARIABLE('SYSTEM_DATE') returns the current date in ‘YYYYMMDDHHNNSS’ format
If we want only part of the date we can use LeftString(String,Count):String for example
LeftString(GETSYSTEMVARIABLE('SYSTEM_DATE'),8) will return only date part.
Now more complicated example for loading yesterday’s data:

LeftString(DecDateS(GETSYSTEMVARIABLE('SYSTEM_DATE'),'YYYYMMDDHHNNSS', 'DAY',1),8)

Note:
For a complete reference of available functions please consult our WIKI
Create Directory
Directory properties <archive> is replaced with c:\archive

Directory Properties

 

Direct link, no registration required.