Adding Custom Columns and Custom Expressions to a Live Access RDBMS Source

This topic pertains to Live Access RDBMS connections.  

You may need to add a custom column to a Live Access table. For example, if a measure for Revenue does not exist directly in a Live Access table that you have imported into Birst, you can add a new column to the table and specify a formula such as: Quantity*UnitPrice.

You can use SQL expressions in the column definition in the same way you can define custom measures and attributes to use against the user data store (warehouse). Birst converts the expressions you define to the select statements issued against your database; so you can leverage any SQL compliant function in your column expressions. For example, you can use SQL functions such as CASE, DATEDIFF/DATEADD/DATEPART, SUBSTRING, and CAST.

To add a new column or custom expression to a Live Access source in Data Flow

1. Right-click the Live Access source in the Data Flow page and select Manage Sources.

2. In the Modify Data Source dialog box, click Add Column. A new column called "New Column" appears at the bottom of the list of columns.
3. Click in the Name field and enter the name you want to use for your column.  
4. For the Formula field, enter the formula you want to use as in the example below:



In another example, you could create a column called "# of Beverages" and use a CASE statement in the column expression to count only Beverages products as shown below:



Tip: The formula needs to be syntactically correct for the database the source is pointing to. For example, if it is Oracle, then you need to use Oracle specific syntax.
5. Set the other column properties, such as the Type, as appropriate for the new column.
6. Click Save, then Close.

See Also
Creating a Live Access Connection
Creating a Live Access Query (Opaque View) Source
Creating a Compound Live Access Source
Modeling a Live Access Relational Database Source