Using Collection View
Last updated
Last updated
For MongoDB, Collection View replaces Database View and Table View. From Collection View, you can view the fields in a selected collection. You can then assign a collection mode to the collection, and assign generators to fields.
From the Collection dropdown list, select the collection to view.
The collection mode is the term used in MongoDB for table mode. The collection mode determines at the collection level how the data for the collection is used to generate the destination database.
By default, the collection mode is De-Identify. In this mode, Structural uses the assigned generators to transform the source database into the destination database.
For MongoDB, the only other options are Truncate and Preserve Destination. Truncate means that only the collection structure is included in the destination database. The collection has no data in the destination database. Preserve Destination means that Tonic does not change the data that is currently in the destination database.
To assign the collection mode:
Click the Collection Mode dropdown list.
On the panel, click the current collection mode.
From the drop-down list, select the mode to use.
You can view a collection either as a hybrid document or as single documents. From the View dropdown list, select the view to use.
The default view is Hybrid Document. For the hybrid document view, the key list reflects all of the permutations of every field from every document. For example, a field might sometimes be a datetime value and sometimes a string. Hybrid document view lists both types.
Single Document view displays a single document at a time. You can then page through up to 100 documents. For each document, you see the structure for that particular document.
For each field, Collection View always displays:
The field name and type.
For fields that you configured as primary or foreign keys, a key icon.
The assigned generator.
An example value. For the hybrid view, you can use the magnifying glass icon to display additional example values.
For the hybrid document view, there is also a Field Freq column. Field Freq shows the percentage of documents that contain that permutation of field and type. For example, you might see that a field is Null 33% of the time and contains a numeric value 67% of the time. Or a field value is an Int32 value 3% of the time and an Int64 value 6% of the time. The percentages apply to the first 100 documents.
The Preview toggle at the top right of Collection View allows you to choose whether to display original source data or the transformed data. You can switch back and forth to see exactly how Tonic Structural transforms the data based on the collection and field configuration.
By default, the Preview toggle is in the on position, and the displayed data reflects the selected collection mode and the assigned generators. For collections that use Truncate mode, the preview data is empty. Truncated collections do not have data in the destination database.
To display the original source data, toggle Preview to the off position.
In the single document view, you can filter the fields by either the field name or the field value.
In the hybrid document view, you can filter the fields based on either the field name or field properties.
You can filter single document view to only display fields that have specific text in either the field name or the field value.
To filter by value, toggle Search by Value to the on position.
After you select the filter type, in the search field, type text that is in the field name or value. As you type, Structural filters the list to only include fields that contain the filter text.
To filter hybrid view by field name, in the search field, begin typing text that is in the field name. As you type, Structural filters the list to only include fields with names that include the filter text.
From the hybrid document view, you can filter the fields based on field properties.
To display the Filters panel, click Filters.
To search for a filter or a filter value, in the search field, start to type the value. The search looks for text in the individual settings.
To add a filter, depending on the filter type, either check the checkbox or select a filter option. As you add filters, Structural applies them to the field list.
Above the list, Structural displays tags for the selected filters.
To clear all of the currently selected filters, click Clear All.
The Filters panel in hybrid view includes the following fields.
An at-risk field:
Is marked as sensitive
Is assigned the Passthrough generator.
To only display at-risk fields, on the Filters panel, check At-Risk Field.
When you check At-Risk Field, Structural adds the following filters under Privacy Settings:
Sets the sensitivity filter to Sensitive
Sets the protection status filter to Not protected
You can filter the fields based on the field sensitivity.
On the Filters panel, under Privacy Settings, the sensitivity filter is by default set to All, which indicates to display both sensitive and non-sensitive fields.
To only display sensitive fields, click Sensitive.
To only display non-sensitive fields, click Not sensitive.
Note that when you check At-risk Column, Structural automatically selects Sensitive.
You can filter the fields based on whether they have any generator other than Passthrough assigned.
On the Filters panel, under Privacy Settings, the field protection filter is by default set to All, which indicates to display both protected and not protected fields.
To only display fields that have an assigned generator, click Protected.
To only display fields that do not have an assigned generator, click Not protected.
Note that when you check At-Risk Field, Structural automatically selects Not protected.
You can filter the fields by the field data type. For example, you might only display columns that contain either numeric or integer values.
To only display fields that have specific data types, on the Filters panel, under Database Data Types, check the checkbox for each data type to include.
The list of data types only includes data types that are present in the currently displayed fields and that are compatible with other applied filters.
To search for a specific data type, in the Filters search field, begin to type the data type.
When the source database schema changes, you might need to update the configuration to reflect those changes. If you do not resolve the schema changes, then the data generation might fail. The data generation fails if there are unresolved conflicting changes, or if you configure Structural to always fail data generation when there are any unresolved changes.
For more information about schema changes, go to Viewing and resolving schema changes.
To only display fields that have unresolved schema changes, on the Filters panel, check Unresolved Schema Changes.
For detected sensitive fields, the sensitivity type indicates the type of data that was detected. Examples of sensitivity types include First Name, Address, and Email.
To only display fields that contain specific sensitivity types, on the Filters panel, under Sensitivity Type, check the checkbox for each sensitivity type to include.
The list of sensitivity types only includes sensitivity types that are present in the currently displayed fields.
To search for a specific sensitivity type, in the Filters search field, type the sensitivity type.
You can filter the column list to indicate whether to include:
Columns that are not primary or foreign keys.
Columns that are foreign keys.
Columns that are primary keys.
On the Filters panel, under Field Type:
To display fields that are neither a primary key nor a foreign key, check Non-keyed.
To display fields that are primary keys, check Primary key.
To display fields that are foreign keys, check Foreign key.
The commenting feature requires an Enterprise license.
You can add comments to fields. For example, you might use a comment to explain why you selected a particular generator or marked a field as sensitive or not sensitive.
If a field does not have any comments, then to add a comment:
Click the comment icon.
In the comment field, type the comment text.
Click Comment.
When a field has existing comments, the comment icon is green. To add comments:
Click the comment icon. The comments panel shows the previous comments. Each comment includes the comment user and timestamp.
In the comment field, type the comment text.
Click Reply.
On the field configuration panel, the sensitivity toggle at the top right indicates whether the field is marked as sensitive.
To mark a field as sensitive, toggle the setting to the Sensitive position.
To mark a field as not sensitive, toggle the setting to the Not Sensitive position.
You can assign a generator to each combination of field and type. For example, depending on the document, the data type for a field might be either string or integer. You can indicate to use the Character Scramble generator when the field type is a string and the Random Integer generator when the field type is integer.
In hybrid document view, the Null type reflects when the column value is Null. You do not assign a generator to it.
To assign a generator:
Click the generator value for the field.
On the configuration panel, from the Generator Type dropdown list, select the generator.
Configure the generator options. For details about the available configuration options for each generator, go to the Generator reference.
By default, Structural retrieves 100 documents. It then uses the data in these documents to populate example values in the hybrid document.
For sparsely populated collections, where less common fields are not present in those 100 documents, Structural retrieves extra documents until it has example values for all fields. For very sparsely populated collections, this might cause the collection view to load slowly, because it must retrieve many documents.
To disable examples for sparse collections, set the environment setting TONIC_MONGO_DISABLE_EXTRA_EXAMPLES
to true
. You can add this setting manually to the Environment Settings list on Structural Settings.
When this setting is true
, fields that do not have a retrieved value use a dummy default value that is based on the data type.