Skip to content

Create Dataset using View

What is a View?

A view is a database object that holds no values itself. Its contents are based on a base table, and it contains rows and columns similar to a real table. Views can be used to hide table columns from users by granting them access to the view rather than the table itself.

Prerequisites

To create a dataset using a view in MySQL, the user needs to work with MySQL Workbench.

Steps to create a dataset using views

  1. Click on the Create Dataset option, and your screen will look as shown in the image below:

    Image

  1. Enter the details in the Create Dataset window as follows:
  • Name: Demo Dataset (the user can select a name as per their requirement)
  • Source: Select sakilas as the source (the same name you set when creating the database connection)
  1. Expand the views to check the availability of views, as shown in the image below:

  2. Drag and drop the view from the left panel to the right code panel to generate the query. When the user drags and drops tables, views, etc., from the left list to the right code panel, the code appears automatically, as shown in the image below:

    Image

  3. Click on the Preview tab to see the data of the selected view, as shown in the image below:

    Image

  4. Click the Create button, and the dataset will be created.