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
-
Click on the Create Dataset option, and your screen will look as shown in the image below:
- 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)
-
Expand the views to check the availability of views, as shown in the image below:
-
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:
-
Click on the Preview tab to see the data of the selected view, as shown in the image below:
-
Click the Create button, and the dataset will be created.