Importing Data Sets

Home   Back   Next  

Accessing and Saving Data > Importing and Exporting Data > Importing Data Sets

 

Strata enables you to import local data files or tables from external database systems.  To begin an import process, select Import from the File menu.  An Import dialog will appear:

 

import_dialog

 

The top section of the dialog lists the various types of imports you can perform.  For instance, if you wish to import some CSV files, you would do this by selecting the File tab.  If you wanted to import from your SQL Server database, you would select the SQL Server tab, etc.

 

 

Importing Text-delimited Files (CSV, TSV, TXT, etc.)

 

You can use Strata to import different file types, similar to the types of files you can open (e.g., DBF, CSV, MDB).  Each  of these imports use a similar process; the only exception are text-delimited files, which require you to first specify a delimiter.

 

From the Import dialog, select the text file or files you wish to import.  You can import different types of text-delimited files, but for any single-import process, each file type must be the same for any single import process.  After browsing for your file(s) and clicking the Next button, the following page will open, where you can select your delimiters:

 

import_dialog_csv

 

This settings page provides options to modify the way your text file is parsed, depending on how it is formatted:

 

Text Delimiters (Comma, Tab, None, Other): The radio buttons enable you to choose your text delimiter.  For instance, to choose a comma or tab delimiter, select the appropriate radio button. To define your own text delimiter, select the Other radio button and then enter the letter or character that delimits your text file into the adjacent box.
Text Qualifier: Often, within text-delimited files, a special qualifier is used to designate text. Select the appropriate radio button to designate the text qualifier.  For instance a Quotation Mark, Single Quote and None would be required for "TEXT", 'TEXT' and TEXT, respectively. To define your own text qualifier, select the "Other" radio button and then enter the qualifier in the adjacent box.
First row contains field names checkbox: When this box is checked, the first row in the text file will be used for your field names. If the first row is not a field name, make sure to leave this box unchecked.

 

Once you are finished, click the Next button to take you to the final page of the import.  This final page is discussed in the next section below.

 

NOTE:  The import dialog enables you to import any type of text-delimited file but not fixed-length files.  To  open a fixed-length file, you must use the Open functionality.

 

 

Importing Other File Types (XLS, XLSX, MDB, ACCDB, DBF, KPG)

 

For all other file types (and, after you select your delimiter for text files), Strata provides a dialog to specify information related to your import.  For instance, you can specify the names of the imported files, what folder, if any, your tables should be placed in and whether you want to append the data tables.

 

import_dialog_all

 

This page provides options to modify the way your file is imported:

 

Import to:  Here you can specify where your imported files will appear in the project panel.  If a folder is not specified, the files will just be placed into the main directory of the project panel.
Source Name: This is the original name and path of the tables to be imported. These names cannot be edited.
Destination Name: This is what the name of the imported table will be in the project.  To edit the name, double-click on the destination name to bring up the edit cursor.
Append:  If you'd like to append a data file to a table that already exists in your project panel, you can check the Append box next to that file.  Data is appended to an existing table only if both the "Import to" folder and the "Destination name" of the file to be imported is the same as the existing table.  The append follows the same rules as when you append records to a table.  You may only append one file at a time to an existing table in your project.  For multiple-file appending, we recommend importing all of the tables first and then using the merge or append tools to consolidate them into a single table.

 

As an example of appending files during an import, let's say that you had three CSV files (each having the same structure) named CSV1, CSV2 and CSV3, respectively, that you wanted to add to an existing table called MAIN in Strata.  You would select each of the files, change each of their destination names to "MAIN" and check the append checkbox.  Then you would select the "Import to" destination folder where "MAIN" resides.

 

Once you have configured your import options, press the Finish button and the files will be imported into your project panel.

 

 

Importing Data From Database Systems

 

You may also import tables directly from external database systems, such as MySQL Enterprise, Microsoft SQL Server, Oracle, and IBM DB2.  You may also import from other systems using an ODBC driver.  To import from an external system, select the appropriate tab on top of the Import dialog and you will see a connection page.

 

import_dialog_database

 

To connect to the database, enter the connection information and then click the Next button.  The required connection information is as follows:

 

Server: Enter the name of your server. This can be entered as an IP address (e.g., 12.123.12.123) or as a domain name (e.g., hostname.domain.ext)
Database: Enter the name of the database within the system.
Port Number: Enter the port number.
User Name: Enter in your login name, if any.
Password: Enter your password, if any.

 

If a connection is made, you will be taken to the Import settings page as discussed above.

 

NOTE:  The option to import to MySQL, Oracle, SQL Server, DB2 and other database systems may first require the installation of appropriate database drivers.  For example, you may need to download and install the MySQL Connector/ODBC driver for MySQL or the Oracle Call Interface (OCI) driver for Oracle. Please contact your system administrator for further information.  Third-party drivers are in no way affiliated with Strata or its licensing agreement.  Please contact the third-party providers of these drivers for further information on licensing and usage terms.

 

 

Saving Import Templates

 

For imports that you perform on a regular basis, it is useful to be able to save your template to reuse at a future date.  To  save an import, simply create your template as normal and before selecting the Finish button on the final page, click the Save button instead.  Then, select a name for your import template and click OK.  Finally, select the Finish button to begin your import.  In addition to your import starting, an import template will appear in your project panel.  To resuse the import template, simply double-click it and edit as needed before importing.