Data Load Descriptor (DLD) Basics


Overview

Data Loading Descriptors (DLDs) are files that are stored in the Linear Analytics Services (LAS) database and which provide Linear Analytics Services with instructions on how to import various formats of data. You will never need to edit a DLD file directly; instead you use the "Load Data" panel on the Linear Analytics Services Web Interface to create and modify them. The DLD files you create and modify in this manner are automatically saved in the Linear Analytics Services database, although you can use Linear Analytics Services's "Database Files" tool to extract them from the database and save a local version of the file for back-up purposes or to copy a DLD to a different Linear Analytics Services server.

The most common use of DLDs is to reference them in a Linear Data Analysis (LDA) script that loads data. The DLD is referenced in the script in order to tell the script how to load the data. However, it is also possible to use a DLD directly from the "Load Data" panel on the Linear Analytics Services Web Interface in order to load a data file immediately without using a script. While this latter usage is possible, it is not recommended, since it is easy to accidentally change the DLD while doing this and any mistakes that are made when using a DLD directly from the "Load Data" panel are difficult to undo. You are advised to use the "Load Data" panel only to create and edit DLDs, and to always use LDA scripts to perform the actual loading of data.

Types of DLD

DLD files are used for importing the following data types into Linear Analytics Services:

Each of these types of DLD has its own parameters based on the idiosyncrasies of the data type it is importing, but they are all created or edited in the same way, and this page describes that process.

The process of creating or editing a DLD assumes that you have navigated to the Linear Analytics Services Web Interface and selected the Load Data page.

Loading an existing DLD

At the top of the Load Data page there is a section for loading an existing DLD in order to modify it or to use it to load a data file. Pressing the "Select" button will show a pop-up dialog containing a list of all the DLDs that are currently in the database, and selecting one from that dialog will populate the "DLD Name" field. You can then press "Load" to load the DLD into the page for editing or for use.

Creating a New DLD

DLDs can be set up to load data from either a file (a character-separated text file) or from an Oracle or Microsoft SQL Server database table or view.

The first tab on the creation panel is for creating a DLD based on a text file. The settings in this panel are as follows:

The second tab on the creation panel is for creating a DLD based on a database view or table. The settings on this panel are:

Unlike creating a DLD from a file, where the file is only there as a template and is not used when you import data using an LDA script, when you create a DLD from a database it will always use the same database connection and table/view to import data from whenever you import using the DLD.

Modifying a DLD

When you create a DLD or load an existing DLD, you are taken to the DLD editing page where you can set up the details of how the DLD loads data. Some parts of this page are common to all types of DLD and are described here. Parts of the DLD editing process that are specific to particular types of DLD are described in the pages for creating those types of DLD.

At the top of the DLD editing page is a summary of the settings initially used to create the DLD; either file settings (as shown above) or database connection settings. This summary is read-only in that you can't directly edit these settings from this page. If you need to edit these settings (for example if the file that you are using as a template is no longer there and you need to specify a new template file), click the "Update" button. This will pop up a dialog containing the DLD creation settings and allow you to modify any of them.

Data Specific Settings

The majority of the controls on the DLD editing page are specific to the type of DLD that is being edited. See the relevant page for the DLD type:

Saving Your DLD and/or Importing Data Immediately

At the bottom of the DLD editing page are a number of controls for saving your DLD and/or loading data with it.

The "Log Level" setting is only used if you are importing data immediately. It tells Linear Analytics Services how much information to write to its logs about the import process. The four settings are:

The "DLD Name" field is for you to supply the name of the DLD. The DLD is a file with the suffix '.dld', so that suffix will be added to the name you supply if not already present. This file name is the name under which the DLD can be found in the "Database Files" tool in Linear Analytics Services, as well as the name under which it must be referenced if it is to be used in an LDA script. If you change the name of a DLD and re-save it, this will create a new copy of the DLD with the new name and leave the old version intact. If you specify a name that is already the name of an existing DLD then the existing DLD will be overwritten with this one.

The "Save" button will save the DLD to the Linear Analytics Services database under then name you have specified above, and the "Import" button will use the DLD to import the data in the template file or the database (depending on the type of DLD you are editing). The "Save & Import" button does both these, one after the other. The saving is done first, so if the import fails, the DLD will have already been saved. Again, while it is possible to load data into Linear Analytics Services by opening its DLD for editing and using these buttons, it is not recommended that you do this on a production server, since it is easy to accidentally change the DLD in the process and difficult to undo any mistakes made when loading data in this way. You are advised to load data only with LDA scripts.

The "Reload" button will wipe all changes that you have made to the DLD and re-load the version that is stored in the Linear Analytics Services database (if there is one).

The "Exit DLD" button will stop editing the DLD and return you to the DLD creation page. If you have unsaved changes to your DLD then you will be prompted to save them first.