# Data Store using an RDBMS Connector

{% hint style="success" %}
*Check out the given illustration to understand how to create a Data Store based on an RDBMS Data Connector.*
{% endhint %}

<figure><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FqLlVwSzz9jNEKOd37sw5%2FRDBMS%20Data%20store%20creation.gif?alt=media&#x26;token=b8343cc2-84d6-47c8-ba71-6d04d2b2a507" alt=""><figcaption></figcaption></figure>

### Getting Data

* The user gets the Getting Data tab while clicking the ***Create Data Store*** option.
* Enter a name for the Data Store. The Data Connector and Database names get displayed based on the selection of the data connector.
* Write the SQL query in the given space (Use the ***Ctrl+ Space*** keys for assistance in writing a query.
* Put a checkmark in the given box to ***Enable Scheduler*** option.
* Click the ***Next*** option to proceed.

![Configuring the Getting Data tab](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FFYUafG6boL3IcmcGhZ1z%2Fimage.png?alt=media\&token=fb986776-d03e-4a81-a43b-9cbf67b4decc)

### Data Type Definition

This tab allows users to define the data type using the selected data store. They can interchange the Dimensions, Measures, and Time fields by selecting the respective icons provided for these fields.

* Navigate to the ***Data Type Definition*** tab.
* Define the required ***Dimensions***, ***Measures***, and ***Time*** by interchanging the categories.
* Enable the Dimensions by using a checkmark to avail ***List of Values*** (LOV) lookup in the filter panel of the Self-service BI Report.
* Click the ***Next*** option to proceed.   &#x20;

![Configuring the Data Type Definition tab](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FpbdjsI3tVEKk712USXa5%2Fimage.png?alt=media\&token=a7d1b9e7-0b9f-49be-99c0-85ea5036207c)

The user can change the categories of a dimension, measure, and time values by clicking the following options:

<table><thead><tr><th width="150">Icons</th><th width="189.63636363636363">Name</th><th>Description</th></tr></thead><tbody><tr><td><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FgrlKXe9SvaSkwagf52XE%2Fimage.png?alt=media&#x26;token=d7498405-cea4-4777-879b-65a28dcc8aaf" alt="" data-size="line"></td><td>Move to Dimensions</td><td>Moves the selected ?Measure or Time element to Dimension category.</td></tr><tr><td><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2F9Y8BKSydnLQgvjddhQmz%2Fimage.png?alt=media&#x26;token=3cd16b7d-b1fd-4c1b-b37d-5857f0772c0d" alt="" data-size="line"></td><td>Move to Measures</td><td>Moves the selected Dimension or Time element to Measure category.</td></tr><tr><td><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FUnJTLDBSjVCvItTrjN2X%2Fimage.png?alt=media&#x26;token=4d22f1cc-f7e5-418a-85f6-ea1a47939b5f" alt="" data-size="line"></td><td>Move to Time</td><td>Moves the selected Dimension or Measure to Time category/</td></tr></tbody></table>

{% hint style="info" %} <mark style="color:green;">Please Note</mark>: Click the ***Previous*** option to go back to the previous tab.
{% endhint %}

### Hierarchy Definition

Define the hierarchy using various dimensions and time options.

* Navigate to the ***Hierarchy Definition*** tab.
* Click the ***Add***  option provided on the Hierarchy Definition page.
* A new ***Drill Def*** box gets added.
* Drag and drop the dimensions or time options to define a hierarchy.
  * The ***Time*** fields gets separated in the 3-level granularity by dragging one time. By default, the ***Time*** dimensions can be split into **Year>Month>Date** hierarchy.
  * The ***Dimension*** fields need to be dragged separately each time to create the hierarchy in the Drill Def box.
* Click the ***Next*** tab to proceed.

![Configuring the Hierarchy Definition tab.](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FIE4HKs8yCrMJSnpWRZVZ%2Fimage.png?alt=media\&token=746055f3-21fc-4cf4-a810-7261c9736632)

{% hint style="info" %} <mark style="color:green;">Please Note:</mark>&#x20;

* Click the ***Previous*** option to go back to the previous tab.
* Click the ***Remove*** option   (in the Drill Def box) to remove the defined hierarchy using the selected option.
  {% endhint %}

### Batch Query

Split the data fetching process into different batches by generating a batch query.

* Navigate to the ***Batch Query*** tab<mark style="color:green;">.</mark>
* Select a Dimension using the drop-down menu.
* Click the ***Generate*** option.
* Based on the selected dimension, a distinct query gets generated (in the below-given box). The user can edit the distinct query as per their requirement.      &#x20;

![Generating Distinct Query](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FrjFHsog2tFwsp9nHu3Qr%2Fimage.png?alt=media\&token=bdc90cf1-b40c-4fad-b59b-d715ebc46c21)

* Click the ***Generate*** option provided for the ***Batch Query*** option.
* The original query generates the distinct query specifications to fetch data.
* Proceed to the next tab by clicking the ***Next*** tab.&#x20;

![Generating the Batch Query ](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2F8EpsVH7ewPKcP5U76JeX%2Fimage.png?alt=media\&token=0edb45db-83e9-4c40-8c23-ff2c249e6b32)

### Data Restriction

Configure the ***Data Restrictions*** settings to restrict a user-level view of the data store.

* Navigate to the ***Data Restriction*** tab.
* Click the ***Add*** icon to add a new box for inserting the data restriction parameter.&#x20;
* Select a dimension from the drop-down menu.
* Enter the user/group-specific custom field to restrict the data.
* Click the ***Next*** option to proceed.

![Configuring the Data Restrictions tab](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2F7NoexGK88IO2CHjXrY4A%2Fimage.png?alt=media\&token=ae9b8e72-63a8-4176-b1ce-7c00289c6681)

{% hint style="info" %} <mark style="color:green;">Please Note:</mark> The Administrator can restrict access to data for a specific user by configuring the User.  Property via the **Data Restriction** tab. **E.g.,** If for a user/user group **Country** custom field is provided value **India,** and the administrator passes **Country** as User Property while creating a data store. The users for whom **India** was selected as the value for the **Country** custom field can access data regarding India only.
{% endhint %}

### Scheduling Data Refresh

The user can schedule a data refresh interval via the ***Schedule Data Refresh*** tab.

* Navigate to the ***Schedule Data Refresh*** tab. (This tab only appears for the Data Stores where scheduler has been enabled using the ***Getting Data*** tab).
* Define a time range to refresh data using the following options:

  * Daily
  * Weekly
  * Monthly
  * Yearly

  (Select any one option from the above-given list to set the data refresh interval)&#x20;
* Enable the ***Refresh Now*** option by using a checkmark in the given box.
* Enable the ***Email Notification*** option by providing a checkmark in the box.
  * Provide a valid email address to receive the notification email regarding the Data Store.
* Click the ***Finish*** option to complete the Data Store creation process.

![Configuring the Schedule Refresh tab](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Fd7XPznLH4seDeVWG4Ouk%2Fimage.png?alt=media\&token=72a0cca6-07e5-446f-bd66-fb5f2e913bdf)

* A message appears to confirm that the data store configuration has been saved.
* The ***Data Stores*** List opens.
* A new ***Data Store*** gets created and added to the displayed list.

![New Data Stores gets added to the Data Stores List](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Fj37v1oUgZfU8IT8bghoQ%2Fimage.png?alt=media\&token=b6b9a53f-5a60-4ed5-b132-af0e56b1ba0d)

<table><thead><tr><th width="150">Icon</th><th width="159">Name</th><th>Task</th></tr></thead><tbody><tr><td><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FcKu5XasaGk3dJY5zCREp%2Fimage.png?alt=media&#x26;token=8f5e1f61-1f17-449a-860c-bb17728c4bd9" alt="" data-size="line"></td><td>Push to VCS</td><td>Pushes the Data Store to the GIT repository.</td></tr><tr><td><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FVRWocY45yUZv6Q45qgGJ%2Fimage.png?alt=media&#x26;token=eeed04a9-fecc-4746-910d-2dd21bfce107" alt="" data-size="line"></td><td>Pull From VCS</td><td>Pulls the Data Store to the GIT repository.</td></tr><tr><td><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FF464cl2YdKdnGMgz46wQ%2Fimage.png?alt=media&#x26;token=a95b09d1-d141-420b-9908-6d4fa3670178" alt="" data-size="line"></td><td>Refresh Data</td><td>Refreshes data for a datastore.</td></tr><tr><td><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FZrWrXd7gyFTmysoT02Nd%2Fimage.png?alt=media&#x26;token=96654621-b881-43a6-a210-6d47274a66bc" alt="" data-size="line"></td><td>Latest Scheduled Status</td><td>Displays the latest scheduler status via a pop-up window.</td></tr><tr><td><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2F5sMv7jKKzIdOxqCg3JY0%2Fimage.png?alt=media&#x26;token=1fe0440a-ab93-41bb-b5d2-883bd4ebdfd7" alt=""></td><td>Share Data</td><td>Shares a datastore to/for the selected user(s) or group(s).</td></tr><tr><td><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FdtgYg7oQKUbuvBudY6RX%2Fimage.png?alt=media&#x26;token=a760d862-1d63-4abb-b47a-733f3df06639" alt="" data-size="line"></td><td>Add Synonyms to </td><td>Adds more synonyms to a datastore.</td></tr><tr><td><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FyTnHJ8K9KDUdaCG9XCcH%2Fimage.png?alt=media&#x26;token=d597ed7b-e59e-4fd2-9d7c-dba55ecc87d6" alt="" data-size="line"></td><td>More options</td><td>Opens a context menu displaying more options.</td></tr><tr><td><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2F80lG6WT89BmGGzPF40Md%2Fimage.png?alt=media&#x26;token=e1f26eb8-18b8-411e-82de-6d1b180a294c" alt="" data-size="line"></td><td>View/Edit</td><td>Opens the Data Store in editable format the datastore fields.</td></tr><tr><td><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FarMeGcdS3Ln3tSuFeXqj%2Fimage.png?alt=media&#x26;token=dd1ca123-0d36-4bbd-b3af-66941c85d073" alt="" data-size="line"></td><td>Delete</td><td>Deletes the selected Data Store.</td></tr></tbody></table>
