Calculation, Field, and Database Aliasing

New Feature: Aliases for Calculations, Fields, and Databases

Creating human readable and interpretable labels for databases, fields, and calculations is important to ensuring that other people in your organization can understand your analysis.

Databases are often have arcane names (NY_MainDW, anyone?), field names are often abbreviations or not easily interpretable (tx_pd_usd might represent tax paid in US dollars, for instance).

Zing now lets you easily alias database names, field names, and calculations which will be used across all queries on that data source (except custom SQL, since you probably want to custom-alias there).

Database aliasing

To create a database alias, simply specify a display name in the data source ’edit’ screen from the Zing Data web console.

This display name is what will be shown within the Zing app. If display name is kept blank, the original database name will be shown.

 

Field aliasing

To create a field alias, click on ‘settings’ for a data source, then ‘alias’ from the web console. Click add/edit and then select the fields you’d like to alias. Then hit save.

These field aliases will be shown within the Zing app when you click on a data source, or use the visual query builder (SwiftQuery).

These field aliases will also inform the LLM used to translate your natural language questions into query results.

So you could alias a field tx_ttl_amt as “Total Tax Amount Paid” and then ask questions like “what is the total tax paid” and the system will understand how you are using language better and what fields that maps to.

 

Calculation aliasing

Calculation aliases are created a little bit differently from field and database aliases.

From web console, click on a data source, and then settings, and then the examples tab. From there click new example, and then specify the question text and the corresponding SQL which answers that question.

For instance, if you wanted to define a field called utilization you might specify:

  • Question text “show me utilization”
  • Response SQL as “select sum(hours_worked)/sum(hours_available) as utilization from mytable”.

You could then use the calculation alias automatically in natural language queries just by using the alias you specified (“utilization” in the example above).

 

Making it easier to ask questions and share

This set of improvements to aliasing collectively makes it possible for you to ask questions using natural language in ways that you and your colleagues understand, and get results back that are easy to comprehend.

 

Get started for free! Sign In or create a new account.

 

Related articles

Download Zing For Free

Available on iOS, Android, and the web

Learn how Zing can help you and your organization collaborate with data

Schedule Demo