Search This Blog

Tuesday, April 13, 2010

Phases Of MultiLoad

Preliminary Phase :
-- Checks SQL commands or Multiload commands are valid .
-- Establishes multiload sessions with Teradata.
-- Creates Error Tables, Work Tables and log table.
Error Tables : requires 2 error tables per target table.
First contains constraint violations.
Second contains UPI violations.
Work Tables : holds the DML tasks requested and the input data that is ready to APPLY to AMPS.
LOGTABLE : keeps a record of results from each phase of the load so that multiload knows
proper point from which to restart.

-- Apply utility locks to the target table.



DML Transaction Phase :
-- All the SQL DML statements are sent to database.
-- PE parses the DML and generates a step-by-step plan to execute the request.
-- This execution plan is then communicated to each AMP and stored in appropriate work tables for each target table.
-- Later, during the Acquisition phase the actual input data will also be stored in the worktable so that it may be applied the Application Phase.
-- Next, a match tag is assigned to each DML request that will match it with the appropriate rows of input data. The match tags will not actually be used until the data has already been acquired and is about to be applied to the worktable. This is somewhat like a student who receives a letter from the university in the summer that lists his courses, professor’s names, and classroom locations for the upcoming semester. The letter is a “match tag” for the student to his school schedule, although it will not be used for several months. This matching tag for SQL and data is the reason that the data is replicated for each SQL statement using the same data record.

Acquisition Phase :
-- MultiLoad now acquires the data in large, unsorted 64K blocks from the host and sends it to the AMPs.(round Robin).
-- The AMP hashes each row on the primary index and sends it over the BYNET to the proper AMP where it will ultimately be used. But the row does not get inserted into its target table, just yet.
-- The AMP puts all of the hashed rows it has received from other AMPs into the worktables where it assembles them into the SQL.
-- Now the utility places a load lock on each target table in preparation for the Application Phase.

Application Phase :
The purpose of this phase is to write, or APPLY, the specified changes to both the target tables and NUSI subtables.

Cleanup phase :
The utility looks at the final Error Code (&SYSRC). MultiLoad believes the adage, “All is well that ends well.” If the last error code is zero (0), all of the job steps have ended successfully (i.e., all has certainly ended well). This being the case, all empty error tables, worktables and the log table are dropped. All locks, both Teradata and MultiLoad, are released. The statistics for the job are generated for output (SYSPRINT) and the system count variables are set. After this, each MultiLoad session is logged off.

1 comment:

  1. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Teradata , kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on Teradata. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.

    For Free Demo Contact us:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: training_maxmunus
    Contact No.-+91-9738507310
    Company Website –http://www.maxmunus.com


    ReplyDelete