Skip to main content
This guide explains how to work with datasets in Pretectum using the API. You will learn how to retrieve datasets, understand their properties, and use them effectively for organizing and searching your data.

Overview

Datasets are collections of data objects (records) that share the same schema structure. They represent the actual data stored in your Pretectum master data repository and provide a way to organize records into logical groups. The hierarchy in Pretectum is:

Why Datasets Matter

Datasets help you:
  1. Organize Data: Group records by region, source, time period, or any logical category
  2. Filter Searches: Narrow search results to specific subsets of data
  3. Track Data Quality: Monitor record counts and error rates per dataset
  4. Manage Data Lifecycle: Handle imports, exports, and deletions at the dataset level

Before You Begin

To use the Datasets API, you need:
1

Create an API Key

In the Pretectum app, go to Configuration → API Keys and create a key. It is shown once, at creation, so copy it then. See API Keys.
2

Get Business Area and Schema IDs

Retrieve the business area ID using List Business Areas and the schema ID using List Schemas. Dataset queries require both IDs.

Retrieving Datasets

Datasets are accessed through their parent schema. You need both the business area ID and schema ID to list datasets.

Step 1: Get Business Area ID

Step 2: Get Schema ID

Step 3: List Datasets

Understanding the Response

Once you have the list of datasets, use the dataSetName field to filter your data object searches.

Searching Within a Dataset

Complete Client Implementation

Here is a complete implementation that handles the full hierarchy from business areas to datasets:

Building a Dataset Selector

Create a cascading filter interface for business area → schema → dataset:

Best Practices

Dataset metadata changes less frequently than actual data. Cache the list and refresh periodically:
Always filter out deleted datasets in user-facing interfaces:
Regularly check error counts to identify data quality issues:
When filtering searches, use the dataSetName, not the dataSetId:

Next Steps

List Datasets API

View the complete List Datasets API reference

Search Data Objects

Learn how to search within datasets

Schemas Guide

Learn about schemas

Business Areas Guide

Learn about business areas