IBM Support

Loading data using Redbrick TMU

Question & Answer


Question

What is the procedure to create a Red Brick TMU control file for loading data?

Answer


INTRODUCTION

To use the IBM® Red Brick™ Table Management Utility (TMU) to load data into a table, you will create a control file containing instructions for:

  • Where the data is located
  • How to manipulate the data being loaded into the target table
  • Which table the source data should be loaded [to?]
  • Which data type and fields to be used on the target table
  • The length of the incoming data
  • Intermediate processing


BEFORE YOU BEGIN

Create a TMU control file.

    Tip: For more details see the TMU control files chapter of the IBM Red Brick Table Management Utility Reference Guide for your version. See the Related information section for a link to manuals online.


STEPS

1. Edit the TMU control file.
2. Include one LOAD DATA statement for each target table. Use this syntax and clauses:
    LOAD DATA input_clause format_clause NLS_locale_clause discard_clause rowmessages_clause optimize_clause table_clause criteria_clause comment_clause;
    input_clause  The file that contains the input data.
    format_clause Specifies the format details of the input data.
    locale_clause Specifies the combination of a language and location.
    discard_clause Specifies how to handle rejected records.
    optimize_clause Applies to operations using REPLACE, INSERT or APPEND in the FORMAT clause.
    table_clause Specifies the target table.
    comment_clause A user defined description of the data being loaded.


    Example: Here is an example of a how a LOAD DATA control file might look using all the of the clauses above:
      load data
      inputfile '/data/databases/inventory.txt'
      FORMAT IBM seperated by ','
      English_Canada.MS1252@Default
      recordlen 50
      replace
      discardfile '/data/databases/inventory.discards'
      discards 10
      rowmessages '/inventory/usr442/row_messages'
      optimize on discardfiled 'inventory_dups.txt'
      into table inventory (
      prodkey       integer external(3),
      type               character(20),
      description  character(27));
      comment  'This is the final load';

    Tip: For more details about the LOAD DATA clauses see the LOAD DATA chapter of the IBM Red Brick Table Management Utility Reference Guide for your version.
[{"Product":{"code":"SSCRW7","label":"Red Brick Warehouse"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"6.3","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

More support for:
Red Brick Warehouse

Software version:
6.3

Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows

Document number:
76671

Modified date:
16 June 2018

UID

swg21172527

Manage My Notification Subscriptions