Importing Files

Introduction

Global configuration is done so that connections are ready for use by task designers. Among the connection configurations that need to be considered are those for steps involving the import of data files in XML and flat formats.

XML documents and flat files

A TaskCentre step can be designed to use data from a variety of sources. These include database records and data files in a variety of different formats.Two types of file are commonly imported into TaskCentre:

  • XML documents
  • Flat files (such as plain text and CSV files)

Importing XML docs

A TaskCentre step can consume data in a variety of different formats. One of these formats is XML.

Once a XML document has been imported into TaskCentre, its data is available for Tasks to use.

XML data in Tasks

Xml data is validated at task run-time, using a schema definition. The schema definition file (XSD file) can be imported along with the XML document. Alternatively, a schema definition can be inferred from the XML document.

The output from an XML-consuming step can also be an XML document. In this case, the XML document, together with its schema, is made available for use by other tools which consume XML, such as the Convert XML to Recordset tool.

Configuring XML Import

The main global configuration responsibility for the TaskCentre administrator is to set the time-out period.

This determines how long TaskCentre will spend seeking the chosen XML file during run-time.

After attempting to retrieve the file for the specified period, TaskCentre stops trying and reports an error.

This global configuration is done in the Import XML Document tool.

Setting time-out period

To access the global configuration settings, you open the Import XML Document tool. (the tool is in the Input Tools Group)

The dialog box that opens provides a field for manually entering the time-out period and buttons for accepting or cancelling the setting.

You enter your required period in seconds. A default value of 2 seconds is prompted.

xml-import-global-config

Above: Import XML document time-out dialog box

Set folder permissions

One other thing the TaskCentre administrator should do is ensure that the folders from which the Import XML Document tool reads the files have their permissions set to allow this read access.

Importing flat files

A step can consume data from a variety of different sources and in a variety of formats. One of these is the flat file.

Flat file data in Tasks

A flat file is a delimited or fixed-width document, using plain text (TXT) or comma-separated values (CSV) formats. Spreadsheet data is commonly save in this format.

Flat files can be imported into TaskCentre, where the contents are extracted and available for use in Tasks. The tool for doing this is the Import Flat File Tool.

The content extracted from a flat file may be exposed to other TaskCentre tools. The output may be a recordset, or an XML document.

Configuring Import Flat File

For the TaskCentre administrator, the only global configuration requirement for Import Flat File is, like that for Import XML Document, the setting of a time-out period.

This specifies an acceptable period during which TaskCentre tries to retrieve the required flat file during run-time.

If, after the period, the file has not been retrieved, TaskCentre stops trying and reports an error.

Setting time-out period

To access the global configuration settings, you open the Import Flat File tool. The tool is in the Input Tools Group.

In the dialog box that opens, you can manually enter the time-out period and accept your setting.

You enter the period in seconds. A default value of 2 seconds is prompted.

flat-file-global-config

Above: Import Flat File time-out dialog box

Setting folder permissions

One other thing the TaskCentre administrator should do is ensure that the folders from which the Import Flat File tool reads the files have their permissions set to allow read access.

Importing files: In summary

Data for TaskCentre tasks data can also be imported from files such as XML documents and flat files. The tools used for importing these inputs are the Import XML Document tool and the Import Flat File tool, respectively. There is little global configuration to be done for these inputs; it is limited mainly to setting the timeout period. This is the time allowed for TaskCentre to attempt to retrieve an XML or flat file before reporting an error.

Return to TaskCentre Administration