Importing or exporting multiple tables at a time

With IBM® Fast Data Movement data movement feature, you can import or export a number of tables at a time.

About this task

You can use the fq.tables property in both, import and export configuration XML files to define a list of tables to be moved. As a value for this parameter, you provide a comma-separated list of source tables for import, and target tables for export.
<property>
	<name>fq.tables</name>
	<value>ADMIN.tab</value>
</property>
The format of this value is <SCHEMA>.<table>.
You can also use an asterisk (*) character in the fq.tables property for a combination of multiple schemas and tables, for example:
  • S1.T1 - imports table T1 in schema S1
  • S1.* - imports all tables from schema S1
  • *.T1 - imports all tables T1 from all schemas
  • * - imports all tables from the current schema for the user that is currently logged in
Note:
  1. Include double quotations around delimited table names.
  2. You cannot use * as part of the schema or table name and use it as a filter, for example: S1.a*, meaning "all tables in schema S1, with name starting with a". The system cannot interpret such filter, and a* is interpreted as the exact table name.

Procedure

  • To import multiple tables from Db2® Warehouse to Hadoop:
    1. Define the directory where the data should be stored on Hadoop with parameter fq.output.path.
    2. List source table names from Db2 Warehouse using fq.tables parameter. You can use asterisk to filter the tables.
    3. Proceed with configuration and run import as usual.
  • To export multiple tables from Hadoop to Db2 Warehouse:
    1. Define the source tables directory on Hadoop in fq.input.path.
    2. List source table names in fq.tables parameter. You can use asterisk to filter the tables.
    3. Proceed with configuration and run export as usual.