Package org.pentaho.metadata.model

Examples of org.pentaho.metadata.model.SqlPhysicalColumn


    table.setId( "PT1" );
    model.getPhysicalTables().add( table );
    table.setTargetTableType( TargetTableType.INLINE_SQL );
    table.setTargetTable( "select distinct customername, salesrepemployeenumber from customers" );

    SqlPhysicalColumn column = new SqlPhysicalColumn( table );
    column.setId( "PC1" );
    column.setTargetColumn( "CUSTOMERNAME" );
    column.setName( new LocalizedString( "en_US", "Customer Name" ) );
    column.setDescription( new LocalizedString( "en_US", "Customer Name Desc" ) );
    column.setDataType( DataType.STRING );
    table.getPhysicalColumns().add( column );

    SqlPhysicalColumn column2 = new SqlPhysicalColumn( table );
    column2.setId( "PC2" );
    column2.setTargetColumn( "SALESREPEMPLOYEENUMBER" );
    column2.setName( new LocalizedString( "en_US", "Sales Rep" ) );
    column2.setDescription( new LocalizedString( "en_US", "Sales Rep Employee Number" ) );
    column2.setDataType( DataType.NUMERIC );
    table.getPhysicalColumns().add( column2 );

    LogicalModel logicalModel = new LogicalModel();
    logicalModel.setPhysicalModel( model );
    logicalModel.setId( "MODEL" );
View Full Code Here

TOP

Related Classes of org.pentaho.metadata.model.SqlPhysicalColumn

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.