Loading data from a Swift object store

You can load data from a Swift object store.

Follow these steps to load data from a local file. The file cannot be larger than 80% of the free space in your home directory.

Creating a data file

To be able to load data, you must save the data in a delimited file, such as a comma-separated (CSV) file.

To create a delimited format file, use a database utility to extract data from your data store or DBMS to a file. Each data file must contain data from one table only.

Tip: If you are creating multiple data files, use the format schema.table for the file names if you want to automatically map files to target tables in your database. For example, if you create a file named FRUIT.GRAPES.gz, then, later during the load process, the file will be automatically mapped to the GRAPES table in the FRUIT schema of your database.
DBMS Details Learn More
Oracle Unload the data from Oracle by using by using a utility such as Oracle Application Express®. Oracle documentation about the unload process: Using Oracle Application Express Utilities
MySQL Export the data from MySQL by using a utility such as MySQL Workbench or phpMyAdmin. MySQL documentation about the export process: Data export
DB2® Export the data from Db2 by using a command-line utility. Db2 documentation about the export process: Exporting data

Move a file to a Swift object store

To move files to Swift, use an OpenStack command-line client or an application such as Cloudberry Explorer (available at http://www.cloudberrylab.com/free-openstack-storage-explorer.aspx). You must create a Swift container to contain the files.

Learn more:

OpenStack documentation: Manage objects and containers

Creating a target table

Before you load data into your database, you must create a target table for your data. The target table definition must match the structure and data types of the data in the data file.

You can create a target table using one of the following methods:
  • Let Db2® generate the SQL DDL statement to create the table, based on a delimited text file containing your data.
  • Write your own SQL DDL statement to create the table. If you don't use a specific application to create DDL statements, you can use IBM® InfoSphere® Data Architect. See Generating DDL scripts in the InfoSphere Data Architect Knowledge Center for more information.

Load the data from a Swift object store

To load data from a Swift object store using the web console, select Swift as the source. If you are loading segmented files, select the associated manifest file when you select the files to load.