Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Defining links to external sources [Table of Contents] Generating an extraction script

WarehouseArchitect - User's Guide

[-] Part 3 WarehouseArchitect Model
[-] Chapter 13: Creating Links to Operational Systems
[-] Editing extraction expressions

Editing extraction expressions

Each time you create a link between a column in the WAM and an external column, you create an extraction expression. This expression corresponds to a SQL query that selects data from the external column and places it in the column in the data warehouse.

When you have linked all the columns in the WAM to columns in external databases, you concatenate all the extraction expressions and generate an extraction script.

Editing an extraction expression for a table

A table extraction expression is a SELECT query that lists the columns to select from tables in an external database.

You must create an extraction expression for each WAM table, for each external database to which the table is attached.

In a table extraction expression, you can use the following variables:

Variable

Description

%TABLE%

Name or code of the WAM table to which the column belongs (based on display preferences)

%TNAME%

Name of the WAM table to which the column belongs

%TCODE%

Code of the WAM table to which the column belongs

%EXTDTBS%

Name or code of the external database (based on display preferences)

%EXTDNAME%

Name of the external database

%EXTDCODE%

Code of the external database

%@SELECT%

List of expressions defined for each column

%@FROM%

List of all external tables linked to the WAM table



Editing an extraction expression for a column

In a column extraction expression, you can use the following variables:

Variable

Description

%TABLE%

Name or code of the WAM table to which the column belongs (based on display preferences)

%TNAME%

Name of the WAM table to which the column belongs

%TCODE%

Code of the WAM table to which the column belongs

%EXTDTBS%

Name or code of the external database (based on display preferences)

%EXTDNAME%

Name of the external database

%EXTDCODE%

Code of the external database

%COLUMN%

Name or code of the column



Using the script editor

Using the script editor, you can insert the following categories of script language into a customized script:

Category

What it inserts in the script

Tables

Table code

Functions

DBMS-specific function

Operators

Logical operator

External Tables

External table code

External Columns

External column code

External Databases

External database code



Previewing an extraction expression

You can preview extraction expressions before you generate them. The preview shows the generated contents of the script with instanciated variables.

Making an expression invalid

An expression becomes invalid when you break the link between an object in the WAM and an external object. A list of invalid expressions appears when you check the model before generating an extraction script.

An expression automatically becomes invalid when you modify or delete a table or column in the WAM.

You can also invalidate an expression manually. When you do this, the expression remains visible, although it is no longer linked to the item.


Defining links to external sources [Table of Contents] Generating an extraction script