# Dataset Management

Dataset Management lets you review the object types a source collects and control how the source aggregates those objects into SailPoint. Use Dataset Management to view and manage resource attributes, datasets and their resources, enable dataset aggregation schedules, perform manual aggregation, and view aggregation history.

> [!NOTE]
>
> Datasets are also available in SailPoint Agentic Fabric. Contact your Customer Success team and refer to [SailPoint Agentic Fabric](<https://documentation.sailpoint.com/saas/help/agentic_fabric/index.html>) for more information.

For more information, refer to [Managing Datasets and Resources](<https://documentation.sailpoint.com/saas/help/sources/datasets.html>) for datasets, resources, owner correlation, and aggregation.

## Datasets

A *dataset* is a named group of one or more related resources that the source aggregates together.

When aggregation runs for a dataset, the source collects all resources in that dataset from the managed system in one aggregation job. Activate or deactivate aggregation at the dataset level, not for individual resources.

> [!NOTE]
>
> Each resource belongs to exactly one dataset for that source. The source defines which resources belong to each dataset. You can enable aggregation and review associated resources, but you cannot create or delete datasets or move resources between them.

### Dataset Aggregation

Configure aggregation on the **Dataset Aggregations** tab for each dataset. Configure each dataset separately. During aggregation, your owner correlation rules are automatically applied to link machine identities to their human owners. For more information, refer to [Configuring Dataset Aggregations](<https://documentation.sailpoint.com/saas/help/sources/datasets.html#configuring-dataset-aggregations>).

## Resources

A resource defines an object type from the managed system. It specifies the kind of object, the attributes the source collects, and how the source identifies and displays each object. Resources form the building blocks of the data model.

In the UI, each resource appears under **Dataset Management** \> **Resources** with its schema. A resource does not run aggregation by itself. The dataset that owns the resource collects it during aggregation.

For more information, refer to [Managing Resources](<https://documentation.sailpoint.com/saas/help/sources/datasets.html#managing-resources>).

### Owner Correlation

Configure owner correlation on each resource to link aggregated objects to human owners. If you do not configure owner correlation, or if the mapping produces no match, an owner is not assigned. For more information, refer to [Configuring Owner Correlation](<https://documentation.sailpoint.com/saas/help/sources/datasets.html#configuring-owner-correlation>).

## Creating Datasets and Resources

Create datasets and resources for your JDBC source in Dataset Management. Refer to [Creating Datasets](<https://documentation.sailpoint.com/saas/help/sources/datasets.html#creating-datasets>) and [Creating Resources](<https://documentation.sailpoint.com/saas/help/sources/datasets.html#creating-resources>) for the steps.

Use the following JDBC-specific guidance when you create them:

- Name datasets to describe the group of resources they aggregate, for example `snowflake:cortex`.
- Name resources to describe the object type you want to aggregate, for example `Snowflake Cortex Agent`.
- Enter schema attribute names that match names your SQL query returns.

> [!IMPORTANT]
>
> The resource ID attribute must exactly match a column name that your SQL query returns. Some databases, such as Snowflake, treat column names as case-sensitive.

After you create the resource, configure SQL queries in [Configuring Dataset Query Settings](<#configuring-dataset-query-settings>), then aggregate the dataset.

## Configuring Dataset Query Settings

Configure the SQL queries SailPoint runs to load resource data from your database.

### Enabling Agent Governance

> [!NOTE]
>
> **Screenshot**
>
> [![Agent Governance Settings](<https://documentation.sailpoint.com/connectors/jdbc/va/help/img/dataset_query_settings_agent_governance.png>)](<https://documentation.sailpoint.com/connectors/jdbc/va/help/img/dataset_query_settings_agent_governance.png>)

1. Select the **Enable Agent Governance** toggle. This action reveals the Dataset Query Settings section, which displays a card for each resource you created in Dataset Management.

   > **Note**
   >
   > When you turn off this toggle, SailPoint hides the Dataset Query Settings section.

### Configuring Resource Query Settings

1. Select the edit icon for the resource you want to configure.
2. Perform the following tasks to configure queries for each resource:

   1. [Configure connection settings](<#configuring-connection-settings>)
   2. [Configure SQL query settings](<#configuring-sql-query-settings>)
   3. [Set additional query settings](<#setting-additional-query-settings>)

> [!IMPORTANT]
>
> SQL entries can't end with a semicolon (;). Ending an SQL entry with a semicolon (;) can cause a general error message to display.

#### Configuring Connection Settings

Enter the connection details SailPoint uses to connect to your database and load resource data for dataset aggregation.

> [!NOTE]
>
> If you leave these fields blank, the connector uses the Account Connection Settings.

> [!NOTE]
>
> **Screenshot**
>
> [![Connection Settings](<https://documentation.sailpoint.com/connectors/jdbc/va/help/img/dataset_resource_connection_settings.png>)](<https://documentation.sailpoint.com/connectors/jdbc/va/help/img/dataset_resource_connection_settings.png>)

1. In the **Database URL** field, provide the JDBC connection string corresponding to the database with which to connect. The generic format is as follows:

   `jdbc:<database_type>://:<port>/<database_name>`

   For example:

   `jdbc:snowflake://sailpoint-conn.snowflakecomputing.com`

   > **Note**
   >
   > The JDBC connector is a generic connector that supports connecting to a database, provided that the database has a JDBC driver available.
2. Enter the **Driver Class** path according to database you want to connect.

   For example:

   `net.snowflake.client.jdbc.SnowflakeDriver`
3. Enter the **User Name** required to access the server.
4. Enter the **Password** associated with the user name to access the server.
5. Select **Save**.

#### Configuring SQL Query Settings

Configure the SQL query SailPoint runs to load resource data from your database.

> [!NOTE]
>
> **Screenshot**
>
> [![Query Settings](<https://documentation.sailpoint.com/connectors/jdbc/va/help/img/dataset_resource_query_settings.png>)](<https://documentation.sailpoint.com/connectors/jdbc/va/help/img/dataset_resource_query_settings.png>)

1. Enter an SQL query in the **SQL Query** field. The query must return columns that match the attribute names you defined in the resource schema.

   For example, for a resource schema with attributes NAME, DATABASE\_NAME, and SCHEMA\_NAME:

   ```sql
   SELECT NAME, DATABASE_NAME, SCHEMA_NAME FROM SNOWFLAKE.CORTEX.AGENTS
   ```

   For example, for a capability resource with attributes CAPABILITY\_NAME, AGENT\_NAME, and DESCRIPTION:

   ```sql
   SELECT CAPABILITY_NAME, AGENT_NAME, DESCRIPTION FROM SNOWFLAKE.CORTEX.AGENT_CAPABILITIES
   ```
2. (Optional) Select the **Use Stored Procedure for SQL Query** checkbox to execute a stored procedure on the database.

   For example:

   ```sql
   CALL GetCortexAgents()
   ```
3. Select **Save**.

#### Setting Additional Query Settings

Set additional query settings to support the SQL query for a resource.

> [!NOTE]
>
> **Screenshot**
>
> [![Additional Query Settings](<https://documentation.sailpoint.com/connectors/jdbc/va/help/img/dataset_resource_additional_query_settings.png>)](<https://documentation.sailpoint.com/connectors/jdbc/va/help/img/dataset_resource_additional_query_settings.png>)

1. (Optional) Select the **Use executeQuery** checkbox to return a single ResultSet object when connector queries the JDBC database.
2. Select **Save**.

### Governance Attributes

During aggregation, the connector adds the `spBusinessApplication` attribute with the value `JDBC_NHI` to agent resources (`std:agent`). You do not need to include this attribute in your SQL query or resource.

The `spStatus` attribute tells SailPoint whether an agent is enabled or disabled. To report agent status, add `spStatus` as an attribute on the resource and return the matching column in your SQL query. You can also add `spDescription` to provide a description for the resource.

For example:

```sql
SELECT NAME, DATABASE_NAME, STATUS AS spStatus, DESCRIPTION AS spDescription FROM SNOWFLAKE.CORTEX.AGENTS
```
