Sunday, January 8, 2012

PowerCenter - Domain

0 comments
The Power Center domain is the primary logical unit for management and administration within PowerCenter.
The service manager runs on a PowerCenter domain. The Service Manager supports :
  • the domain
  • and the application services.

PowerCenter has a service-oriented architecture that provides the ability to scale services and share resources across multiple machines.
PowerCenter provides the PowerCenter domain to support the administration of the PowerCenter services.

where:
  • gateway host and gateway port are the basis for the administration console url
A domain can contain multiple repositories:

newer post

Informatica PowerCenter Repository tables

0 comments
I am sure every PowerCenter developer either has an intention or necessity to know about the Informatica metadata tables and where information is stored etc. For the starters, all the objects that we create in Informatica PowerCenter - let them be sources, targets, mappings, workflows, sessions, expressions, be it anything related to PowerCenter, will get stored in a set of database tables (call them as metadata tables or OPB tables or repository tables).

* I want to know all the sessions in my folder that are calling some shell script/command in the Post-Session command task.
* I want to know how many mappings have transformations that contain "STOCK_CODE" defined as a port.
* I want to know all unused ports in my repository of 100 folders.

In repositories where you have many number of sessions or workflows or mappings, it gets difficult to achieve this with the help of Informatica PowerCenter client tools. After all, whole of this data is stored in some form in the metadata tables. So if you know the data model of these repository tables, you will be in a better position to answer these questions.

Before we proceed further, let me clearly urge for something very important. Data in the repository/metadata/OPB tables is very sensitive and that the modifications like insert or updates are to be made using the PowerCenter tools ONLY. DO NOT DIRECTLY USE UPDATE OR INSERT COMMANDS AGAINST THESE TABLES.

Please also note that there is no official documentation from Informatica Corporation on how these tables act. It is purely based on my assumption, research and experience that I am providing these details. I will not be responsible to any of the damages caused if you use any statement other than the SELECT, knowing the details from this blog article. This is my disclaimer. Let us move on to the contents now.

There around a couple of hundred OPB tables in 7.x version of PowerCenter, but in 8.x, this number crosses 400. In this regard, I am going to talk about few important tables in this articles. As such, this is not a small topic to cover in one article. I shall write few more to cover other important tables like OPB_TDS, OPB_SESSLOG etc.

We shall start with OPB_SUBJECT now.

OPB_SUBJECT - PowerCenter folders table

This table stores the name of each PowerCenter repository folder.

Usage: Join any of the repository tables that have SUBJECT_ID as column with that of SUBJ_ID in this table to know the folder name.

OPB_MAPPING - Mappings table

This table stores the name and ID of each mapping and its corresponding folder.

Usage: Join any of the repository tables that have MAPPING_ID as column with that of MAPPING_ID in this table to know the mapping name.

OPB_TASK - Tasks table like sessions, workflow etc

This table stores the name and ID of each task like session, workflow and its corresponding folder.

Usage: Join any of the repository tables that have TASK_ID as column with that of TASK_ID/SESSION_ID in this table to know the task name. Observe that the session and also workflow are stored as tasks in the repository. TASK_TYPE for session is 68 and that of the workflow is 71.

OPB_SESSION - Session & Mapping linkage table

This table stores the linkage between the session and the corresponding mapping. As informed in the earlier paragraph, you can use the SESSION_ID in this table to join with TASK_ID of OPB_TASK table.

OPB_TASK_ATTR - Task attributes tables

This is the table that stores the attribute values (like Session log name etc) for tasks.

Usage: Use the ATTR_ID of this table to that of the ATTR_ID of OPB_ATTR table to find what each attribute in this table means. You can know more about OPB_ATTR table in the next paragraphs.

OPB_WIDGET - Transformations table

This table stores the names and IDs of all the transformations with their folder details.

Usage: Use WIDGET_ID from this table to that of the WIDGET_ID of any of the tables to know the transformation name and the folder details. Use this table in conjunction with OPB_WIDGET_ATTR or OPB_WIDGET_EXPR to know more about each transformation etc.

OPB_WIDGET_FIELD - Transformation ports table

This table stores the names and IDs of all the transformation fields for each of the transformations.

Usage: Take the FIELD_ID from this table and match it against the FIELD_ID of any of the tables like OPB_WIDGET_DEP and you can get the corresponding information.

OPB_WIDGET_ATTR - Transformation properties table

This table stores all the properties details about each of the transformations.

Usage: Use the ATTR_ID of this table to that of the ATTR_ID of OPB_ATTR table to find what each attribute in this transformation means.

OPB_EXPRESSION - Expressions table

This table stores the details of the expressions used anywhere in PowerCenter.

Usage: Use this table in conjunction with OPB_WIDGET/OPB_WIDGET_INST and OPB_WIDGET_EXPR to get the expressions in the Expression transformation for a particular, mapping or a set.

OPB_ATTR - Attributes

This table has a list of attributes and their default values if any. You can get the ATTR_ID from this table and look it up against any of the tables where you can get the attribute value. You should also make a note of the ATTR_TYPE, OBJECT_TYPE_ID before you pick up the ATTR_ID. You can find the same ATTR_ID in the table, but with different ATTR_TYPE or OBJECT_TYPE_ID.

OPB_COMPONENT - Session Component

This table stores the component details like Post-Session-Success-Email, commands in Post-Session/pre-Session etc.

Usage: Match the TASK_ID with that of the SESSION_ID in OPB_SESSION table to get the SESSION_NAME and to get the shell command or batch command that is there for the session, join this table with OPB_TASK_VAL_LIST table on TASK_ID.

OPB_CFG_ATTR - Session Configuration Attributes

This table stores the attribute values for Session Object configuration like "Save Session log by", Session log path etc.
newer post

Access, Integrate, and Deliver Data Quickly and Cost-Effectively with Enterprise Data Integration

0 comments
Informatica PowerCenter sets the standard for highly scalable, high-performance enterprise data integration software. Informatica PowerCenter empowers your IT organization to implement a single approach to accessing, transforming, and delivering data without having to resort to hand coding. The software scales to support large data volumes and meets enterprise demands for security and performance. Informatica PowerCenter serves as the foundation for all data integration projects and enterprise integration initiatives, including data governance, data migration, and enterprise data warehousing.

    Provide the right information, at the right time so that the business has the timely, relevant, and trustworthy data it needs, when it needs it, to make better and timelier business decisions
    Cost-effectively scale to meet increased data demand, save hardware costs, and reduce the costs and risks associated with data downtime
    Empower teams of developers, analysts, and administrators to work faster and better together, sharing and reusing work, to accelerate project delivery
newer post

Informatica ETL products

0 comments
Informatica PowerCenter is an enterprise data integration platform working as a unit. With its high availability as well as being fully scalable and high-performing, PowerCenter provides the foundation for all major data integration projects and initiatives throughout the enterprise.



    These areas include:
    B2B exchange
    data governance
    data migration
    data warehousing
    data replication and synchronization
    Integration Competency Centers (ICC)
    Master Data Management (MDM)
    Service-oriented architectures (SOA) and more.

PowerCenter provides reliable solutions to the IT management, global IT teams, developers and business analysts as it delivers not only data that can be trusted and guarantees to meet analytical and operational requirements of the business, but also offers support to various data integration projects and collaboration between the business and IT across the globe.

Informatica PowerCenter enables access to almost any data sources from one platform. It is possible thanks to the technologies of Informatica PowerExchange and PowerCenter Options.

PowerCenter is able to deliver data on demand of the business offering the choice of data access of real-time, batch or change data capture (CDC).

Informatica PowerCenter is capable of managing the broadest range of data integration initiatives as a single platform. This ETL tool makes it possible to simplify the development of data warehouses and data marts.

Supported by PowerCenter Options, Informatica PowerCenter software meets enterprise expectations and requirements for security, scalability and collaboration through such capabilities as:

    dynamic partitioning
    high availability/seamless recovery
    metadata management
    data masking
    grid computing support and many more


In order to increase operational efficiency and to manage and execute various initiatives, the platform enhances successful collaboration between the business and IT.

Informatica ETL products

PowerCenter has an offer of a wide range of features designed for global IT teams and production administrators, as well as for individual developers and professionals:

    - Metadata Manager (consolidates metadata into a unified integration catalog)
    - development capabilities (team-based; accelerate development, simplify administration)
    - a set of visual tools and productivity tools (manages administration and collaboration between different specialists)
    - metadata-driven architecture (eliminates the recoding requirement).

    The Informatica ETL (Informatica PowerCenter) product comprises three major applications:
    Informatica PowerCenter Client Tools. These tools have been designed to enable a developer to:
    - report metadata
    - manage repository
    - monitor sessions' execution
    - define mapping and run-time properties (sessions)
    Informatica PowerCenter Repository - it is the centre of Informatica tools where all data (eg. related to mapping or sources/targets) is stored. Here all metadata for application is kept. All the client tools as well as Informatica Server use the Repository to obtain data. The Repository can be compared to a harddisk or memory in a PC - without it it is possible to process the data but there is virtually no data that can be processed.
    Informatica PowerCenter Server - server is the place where all the actions are executed. It physically connects to sources and targets to fetch the data, apply all transformations and load the data into target systems.
newer post

Sunday, August 14, 2011

Sequence Generator

0 comments

  1. Sequence Generator

 
The SG transformation generates numeric values. We can use the SG to create unique primary key values, replace missing primary keys, or cycle through a sequential range of numbers.

 
NEXTVAL:

 
    We can use the NEXTVAL port to generate sequence numbers by connecting it to downstream transformation or target.

 
CURRVAL:

 
    CURRVAL is the NEXTVAL plus Increment By value. We typically only connect the CURRVAL port when the NEXTVAL port is already connected to a downstream transformation. When a row enters a transformation connected to the CURRVAL port, the IS passes the last created NEXTVAL value plus one.
newer post

Lookup Transformation

0 comments

  1. Lookup Transformation

 
We can use lookup transformation to lookup data in a flat file, relational table , view or synonym.

 
Tasks:

 
à
Get a related value: We can retrieve a value from lookup table based on value in the source.

 
à
Perform a calculation: We can retrieve a value from lookup table and use it in calculation.

 
à
Update slowly changing dimension table: Using lookup we can check whether rows exist in a target or not.

 

 

 
Connected lookup

 
    à Receives input values directly from the pipeline.

 
    à Use a dynamic or static cache.

 
    à Can return multiple columns from the same row or insert into dynamic cache.

 
    à If there is no match, the IS returns default value for all output ports, for dynamic cache IS inserts row into cache.

 
    à If there is a match, the IS returns a result from the lookup condition for all the lookup/output ports.

 
    à Pass multiple output values to another transformation.

 
    à Supports user-defined default values.

 
Un-connected lookup

 
    à Receives input value from the result of :LKP expression in another transformation.

 
    à Use a static cache.

 
    à Returns one column from each row.

 
    à If there is no match, the IS returns NULL.

 
    à If there is match, the IS returns the result of lookup condition.

 
    à Pass one output value to another transformation.

 
    à Does not support user-defined default values.

 
We can perform the following tasks with un-connected lookup:

 
    à Test the result of a lookup in an expression.

 
    à Filter rows based on the lookup results.

 
    à Mark rows for update based on the result of a lookup and update SCD's.

 
    à Call the same lookup multiple times in a mapping.

 

 

 

 

 
Cached lookup:

 
    When we enable lookup caching, the IS queries the lookup source once, caches the values , and lookup values in the cache during the session. Caching lookup values can improve session performance.

 

 
Un-cached lookup:

 
    When we disable caching, each time a row passes into the transformation , the IS issues a select statement to the lookup source for lookup values.

 

 
Lookup policy on multiple match:

 
    Determines which rows the lookup transformation returns when it finds multiple rows that match the lookup condition. We can select the first row or last row returned from the cache or lookup source, or report an error. Or, we can allow the lookup to return any matching value the transformation returns the first value that matches the lookup condition.

 
If we do not enable the output old value on update option, the lookup policy on multiple match option is set to Report an error for dynamic lookups.

 

 
Lookup query:

 
    The IS queries the lookup based on the ports and properties we configure in the lookup transformation. The IS runs a default SQL statement when the first row enters the lookup transformation.

 
Default lookup query contains:

 
à
SELECT statement includes all the lookup ports in the mapping. Do not add or delete any ports columns from the default SELECT statement.

 
à ORDER BY clause orders the columns in the same order they appear in the lookup transformation. We cannot view this when we generate the default SQL using the lookup SQL override.

 
Overriding the LOOKUP Query:

 
    We can override the lookup query for a relational lookup.

 
à Override the ORDER BY clause: Create order by clause with fewer columns to increase performance. When we override the ORDER BY clause we must suppress the generated ORDER BY clause with a comment notation (--).

 
à If the table name or column name in the query contains any reserved words we must enclose them in the quotes.

 
à Add a WHERE clause: Use a lookup SQL override to add a WHERE clause to the default SQL statement. We can use the WHERE clause to reduce the number of rows included in the cache.

 
à Use a lookup SQL override to query the lookup data from multiple tables.

 

 
Notes:

 
è Lookup table can be a single table or we can join multiple tables in the same database using a lookup SQL override.

 
è The Designer designates each column in the lookup source as a lookup(L) and output(O) port.

 
è If we delete ports from flat file lookup, the session fails.

 
è We can delete ports from a relational lookup if the mapping does not use the lookup port. This reduces the amount of memory the IS needs to run the session.

 
è The IS always caches flat files and pipeline lookups.

 
è If we use pushdown optimization, we cannot override the ORDER BY clause or suppress the order by clause with the comment notation.

 
è The IS matches null values for lookup transformation. For example, if an input lookup condition column is NULL, the IS evaluates the NULL equal to NULL in the lookup.

 
è If we configure flat file lookup for sorted input, the IS fails the session if the condition columns are not grouped. If the condition columns are grouped, but not sorted, the IS processes the lookup as if we did not configure sorted input.

 
è Lookup condition contains the following operators: =,>,<,>=,<=,!=

 
è We can use a dynamic cache for relational or flat file lookups.

 
è The IS builds caches for un-connected lookup sequentially regardless of how we configure cache building.

 

 

 

 

 

 

 

 

 
Lookup caches:

 
    The IS builds a cache in memory when it processes the first row of data in a cached lookup transformation. The IS stores condition values in the index cache and output values in the data cache. The IS queries the cache for each row that enters the transformation.

 
Building caches:

 
    We can configure the session to build caches sequentially or concurrently. When we build sequential caches, the IS creates cache as the source rows enter the lookup.
When we configure the session to build concurrent caches, the IS does not wait for the first row to enter the lookup before it creates cache. Instead, it builds multiple caches concurrently.

 
Persistent cache:

 
    We can save the lookup cache files and reuse them the next time the IS processes a lookup. If the lookup table does not change between sessions we can the lookup to use persistent cache. The first time the IS runs a session using a persistent lookup cache, it saves the cache files to disk instead of deleting them. Then next time we run the session it builds the cache memory from cache files. If the lookup table changes occasionally, we can override the lookup property to Recache the lookup from the database.

 

 
Recache from source:    

 
    If the persistent cache is not synchronized with the lookup table, we can configure the lookup transformation to rebuild the lookup cache.
We can instruct the IS to rebuild the cache if we think that the lookup source changed since the last time the IS built the persistent cache.

 

 
Static cache:

 
    The IS does not update the cache while it processes the lookup transformation.

 
Dynamic cache:

 
    The IS dynamically inserts or updates data in the lookup cache and passes data to the target.

 

 

 

 

 

 

 

 

 
Properties:

 
NewLookupRow:

 
    The designer adds this port to a lookup configured to use a dynamic cache. Indicates with a numeric value whether the IS inserts or updates the row in the cache, or makes no changes to the cache.

 
0 – IS does not update or insert the row in the cache.

 
1 – IS inserts the row into the cache.

 
2 – IS updates the row in the cache.

 
Associated port:

 
    The IS uses the data in the associated port to insert or update rows in the cache. If we associate a sequence ID, the IS generates a primary key for inserted rows in the lookup cache.

 
Ignore Null inputs for updates:

 
    We can enable this property when we don't want the IS to update the column in the cache when the data in this column contains a null value.

 
Ignore in Comparison:

 
    The IS compares the values in all lookup ports with the values in their associated input ports by default. We can use this property when we want the IS to ignore the port when it compares values before updating a row.

 
    When we add a WHERE clause in a lookup SQL override, the IS uses the WHERE clause to build the cache from the database and to perform a lookup on the database table for an un-cached lookup. It does not use the WHERE clause to insert rows into a dynamic cache when it runs a session.

 

 
Shared cache:

 
    We can share the cache between multiple transformations. We can share the unnamed cache between transformations in the same mapping. We can share the named cache between transformations in same or different mappings.
newer post

Router Transformation

0 comments
  1. Router Transformation


 

Router transformation tests same input data based on multiple conditions and gives the option to route rows of data that do not meet any of the conditions to a default output group.

Working with Groups


 

Router has the following types of groups.


 

  • Input Group : The designer copies property information from the input ports of the input group to create a set of output ports for each output group.


 


  • Output Group : There are two types of output groups.

    è User-defined Groups

    è Default Group


 

We cannot delete or modify output ports or properties.


 

User defined Group


 

The Designer creates the default group after we create one new user-defined group. The designer does not allow to edit or delete the default group. This group does not have a group filter condition associated with it. If all the conditions evaluate to FALSE, the IS passes the row to the default group.


 

  • If you want to drop all rows in the default group, do not connect it to transformation or target.
  • The Designer deletes the default group when we delete the last user-defined group from the list.


 

  • We can enter default values for input ports in Router to replace NULL input values.
  • If a row meets more than one group filter condition, the IS passes this row multiple times.


 

  • We can connect one group to one transformation or one target.
  • We can connect one output port in a group to multiple transformations or targets.
  • We can connect multiple output ports in one group to multiple transformations or targets.
  • We cannot connect more than one group to one transformation or target.
  1. Router Transformation


 

Router transformation tests same input data based on multiple conditions and gives the option to route rows of data that do not meet any of the conditions to a default output group.

Working with Groups


 

Router has the following types of groups.


 

  • Input Group : The designer copies property information from the input ports of the input group to create a set of output ports for each output group.


 


  • Output Group : There are two types of output groups.

    è User-defined Groups

    è Default Group


 

We cannot delete or modify output ports or properties.


 

User defined Group


 

The Designer creates the default group after we create one new user-defined group. The designer does not allow to edit or delete the default group. This group does not have a group filter condition associated with it. If all the conditions evaluate to FALSE, the IS passes the row to the default group.


 

  • If you want to drop all rows in the default group, do not connect it to transformation or target.
  • The Designer deletes the default group when we delete the last user-defined group from the list.


 

  • We can enter default values for input ports in Router to replace NULL input values.
  • If a row meets more than one group filter condition, the IS passes this row multiple times.


 

  • We can connect one group to one transformation or one target.
  • We can connect one output port in a group to multiple transformations or targets.
  • We can connect multiple output ports in one group to multiple transformations or targets.
  • We cannot connect more than one group to one transformation or target.
newer post

Rank Transformation

0 comments
  1. Rank Transformation


 

The Rank transformation allows us to select the top or bottom rank of the data.


 

  • When the IS runs in the ASCII data movement mode, it sorts session data using a binary sort order.
  • For Unicode data movement mode, it uses the sort order configured for the session.


 

Rank Caches


 

The IS stores group information in an index cache and row data in a data cache.

During a workflow, the IS compares an input row with rows in the data cache. If the input row out-ranks a cached row, the IS replaces a cached row with input row.

For multiple partitions, the IS creates separate caches for each partition.


 

Rank Port


 

Use to designate the column for which we want to rank values. We can designate only one Rank port in Rank transformation. The Rank port is an input/output port.


 

Rank Index Port


 

The designer automatically creates a RANKINDEX port for each rank transformation. The IS uses the Rankindex port to store the ranking position for each row in a group. It is an output port only.


 

Defining Groups


 

Like the Aggregator, the Rank transformation allows to group information.


 

à If two rank values match, they receive the same value in the rank index and the transformation skip the next value.

newer post

Joiner Transformation

0 comments
  1. Joiner Transformation


 

Joiner transformation joins two related heterogeneous sources residing in different locations or file systems.


 

  • We use the joiner to join two sources with at least one matching port.


 

  • Joiner typically combine information from two different sources that do not have matching keys such as flat file sources.


 

  • Joiner allows to use join sources that contain binary data.


 

There are some limitations on the pipelines we connect to the joiner. We cannot use a joiner in the following situations.


 

  • Both input pipelines originate from the same Source Qualifier transformation.
  • Both input pipelines originate from the same Normalizer or Joiner.
  • Either input pipeline contains an Update Strategy transformation.
  • We connect a sequence generator transformation directly before joiner.


 

Master and Detail Source


 

When we add the ports of a transformation to a Joiner, the ports from the first source are automatically set as detail sources. Adding the ports from the second transformation automatically sets them as master sources.


 

Join Types


 

  • Normal (Default)
  • Master Outer
  • Detail Outer
  • Full Outer


 

Master – Detail Join Rules


 

If a session contains a mapping with multiple joiner transformations, the IS reads rows in the following order.


 

  • For each joiner, the IS reads all the master rows before it reads the first detail row.


 

  • For each joiner, the IS produces output rows as soon as it reads the first detail row.


 

If you create a mapping with two joiners in the same target load order group, make sure each joiner receives detail rows from a different source pipeline, so that IS reads the rows according to the master-detail join rules.


 


 


 


 


 


 


 

Joiner Caches


 

When we run a session with joiner, the IS reads all the rows from the master source and builds index and data caches based on the master source. Since the cache read only the master source rows, we should specify the source with fewer rows as the master source.


 

During a workflow, the joiner compares each row of the master source against the detail source. The fewer unique rows in the master, the fewer iterations of the join comparison occur, which speeds the join process.


 


 

Join Condition


 

Both ports in a condition must have the same data type. We need to convert the data types for non-matching data types.

If the data types do not match, the mapping will be invalid.

Join condition only supports equality between fields.

The joiner does not match null values.

To join rows with null values, we can replace null input with default values, and then join the default values.


 

Join Types


 

Normal Join


 

The IS discards all rows of data from the master detail source that do not match based on the condition.


 

Master Outer join


 

It keeps all rows of data from the detail source and the matching rows from the master source. It discards the unmatched rows from the master source.


 


 

Detail Outer join


 

It keeps all rows of data from the master source and the matching rows from the detail source. It discards unmatched rows from the detail source.


 

Full Outer Join


 

It keeps all rows of data from both the master and detail sources.


 


 

  • A normal or master outer join performs faster than a full outer or detail outer join.
  • If a result set includes fields that do not contain data in either of the sources, the joiner populates the empty fields with null values.


 


 


 


 

Performing a join in the database


 

Performing a join in the database is faster than performing a join in the session. In some cases, its not possible, such as joining tables from two different databases or flat file systems.


 

To perform a join in the database


 

  • Create a pre-session stored procedure.
  • Use the Source Qualifier to perform the join.


 

newer post

Mapping Parameters and Mapping Variables

0 comments
  1. Mapping Parameters and Mapping Variables


 

Mapping parameters and variables represent values in mappings and mapplets.


 

Mapping Parameter


 

A mapping parameter represents a value that we can define before running a session. A mapping parameter retains the same value throughout the entire session.


 


 

For example, you want to use the same session to extract transaction records for each of the customers individually. Instead of creating a separate mapping for each customer account, you can create a mapping parameter to represent a single customer account. Then use the parameter in a source filter to extract only data for that customer account. Before running the session, you enter the value of the parameter in the parameter file.


 


 

If the parameter is not defined in the parameter file, the Integration Service uses the user-defined initial value for the parameter. If the initial value is not defined, the Integration Service uses a default value based on the data type of the mapping parameter.


 

IsExprVar: TRUE or FALSE


 


 

Determines how the Integration Service expands the parameter in an expression string. If true, the Integration Service expands the parameter before parsing the expression. If false, the Integration Service expands the parameter after parsing the expression.


 

Note: If you set this field to true, you must set the parameter data type to String, or the Integration Service fails the session.


 


 


 

The Integration Service looks for the value in the following order:


 

1. Value in parameter file

2. Value in pre-session variable assignment

3. Value saved in the repository

4. Initial value

5. Datatype default value


 


 


 

Mapping Variables


 

A mapping variable represents a value that can change through the session. The Integration Service saves the value of a mapping variable to the repository at the end of each successful session run and uses that value the next time you run the session.


 


 

Use mapping variables to perform incremental reads of a source. For example, the customer accounts in the mapping parameter example above are numbered from 001 to 065, incremented by one. Instead of creating a mapping parameter, you can create a mapping variable with an initial value of 001. In the mapping, use a variable function to increase the variable value by one. The first time the Integration Service runs the session, it extracts the records for customer account 001. At the end of the session, it increments the variable by one and saves that value to the repository. The next time the Integration Service runs the session, it extracts the data for the next customer account, 002. It also increments the variable value so the next session extracts and looks up data for customer account 003.


 


 

The Integration Service holds two different values for a mapping variable during a session run:


 


 

♦Start value of a mapping variable

♦Current value of a mapping variable


 

Start value


 

The start value is the value of the variable at the start of the session. The start value could be a value defined in the parameter file for the variable, a value assigned in the pre-session variable assignment, a value saved in the repository from the previous run of the session, a user defined initial value for the variable, or the default value based on the variable data type.


 

Current value


 

The current value is the value of the variable as the session progresses. When a session starts, the current value of a variable is the same as the start value. As the session progresses, the Integration Service calculates the current value using a variable function that you set for the variable. The final current value for a variable is saved to the repository at the end of a successful session. When a session fails to complete, the Integration Service does not update the value of the variable in the repository. The Integration Service states the value saved to the repository for each mapping variable in the session log.


 

If a variable function is not used to calculate the current value of a mapping variable, the start value of the variable is saved to the repository.


 


 

Aggregation type


 

The Integration Service uses the aggregate type of a mapping variable to determine the final current value of the mapping variable.


 

Types


 

--> Count

--> Max

--> Min


 

You can configure a mapping variable for a Count aggregation type when it is an Integer or Small Integer. You can configure mapping variables of any data type for Max or Min aggregation types.


 

Variable functions


 

Use variable functions in an expression to set the value of a mapping variable for the next session run.


 


 

SetMaxVariable. Sets the variable to the maximum value of a group of values. It ignores rows marked for update, delete, or reject. To use the SetMaxVariable with a mapping variable, the aggregation type of the mapping variable must be set to Max.


 


 

SetMinVariable. Sets the variable to the minimum value of a group of values. It ignores rows marked for update, delete, or reject. To use the SetMinVariable with a mapping variable, the aggregation type of the mapping variable must be set to Min.


 


 

SetCountVariable. Increments the variable value by one. In other words, it adds one to the variable value when a row is marked for insertion, and subtracts one when the row is marked for deletion. It ignores rows marked for update or reject.


 


 

SetVariable. Sets the variable to the configured value. At the end of a session, it compares the final current value of the variable to the start value of the variable. Based on the aggregate type of the variable, it saves a final value to the repository. To use the SetVariable function with a mapping variable, the aggregation type of the mapping variable must be set to Max or Min. The SetVariable function ignores rows marked for delete or reject.


 

The Integration Service does not save the final current value of a mapping variable to the repository when any of the following conditions are true:


 


 

♦The session fails to complete.

♦The session is configured for a test load.

♦The session is a debug session.

♦The session runs in debug mode and is configured to discard session output.


 


 

Use a variable function in any of the following transformations:

♦Expression

♦Filter

♦Router

♦Update Strategy


 


 

à These will appear in the variables tab of the Expression editor.


 

à When you use mapping parameters and variables in a Source Qualifier transformation, the Designer expands them before passing the query to the source database


 

à When you create a reusable transformation in the Transformation Developer, use any mapping parameter or variable. Since a reusable transformation is not contained within any mapplet or mapping, the Designer validates the usage of any mapping parameter or variable in the expressions of reusable transformation for validation.


 

à Enclose string and date time parameters and variables in quotes in the SQL Editor.


 

à Mapping parameter and variable values in mapplets must be preceded by the mapplet name in the parameter file, as follows:

mappletname.parameter=value

mappletname.variable=value


 

à You cannot use variable functions in the Rank or Aggregator transformation.


 

Default Values for Mapping Parameters and Variables Based on Data type


 

String – Empty String; Numeric – 0;

Date/time – 1/1/1753 A.D


 

à Source qualifier filter condition: state = '$$State'

Filter transformation filter condition: state = $$State

newer post
newer post older post Home