Building a Pipeline object

You must build a Pipeline object to specify the data definition and access aspects of the pipeline that you want your application to execute. Use the Data Pipeline painter in PowerBuilder to create this object and define the characteristics you want it to have.

Characteristics to define

Among the characteristics you can define in the Data Pipeline painter are:

For full details on using the Data Pipeline painter to build your Pipeline object, see the PowerBuilder Users Guide.

Example

Here is an example of how you would use the Data Pipeline painter to define a Pipeline object named pipe_sales_extract1 (one of two Pipeline objects employed by the w_sales_extract window in a sample order entry application).

The source data to pipe This Pipeline object joins two tables (Sales_rep and Sales_summary) from the company’s sales database to provide the source data to be piped. It retrieves just the rows from a particular quarter of the year (which the application must specify by supplying a value for the retrieval argument named quarter):

The example screen shows a Pipeline object that joins two tables (Sales _ rep and Sales _ summary) from a  company’s sales database. This Pipeline object indicates specific columns to be piped from each source table (s rep _ i d, s rep _ l name, and s rep _ f name from the Sales _ rep table, as well as s sum _ quarter and s sum _ rep _ team from the Sales _ summary table). In addition, it defines a computed column to be calculated and piped. All the selections display across the top of the screen in a scrollable selection list, include the computed column that is defined.

Notice that this Pipeline object also indicates specific columns to be piped from each source table (srep_id, srep_lname, and srep_fname from the Sales_rep table, as well as ssum_quarter and ssum_rep_team from the Sales_summary table). In addition, it defines a computed column to be calculated and piped. This computed column subtracts the ssum_rep_quota column of the Sales_summary table from the ssum_rep_actual column:

The compute tab displays the computed column, which is defined as sales _ summary dot s sum _ rep _ actual minus sales _ summary dot s sum _ rep _ quota.

How to pipe the data The details of how pipe_sales_extract1 is to pipe its source data are specified here:

Shows is a sample Data Pipeline screen. Entered in the Table field is quarterly _ extract, Key is set to extract _ key, the Options field shows Create - Add Table, Max Errors is set to No Limit, the Commit field shows All, and an extended attributes check box is unchecked. Next come column headings, displayed horizontally, for Source Name, Source Type, Destination Name, Type, Key ( a check box column ), Width, D e c for decimals, Nulls ( a check box column ), and an entry field for Initial Value. Under these headings, the selected data columns are displayed in the Source Name column, and their values are displayed in the remaining columns.

Notice that this Pipeline object is defined to create a new destination table named Quarterly_extract. A little later you will learn how the application specifies the destination database in which to put this table (as well as how it specifies the source database in which to look for the source tables).

Also notice that: