Introducing the Data View Editor

Once you've added your data, use the Data View Editor (DVE) to create new data views, and edit data view properties, including setting up joins and creating custom fields and measures. The DVE is visible when you:

  • Connect a new data source or data view.

  • Click on the icon that looks like a connector in the sidebar of the Data section.

  • Click on the name of your data at the top left when you're in the Workbook Editor. A tooltip displays 'Go to the Data View.'

Please note: joins are available for Snowflake and PostgreSQL data sources.



Data section options

The sidebar in the Data section has five icons; these are the:

  • Astrato logo takes you back to the Home view of your workbooks.

  • Database icon takes you to the Select data option to view tables and select fields.

  • Connector icon displays the DVE.

  • Globe icon links you to the Data View Settings section, where you can change the format for your data (date, time, and value separators) and your locale (time zone).

  • Question mark icon opens the home page of Astrato's help documentation (these pages).

Navigating in the DVE

Use the data view editor to select and define your data. Add custom fields and measures here too.
  1. The DVE process steps are to select and define your data. Once you're finished with the first two steps, clicking Workbook displays the Workbook Editor. At the top, the data view name (click to edit the name), the data connection, the database, and its description are visible. Click on the circle to move between the options.

  2. The DVE's functions to define your data views are separated into four groups: Data, Custom Data, Dimensions, and Measures. Use these options to create customized data queries, fields, dimensions, and measures.

  3. The content area offers four tabs to preview data: Data, Joins, Data Explorer, and Dimensions & Measures. Clicking Data lets you view the fields, table joins, and preview the data. The preview updates with your customizations.

  4. The top right lists how many workbooks are connected to that data and has a button to take you back to the workbook, and if you're in the Define section, the Joins suggestions dialog displays. Click the Joins tab to manage your table joins. Read more about Astrato's Data Engine and how it manages table joins.

Back to Top

Selecting your data

The Select screen is where you choose the data to use in your visualization.

  1. Click the arrow to view the Data section. Data table options are displayed. Use the Search option to find tables quickly. Click the checkbox beside each table name to choose specific tables, or select them all by clicking the box beside the data source name (in the above example, it's Adventure Works).

  2. Once you've selected a table, the fields (columns) are displayed in the content pane, listing the Field Name, Source Name, and Data Type. Click the box beside the Field name to select them all, or add fields individually by clicking in the box beside each field. When you've selected data sources, a sorting icon displays to the right of the search bar. Click the icon to view only the data sources and tables you've selected from all of the sources. Click the icon again to undo the sort.

  3. Click the Preview tab to view a sample of the data in the fields. As you mouse over the field names, a pencil icon displays; click the icon if you want to change a field name.

You're now ready to define and customize your data model.

Back to Top

Defining and customizing data

The Define screen is where you model your data for your visualizations. There are three tabs - Data, Dimensions & Measures, and Joins.

All data sorts and customizations you make are visible in the data tree in the Your data view. You can check the results in the content panel.

Building your data model

In Data, you'll see all the tables listed in the content area, with a panel suggesting any possible joins if you're working with a Snowflake data source. Joins connect related data in different tables in a database or data view. An example would be a table holding information about customers and a table containing details of the orders customers have placed. If you add a join, you'll be able to add data from both tables to your workbook.

  • Click on a table name to see more detailed field properties and view any joins which have been applied.

  • If you need to change a field name, click on it to open the editor and check your results using Data Preview.

  • If you'd like to add more data from the data source, click Add to be taken to the Select screen.

  • When you enable Show Joins and hover over a join suggestion in the panel, it displays a broken line. If you save a join, the line changes to a solid one.

  • You can also right-click on a field and choose to add it as a dimension or measure, as well as choose a function for the measure (e.g. sum). Once it's created, you'll see it in the Dimensions and Measures sections in the left-hand panel.

  • Click Apply all to save all join suggestions. You can edit or delete joins in the Joins tab.

Applying joins, customizing dimensions and measures to create your data model.

Back to Top

Adding customized data

  1. Click the Custom Data section to add a custom SQL query, upload a CSV file, or an inline table.

  2. Click Add to follow the steps for each custom data type.

Click the Custom Data section to add a custom SQL query, upload a CSV file, or an inline table.

Adding a custom SQL query

  1. Click Add to open the form.

  2. Select the Schema you want to use, enter the custom SQL in the text area and give your query a Name.

  3. Click Save to add the query to the data view.

⚠ Please ensure that you remove a semicolon from the end of your query

ℹ To support time travel, please add {TT} after each table name

Add a custom SQL query to your data model.

Uploading a CSV file

This feature stores a copy of the CSV directly in your data warehouse. As such, it must be enabled on both your organization and individual warehouse connection by an organization admin.

The permission requirements are:

If you don't have a specific schema, you wish users to upload their data, then grant the following privileges to the role:

Create Schema

If you do have a dedicated schema created for CSV uploads, then grant the following privileges to the role:

Create Table

For more information on how to set privileges in ❄️Snowflake, please check out their documentation:

https://docs.snowflake.com/en/sql-reference/sql/grant-privilege.html

Once permissions are sorted, the steps to upload a CSV file are:

  1. Click Add to open the upload form.

  2. Add the CSV file you want to use (you can either use drag and drop or browse using the file explorer).

  3. Select the data you want to use in the modeling tool, then click Save. The CSV tables are added to the data view.

Drag and drop to add data from a comma separated values (CSV) file to your data model.

Back to Top

Dimensions & Measures

In the Dimensions & Measures tab you want to add a dimension or measure, click Add in the sidebar Dimensions or Measures section to open the Create Dimension or Create Measures form.

  • For dimensions, enter a field Name, or choose an option from the Fields dropdown (which populates the name automatically). You can also add a Description.

  • For measures, enter a field Name manually or choose one from the Fields dropdown list (which populates the name automatically). You can also choose an Aggregation for the measure and enter a Description. Click Save when you're finished.

  • You'll find any dimensions and measures you've added in the content pane. If you need to edit or delete a dimension/measure, click the dots to the right of the dimension/measure name and select the option you need.

Creating custom dimensions and measures

Back to Top

Did this answer your question?