Custom Fields - an introduction
Create a Custom Field (custom-calculated column) to add and test out new useful fields in a single table- without affecting your source data.
All types of users can create fields that may be useful for analysis, and test out the best way to tidy their table data without the need for a developer's time. Custom fields let you create charts and build dashboards to meet the needs of 'the last mile' of data analytics.
Changes may include creating a new column that displays data without commas, has trimmed spaces, or replaces month names with numbers.
This doesn't create measures—it allows you to transform your table data in the best way for your dashboard.
Custom column key facts
Calculated columns are always added to a single table. You can't share the custom field across multiple tables.
You can create multiple custom fields for more than one table, but only one table at a time.
Custom fields are derived from the columns in each table.
Astrato transforms the data for every row for a new column you create.
These changes are kept in the semantic layer. The custom field is only saved in Astrato, not the original database content. If you find it handy, add it to your source data as a dimension available to all your charts.
Creating a custom field
In the Data layer view, click the ⁝ Icon on the table header and select view table.
Click the Custom Field button in the top menu and select the custom field type.
There are two types:No-Code Custom Field: This type of field uses a predefined list of functions covering the most often used functions; there are three categories of functions: String, Date, and Calculation.
SQL code field: This is a free editor that supports any SQL code that is valid in the source data warehouse.
Including more advanced calculations like windowing functions.
To use this type of custom field a knowledge of how to write a SQL expression is needed.
SQL code field
Give the field a name, enter a valid SQL code, and click Create.
A new column will be created if the SQL code is valid; if not, an error message will appear.
No-code Custom Fields
Click on the Fx icon and the selected type to select the type of Custom Field you want to create.
There are three different types of custom fields:
String
Date
Calculation
Viewing your new column
1. After you click Create, you return to the view where you were before creating the custom field.
2. Scroll to the right to see the new field and a sample of the values.
3. Your new column is added as the last column in the table.
Editing or deleting a custom field
1. View the table
2. CChange the view to fields in the top bar
3. Scroll down to the bottom to view your custom fields.
4. The column on the right displays a 'trash' bin to delete the custom field and a pencil to edit the measure.