SQL Transform

Ramya Priya Updated by Ramya Priya

Tellius provides an SQL option, allowing you to:

  • Cleanse your data, removing or correcting invalid, missing, or inaccurate values.
  • Modify your dataset in alignment with your business objectives and analytical requirements.
  • Enhance your dataset by integrating data from other sources as needed.

Here are some examples to guide you in using SQL with Tellius:

Example 1: Filtering Data

To filter data based on specific conditions, you can use the SQL SELECT statement. For instance, if you want to view all records from the cars_prices table where the trim field starts with 'Sed', your SQL query would look like this:

SELECT * FROM cars_prices WHERE trim LIKE 'Sed%';
Example 2: Selecting Specific Fields

If you need to select specific fields from a dataset, you can specify these fields in your SQL query. For example, to select the price, country, sales, person, product, segment, account, and gender fields from the retail table, you can use the following query:

SELECT price, country, sales, person, product, segment, account, gender FROM retail;

Remember to replace the table and field names with those applicable to your database.

Creating and applying SQL code

  1. Navigate Data --> Prepare --> Data.
  2. Select the required Business View and click on Edit.
  3. Above Data Pipeline, click on the SQL option.
  1. To view the list of columns available in the selected Business View, click on Column List tab.
  1. To create new code, click on Create New or Write code yourself button.
  2. Alternatively, click on Generate with Kaiya button to make Tellius Kaiya generate the required for you.
  3. Once the code is ready, click on Run Validation to validate the code. Tellius validates the entered query, and if any errors are found, they will be displayed in the bottom section of the window.
  4. After clearing the errors, click on Apply to apply the code to the dataset or click on Save in Library to save to the code library in the left pane. Or, click on Cancel to discard the code window.
From v4.2, users can apply the code to the dataset without saving it to the code library first.

Editing SQL code

  1. In the SQL code window, search and select the required code from the already existing Code Library.
  2. Click on Edit to modify and validate the code.
  1. Click on Run Validation to validate the code.
  2. Click on Apply button to apply the SQL query to the dataset.
  3. Click on Update to update the code, and click on Save as New.

Did we help you?

Python Transform

Contact