Skip to content

Use test data

Testing jobs in Opaque lets you safely iterate and validate your logic before submitting your queries for review. By using test datasets, job authors and reviewers can simulate job execution and view sample results—without ever accessing sensitive data. This helps streamline development while preserving privacy.

Test data types

Opaque provides two types of test datasets to balance privacy and utility for job development:

  • Synthetic data: Matches the structure and statistical properties of the real dataset, offering a more accurate simulation without exposing sensitive information.
    • This test data reflects the statistical properties and format of the original dataset, providing a realistic representation for query development.
    • Personally identifiable information (PII) and individual records are anonymized, ensuring privacy.
    • Ideal for workspace collaborators to design and refine queries with high realism and usability.
  • Random dummy data: Based on column names and data types only. Offers maximum privacy, but less realistic results.
    • This test data is generated solely based on column names and data types, without replicating the original dataset's distributions.
    • It offers stronger privacy guarantees but less utility, as it may not resemble the original dataset's format or patterns.
    • Useful when maximum data abstraction is required, though it may limit meaningful query development.

Both options enable secure job development while addressing varying needs for privacy and functionality.

Each dataset can have one associated test dataset, which is automatically generated during the upload process. For job results, only a permitted member of the dataset owner's organization can generate test data.

Generate test datasets

Test data allows users to interact with datasets securely for job development. Members of the dataset's owning organization can generate test datasets in two ways:

  • From Query Results:
    • When viewing job results, click Generate Test Data in the top-right corner.
    • Select the type of test data (e.g., synthetic or dummy), then click Generate.
  • From the Dataset Details panel:
    • On the Org Data or Workspace Data page, select the dataset.
    • Under Has a Test Dataset, click Generate Test Data.
    • Choose the test data type and click Generate.

Test data options and generation steps ensure faster and secure job development while protecting the original dataset.

Testing jobs as a job author

Job authors can test notebook jobs that are in the Draft state at any time. Testing helps you fine-tune queries and preview sample results before submitting them for review.

Test a job

  1. Go to the job page.
  2. Select a job that’s in Draft stage.
  3. From the Job Actions menu at the top of the notebook, click Test on Mock Data.
  4. The test will run using any available test datasets.
  5. View results and logs in the Run History tab.

Note

You can continue editing your job as long as you haven’t submitted it for review or run. Once a job is under review, it becomes read-only—but you can cancel the review to return it to draft. After a job is run, you can no longer edit it.

View test results

Test run results appear in the Run History tab on the job details page and can be viewed by permitted members of the job author’s organization.

Check test data availability

All datasets used in your job must have an associated test dataset. If even one dataset lacks test data, the test will fail and a message will notify you.

There are two ways to check if a test dataset is available for the dataset:

  • From within the notebook job: In the editor, datasets that have an associated test dataset display a clipboard icon next to their name in the left-hand dataset panel. Hover over the icon to see the type of test data.
  • From the data detail page: On the Org Data or Workspace Data page, select the dataset to view its details. Look for the Has Test Data field to confirm whether test data is available.

Testing jobs as a reviewer

Reviewers can also test jobs before approving or rejecting them. This lets you verify that the query functions as expected—again, without exposing real data.

Job reviewers can also test jobs before approving or rejecting them. This feature allows reviewers to run queries on test datasets to gain more insight into the expected results, ensuring that queries are functioning properly before they are approved to run on sensitive data.

  1. Navigate to the job list page.
  2. Select a job in the Under Review state.
  3. From the Job Actions menu, choose Test on Mock Data.
  4. View results and logs in the Run History tab.

Testing is a key part of secure job development in Opaque—use it to validate logic early, catch errors safely, and build confidence before working with sensitive data.