Getting Started with Sampling Component
This getting started gives some clues to start working with Sampling Component.
This Component allows to produce sample data based on an existing database scheme.
The main idea is to specify a sampling percentage on some tables and propagate the sampling on the other tables with the primary & foreign keys.
Below, an example:
In this example, T_CUSTOMER table has originally 100 records and is configured to keep at the end (on target schema) only 10% of those records.
In the same way, T_BEDROOM table has originally 20 records and is configured to keep only 20% of its records.
There is a foreign key on T_PHONE table related to T_CUSTOMER.CUS_ID primary key. So, T_PHONE will keep only the records related to the 10% of record kept on T_CUSTOMER tables…
T_BREAKFAST_PRICE table is an isolated table (without links on other tables) and is not configured to have a sampling of its records. So, all the content of this table will be kept on target schema.
When installed, the Sampling Components adds new properties in databases Metadata, under the "Sampling" tab.
This allows to configure how the sample data will be produced.
The percentage of data to keep can be specified, alongside with optional filters.
|The SQL Order By property allows to apply a sort when reading the data to sample. As only a percentage of records will be kept, this property can be useful to order the data, because the extracted data are the first records returned.|
When you have defined your sampling rules in your Metadata, you can use the dedicated Process Tool to sample corresponding data:
Create a Process
From the Process Paletten add the Sampling RDBMS Process Tool.
Drag and drop the source schema (to sample) Metadata Link on SOURCE
Drag and drop the target schema Metadata Link on TARGET
Drag and drop a folder Metadata Link (a path for the log directory)
Below, an example:
Then, set the parameters of the tool accordingly to your needs:
The Sampling Component ships sample project(s) that contain various examples and use cases.
You can have a look at these projects to find samples and examples describing how to use it.
Refer to Install Components to learn how to import sample projects.