Relational Standard Table Example

 

The following coding example reads data items from an information map. It displays a simple relational table.

 

/**

*

* A simple method creates a simple relational table

* @param list of data items in an information map.

* @param input data selection

* @return modified data selection containing the result

*

* @throws Exception

*/

private  com.sas.iquery.metadata.business.DataSelection SimpleRelationTableDisplay(java.util.List dsDataItems, com.sas.iquery.metadata.business.DataSelection query) throws Exception

{         

  for(int i = 0; i < dsDataItems.size(); i++)

{            com.sas.iquery.metadata.business.DataItem tdi = (com.sas.iquery.metadata.business.DataItem)dsDataItems.get(i);

 

// Assign Column to all dataitems and add to dataselection.

query.addResultItem(tdi, com.sas.iquery.metadata.business.Role.COLUMN);

}

return query;

}