Results Display English Only User Defined Enum Result Display

Creating OAAM Oracle BI Publisher Reports 19-7

19.2.2.2 Discover Entity Data Details Like Data Type, Row and Column Mappings

To get the entity data details that you will need to construct your report, follow these steps: 1. Get the Entity Definition Key by looking at the entity definition using the OAAM Admin Console. 2. Get details of how entity data is mapped using the SQL Query: SELECT label, data_row, data_col, data_type FROM vt_data_def_elem WHERE status =1 AND data_def_id = SELECT data_def_id FROM vt_data_def_map WHERE relation_type =data AND parent_obj_type =3 AND parent_object_id IN SELECT entity_def_id FROM vt_entity_def WHERE entity_def_key=Entity Definition Key AND status =1 ORDER BY data_row ASC, data_col ASC;

19.2.2.3 Build Entity Data SQL Queries and Views

The above SQL query gives a list of data fields of the entity with data type and row, column position. Using that information, build a SQL query based on the following information that represents data of the given entity. It is also recommended to createbuild a view based on this SQL query that represents data of the given entity. SELECT ent.ENTITY_ID, ent.EXT_ENTITY_ID, ent.ENTITYNAME, ent.ENTITY_KEY, ent.ENTITY_TYPE, Table 19–3 Information about Data Types Data Type Description 1 Represents String data 2 Represents Numeric data. Data stored is equal to Original value 1000. 3 Date type data. Store the data in YYYY-MM-DD HH24:MI:SS TZH:TZM format and also retrieve it using same format. 4 Boolean data. Stored as strings. True represents TRUE and False represents FALSE Note: EntityRowN represents an entity data row. If your entity has 3 distinct data_row values from the above query then you would have 3 EntityRows, name the aliases as EntityRow1, EntityRow2, and so on, and similarly take care of the corresponding joins as shown below. 19-8 Oracle Fusion Middleware Developers Guide for Oracle Adaptive Access Manager EntityRowNrow.DATAcol column_name, EntityRowNrow.NUM_DATAcol 1000.0 numeric_column_name, to_timestamp_tzEntityRowNrow.DATAcol, YYYY-MM-DD HH24:MI:SS TZH:TZM date_column_name, ent.CREATE_TIME, ent.UPDATE_TIME, ent.EXPIRY_TIME, ent.RENEW_TIME FROM VT_ENTITY_DEF entDef, VT_ENTITY_ONE ent LEFT OUTER JOIN VT_ENTITY_ONE_PROFILE EntityRowN ON EntityRowN.ENTITY_ID = ent.ENTITY_ID AND EntityRowN.ROW_ORDER = row AND EntityRowN.EXPIRE_TIME IS NULL LEFT OUTER JOIN VT_ENTITY_ONE_PROFILE EntityRowN+1 ON EntityRowN+1.ENTITY_ID = ent.ENTITY_ID AND EntityRowN+1.ROW_ORDER = row+1 AND row1.EXPIRE_TIME IS NULL WHERE ent.ENTITY_DEF_ID = entDef.ENTITY_DEF_ID and entDef.ENTITY_DEF_KEY=Entity Definition Key

19.2.3 Discover Transaction Data Mapping Information

To discover transaction data mapping information that you will need to create your report, follow the procedures in this section.

19.2.3.1 Discover Transaction data details like Data Type, Row and Column mappings

To get entity data details you will need to construct your report, follow these steps:

1. Get list of transaction to entity definition mapping Ids using the following SQL:

SELECT map_id FROM vt_trx_ent_defs_map, vt_trx_def WHERE vt_trx_ent_defs_map.trx_def_id = vt_trx_def.trx_def_id AND vt_trx_def.trx_def_key =Transaction Definition Key 2. Use the following SQL query to get details of all transaction data fields, their data type and their row, column mapping: SELECT label, data_row, data_col, data_type FROM vt_data_def_elem WHERE status =1 AND data_def_id = SELECT data_def_id FROM vt_data_def_map WHERE relation_type =data AND parent_obj_type =1 AND parent_object_id IN SELECT trx_def_id FROM vt_trx_def WHERE trx_def_key=mayo_pat_rec_acc