You can create and add a new logical column to an entity, or base a new attribute on an existing logical column from the list.
To base a new attribute on a related entity
Follow these steps to select an existing attribute on a related entity.
Base a new attribute on an existing logical column
To base a new attribute on a database field
Follow these steps to select a database field to use as an attribute.
Base a new attribute on a database field
To create a new logical column (attribute)
Follow these steps to create a new attribute using a SQL expression definition.
Creating a new attribute from an expression
- In the Models list, select the model that you want to edit and then click Edit model button.
- In the model editor that appears, in the Entities list on the left, select the entity to which you want to add an attribute.
- In the Attributes list on the right, click Add. The Add Attribute wizard appears.
- In the Add Attribute wizard, click the SQL Expression selection.
- In the Name box that appears, enter the name for the new attribute. This value appears in the list of entities for the model.
- In the Description box, enter a description that provides users with additional information about the attribute, such as when it is appropriate to use it.
- In the Expression Definition box, define the expression for the logical column with a SQL expression that pulls the data that you want.
Note: The syntax to use for expressions is T-SQL for SQL data sources or PL-SQL for Oracle data sources.
- Check your query using the commands above the preview box.
- Validate verifies the expression and displays any errors it finds in red at the top of the dialog.
- Preview Schema populates a table with information pulled by the expression (column name, size, data type, and is nullable).
-
Preview Data populates a table with a sampling of the data pulled by the expression.
- Click Finish. The new attribute appears in the Attributes list.
- In the Model Editor toolbar, click the Save & Publish button to save the changes. The new logical column is available to report creators.
See Also