# Creating and Updating Instance

## Creating Instance <a href="#creating-instance" id="creating-instance"></a>

{% hint style="info" %}
*Prerequisite: Please make sure that the **Data Store Settings** has been configured from the **Admin module** to **access the Instance functionality** for the* *Data Store inside a **Report.***
{% endhint %}

<details>

<summary>What is a Personalised Store?</summary>

The Data Store for which the user can set the TIme To Live (TTL) limit using the Story interface is considered a Personlised Data Store or Personalised Store.

</details>

<details>

<summary>What is the limit for TTL? What is the maximum limit for TTL?</summary>

The ***Time to Live (TTL)*** for the data will be of 1-30 days. The maximum limit provided for the ***TTL*** is ***30 days.***

</details>

{% hint style="success" %}
*Check out the given walk-through on how to create an instance for an existing datastore under the Personalised category.*
{% endhint %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq1Y2nC9XDrWcLwg1gpYr%2Fuploads%2FlGb3Wen9djimFfNIINT9%2FCreating%20an%20Instance%20for%20Personalised%20DataStoreV2.mp4?alt=media&token=9e24b82d-1cbe-4200-ba20-49f7ca6ba6f0>" %}
***Instance Creation for Personalised Data Stores***
{% endembed %}

The ***Create Instance*** option is used to load the data for the first time from the datastore into Elastic, MongoDB, ClickHouse server as the configuration done in the ***Admin Module*** for the Datastore Settings.&#x20;

* Navigate to the Data Store list inside a ***Create New Report*** dialog box.
* The ***Select Data Store*** page opens listing all the available Data Stores.
* Select the ***Personalized*** Data Store Category.

<figure><img src="/files/jM1c4vt59FSvPzFFQz2m" alt=""><figcaption></figcaption></figure>

* Search for a Data Store in the given search bar.
* Select a Data Store by using the checkbox.
* Click the Data Store to open the Time To Live (in days) option. Provide the no. of days for the selected Data Store to create new instance.
* Click the ***Refresh*** option.&#x20;

<figure><img src="/files/wR6ptRLBiufy5S3c4gAi" alt=""><figcaption></figcaption></figure>

* A confirmation message appears to update the Data Store details.

<figure><img src="/files/ZpZWyhhYlddD707fkfmy" alt=""><figcaption></figcaption></figure>

* The concerned Data Store starts displaying the Days Left option based on the provided no. of days while setting the TTL.
* Select the Data Store by using the check box.
* Click the ***Create Report*** option to proceed with the View creation.

<figure><img src="/files/bPzobh9H2Y3UrZJwp1zu" alt=""><figcaption></figcaption></figure>

## Updating Instance (Under Progress) <a href="#updating-instance" id="updating-instance"></a>

The permitted ***Time to Live*** limit for a Data Store is only 30 days (maximum). If it goes above that, data will not be present in the Report

. Hence, the user can manually update the instance. The ***Days Left*** column will highlight such condition as flashing ***Expire*** status in the red color. Click the user gets redirected to update the instance for the selected Data Store so the data will be refreshed again in the ***ES*** or ***MongoDB***.

{% hint style="success" %}
*Check out the given walk-through on how to update instance for a Personalised Data Store.*
{% endhint %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq1Y2nC9XDrWcLwg1gpYr%2Fuploads%2FqbhRwExLTqTpjVpbOY4y%2FUpdating%20Instance%20Report%20V2.mp4?alt=media&token=e1dd424b-4db9-4aac-bcc6-f20743f8a8a7>" %}
***Updating Instance***
{% endembed %}

* Navigate to the ***Create New Report*** page.
* Filter the Data Store list with ***Personalised*** category.
* Select a Data Store from the ***Personalised*** category that has been expired.

<figure><img src="/files/XpTJCN3aueBPL7KKHjfP" alt=""><figcaption></figcaption></figure>

* Select the Data Store by using the checkbox provided next to the Data Store.&#x20;
* Click on the Datastore to open the ***Time to Live*** (TTL) option. Mention no. of days (up to 30 days is allowed for TTL).
* Click the ***Refresh*** option.

<figure><img src="/files/ltm1XYPAEphsRCxgOgCD" alt=""><figcaption></figcaption></figure>

* A notification message appears to inform about the successful update of the Data Store.

<figure><img src="/files/gLOe6uzRKicOoG3zfBVV" alt=""><figcaption></figcaption></figure>

* The Data Store gets refreshed, and the inserted no. of days get reflected under the Days Left column.
* Click the **Create Report** option to start with View creation part of the Report.

<figure><img src="/files/MFWCyj64kYH59F57p9p5" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark> The user can distinguish between Datastores:*

* *Distinguish between instances and scheduler-based data stores.*
* *Distinguish between the **Active** and **Expired** instances.*
  * *The Expired Data Stores are mentioned with the Expired Status.*
    {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bdb.ai/self-service-visualization-4/creating-a-new-report/create-new-report/creating-a-new-report-with-an-existing-data-store/creating-and-updating-instance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
