--- title: "Data Subset" slug: "data-subset" updated: 2025-07-31T13:59:09Z published: 2025-07-31T13:59:09Z canonical: "knowledge.curiositysoftware.ie/data-subset" --- > ## Documentation Index > Fetch the complete documentation index at: https://knowledge.curiositysoftware.ie/llms.txt > Use this file to discover all available pages before exploring further. # Data Subset Extract only the data you need from a much larger database. - > - **Database Subsetting:** Extract and mask only relevant data subsets. > - **Targeted Data Extraction**: Apply rules to isolate necessary data efficiently. > - **Smaller, Manageable, Datasets:** Improve performance and focus on specific data needs. #### Pre Requisites: To follow this documentation through you will need to a **Data Definition** to be created. Follow [Data Discovery](/kb/docs/data-discovery) to setup a definition. ### Configure Stored Query The Data Subset will require a stored query to run against the underlying data store. Create a **+New Query.** Click on Rules from the side ribbon → **Criteria Explorer → Query tab → +New Query.** ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-A9PFC6SC.png) Add a **Name, Type & Description** for the Query. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-ERA2TS3V.png) On the **Query** tab, enter the **Definition**, **Version**, **Schema**, **Table** to query and the **Query** itself. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-7G0D0JSW.png) Click **OK** when ready. #### Create Data Activity Click on the Activity Explorer in the side panel ribbon ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-T7XGDVSI.png) Provide a **Name** & **Description** ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-29K6N9PZ.png) Click **Next Step → Finish,** when ready. Attach a **Definition Version** ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-EOZ163N4.png) Provide the **Definition** & **Version** you wish to work with. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-H1XRBR01.png) Click **OK** when ready. Now **Attach Default Database Connection**. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-ADN1YXG1.png) Choose the **Connection Profile** for the definition version you selected. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-Z99EBPAW.png) On the configuration tab, we will **Edit** some of the properties. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-JYREQ4TB.png) The **Target** database is the location that the data will move to. The **Source** database is the location that the original data is located in. > In this example environment, we have a Database with 2 schema. These schemas are identical. We will move data from **public** to **subset**. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-TJXS3G5F.png) In the configuration edit, we will set the **Schema Mappings** to ‘public, subset’ as the above screenshot for the schemas we are moving data between. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-FQ9Q4MKW.png) Click **OK** when ready. The configuration values should have updated. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-C41ILE62.png) Now we attach the **Stored Query** we created earlier. Choose the query we created earlier. Click **OK** when ready. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-6M62NP1T.png) Next we will configure which tables are included in our subset, choose **Create Process Model** from the Definition Version drop down list. Click the **Play** icon. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-H5YSB1RI.png) Choose the tables you wish to include. I’ve chosen **Transactions, Accounts, Creditcards & Customers.** Click **Add Tables** & when ready, select **Execute.** ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-2N41PD9I.png) As a check, make sure the job completes without errors. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-LHQ3MRIU.png) As a last step, we will create a **Submit Form**. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-HJON114C.png) Fill in the **Name of the Submit Process** & Choose a group to add it to. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-KE2UX0FR.png) You can now run this job by clicking the **Play** icon on the **Server Process** ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-KMGRHW3H.png) Select 'Subset’ from the **Actions to perform** drop down list. > The target schema should be **empty**. As data is moved between environments, make sure no data is present. Click **Execute** to submit the job. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-836WLSXW.png) When the job completes it will give you details on what data has been subset into an environment. ![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-7H1RQWHF.png)