Working with the session task – basic properties

Before we can execute the workflow and make the data flow from the source to the target in a mapping, we need to configure some basic properties in a session task. These properties enable the session task to pick the data from the source and load it into the target.

Note

Mapping is only the structural representation of the source and target requirement; actual data movement happens with the properties we define in the session task.

To define the properties, you need to perform a series of steps. In Workflow Manager, open the workflow containing the session task. Double-click on the session task, click on Mapping, and then click on Source.

Working with the session task – basic properties

The Mapping tab of the session task lets you define the properties for the source and the target. Let's discuss the options in detail:

  • Readers: As we are using the Oracle table as our source, the property is mentioned as relational reader. This signifies that our source is a table from where we are extracting the data. If your source is flat file, the property will change to File Reader.
  • Connections: Assign the connection for the database, as shown in the preceding screenshot. If your source is File, the connections option will be disabled, as we need not define connections for files. Note that we will be discussing how to add connection objects later in this chapter.
  • Properties: Scroll through the properties, and make changes if required. If you are using File as Source, you need to define the location of the file in your system under the source file directory. Also, specify the name of the file under the Source filename if you use flat file as a source, as shown in the following screenshot:
Working with the session task – basic properties

Clicking on Target will bring you to the following screen:

Working with the session task – basic properties

Let's discuss the options in detail:

  • Writers: As we are using the Oracle table as the target, the property is mentioned as a relational writer. This signifies that our target is the table where we wish to load the data. If we use target as flat file, the property will change to File Writer.
  • Connection: Assign Target Connection for the database, as shown in the preceding screenshot. If your target is File, the Connections option will be disabled, as we need not define the connection for files.
  • Properties: The target load type is a very important aspect while loading the data. The target load type is of two types: Normal and Bulk. Selecting the property as bulk allows faster loading into the target. You cannot use the property as bulk if you have a primary key or other constraints in your target table. As our target table has keys defined, we are using a normal property.

Scroll through the properties and make changes if required. If we use File as Target, we need to define the location of the file in your system under the Output file directory. Also, specify the name of the file under Output filename if you use flat file as target, as shown in the following screenshot:

Working with the session task – basic properties

If you are using the lookup transformation in your mapping, you will need to define the file path or table connection for lookup. Click on Lookup under Transformations and define the Connection details, as shown in the upcoming screenshot.

Lookup Sql Override, as indicated in the following screenshot, is a property that is available if you are using lookup transformation to look up a table. When you use lookup transformation to look up a table, it generates a default query to extract the data from the table and bring in Informatica PowerCenter. You can modify the default query generated by the lookup transformation, which is referred to as a lookup SQL override. Using this property, you can save time by eliminating unwanted records while extracting itself.

Working with the session task – basic properties

If you use lookup transformation to look up a file, you will need to define LookupFileDirectory and LookupFileName, as shown in the following screenshot:

Working with the session task – basic properties

We will discuss other properties of session tasks in detail in the next chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset