Documentation

Integrate SQL View

 

SQL views are virtual tables and are very useful when working with complex databases and larger data schemas. In datapine you can integrate your views within a few clicks. The following steps demonstrate how to connect your SQL views to datapine.

 

  1. Click on Settings on the right upper corner of the navigation bar.
  2. In the databases screen, add a new data source by clicking on the Database icon.

Setup a SQL View connection

 

sql-view-connection

 

 

  1. Please provide your database credentials in the database setup. For more detailed instructions see Steps 1 to 9 from how to setup a database connection.
  2. Select Import via SQL views to integrate your SQL Views. This will automatically switch the storage location selection to data warehouse.
  3. Click Save and Proceed to get to the Import screen.

Import SQL View

 

In the Import screen you can now manually add your SQL Views.

  1. Type the name of your SQL View which you wish to import into the text field.
  2. Click Add and your view will be added to the list of views below.
  3. To edit or delete a view click on the edit or trash bin icon next to the view name.
  4. Once you are done adding SQL Views to your import schema, click on the Save and Proceed button and continue the integration process following the steps for References, Label Fields and Data Transfer under connect a database. 

import-sq-view

 

Update SQL View

 

What if you have altered your SQL view and the changes do not get reflected in datapine? Below we will explain how to update a SQL view to make these changes visible.

 

  1. Go to Settings and search for the data connection of your SQL view.
  2. Click on the small edit icon in the bottom right corner of the data source widget.
  3. You will get to the database connection screen. Skip the setup and go to Import.
  4. In the Import screen delete the view from the List of Views by clicking the trash bin icon next to the view name.
  5. Now add this View again.
  6. Click on Save and Proceed and continue the integration process. When you get to Data Transfer please make sure you fetch the new data fields. This is needed to finally apply the changes made to your SQL view to the charts and tables in datapine.