The following example demonstrates how to create a new filtered view (called My Top 10 Projects), name the filter (it_portfolio_view) and how to tell the STARETL process to use this new filtered view when extracting, transforming, and loading data into Primavera Data Warehouse.
- Log in to the P6 EPPM instance (with SQL Plus, SQL Developer, and so on) with the user account for Publication Tables/views (for example, PXRPTUSER).
- Use the following statement to create the it_portfolio_view filter:
create or replace view it_portfolio_view as select PROJECTOBJECTID objected from projectportfolio pp, projectprojectportfolio ppp where pp.objectid = ppp.PROJECTPORTFOLIOOBJECTID and pp.name = 'My Top 10 Projects'
- Upon successful completion of the sample filter, log out of the instance.
- Log in to the Primavera Data Warehouse database instance as the schema owner (for example, the STARUSER account).
- Use the following statement to add a setting into the ETL_PARAMETER table with the name of the view you created:
insert into etl_parameter(p_feature, p_1, datasource_id)
values ('star.project.filter.ds1', 'it_portfolio_view', 1);
commit;
- Go to <PDW Install Folder>\star\etl_homes\staretl<id>.
- Run staretl.bat (with Windows) or staretl.sh (with UNIX or Linux).