Restricting Columns in Datasets Based on SQL Query

In Arcadia Data, you can easily restrict the table columns in the dataset by changing the SQL definition of that dataset.

SQL-defined datasets make it easy to limit their content to specific rows.

  1. Switch to Data Model interface, and click Show Data.

    Show Data in Dataset based on SQL Query
    Show Data in Dataset based on SQL Query
  2. Notice that there is a large number of columns in the query result, and many of them are not necessary when it comes to answering most common questions.

    Available Columns in Dataset based on SQL Query
    Available Columns in Dataset based on SQL Query
  3. Note the fields that you would like to keep in the dataset definition. Here, we will keep the columns county, stname, ctyname, tot_pop, tot_male, and tot_female.
  4. Switch back to Dataset Detail interface, and edit SQL text window by applying the following statement:

    select county, stname, ctyname, tot_pop, tot_male, tot_female from main.us_counties
  5. Click Save.

    Restricting Columns in Dataset based on SQL Query
    Restricting Columns in Dataset Based on SQL Query
  6. In the Refresh dataset table column information modal window, click Close.

    Columns Updated
    Columns Updated
  7. Switch back to the Data Model interface, click Show Data, and notice that the dataset only has the 6 explicitly specified columns, county, stname, ctyname, tot_pop, tot_male, and tot_female:

    Dataset based on SQL Query, with Restricted Columns
    Dataset based on SQL Query, with Restricted Columns