Smart Naming Convention
This guide explains how to use the Smart Naming Convention enrichment to detect and apply naming conventions in your data.
Introduction
Use the Smart Naming Convention enrichment to let Adverity detect your naming convention based on patterns in your data and enforce these conventions. Adverity monitors if data complies with the naming convention and notifies you about discrepancies.
Naming conventions are a set of rules that define how your data is presented, formatted, and structured. They specify the appropriate naming of the fields and values in the data set, and ensure your data is presented in a consistent and standardized manner. Use the Smart Naming Convention enrichment to enforce your naming convention and ensure the high quality of your data. For example, the Smart Naming Convention enrichment can automatically identify and flag missing data, and correct misaligned data sets.
The Smart Naming Convention enrichment identifies missing data and notifies you
The Smart Naming Convention enrichment corrects misaligned data sets
The Smart Naming Convention enrichment is a premium feature available upon request.
The Smart Naming Convention enrichment uses the namingconvention custom script in the background. The Smart Naming Convention enrichment provides a user-friendly interface that helps you create the regular expression used to find and split the fields.
Concept
Enriching your data means transforming and tailoring the data according to your needs. An enrichment is a set of instructions that you specify for Adverity to transform your data.
When you create an enrichment, you add it to the list of available enrichments in the workspace.
When you assign an enrichment to a datastream, each time data is fetched for the datastream, the data is transformed according to the enrichment. The enrichment only has an effect on datastreams to which you assign the enrichment.
Prerequisites
Before you complete the procedure in this guide, perform all of the following actions:
-
Create a datastream. For more information, see Introduction to collecting data.
-
Apply the correct Data Mapping for your datastream. For more information, see Introduction to harmonizing data.
-
Use consistent naming conventions in your data.
-
Use delimiters (special characters) in String values to separate pieces of information. For example, you use the delimiter
|
to separate pieces of information in the valueEN | retail | lead
. -
Place similar pieces of information in the same position in String values. For example, if you have a column with values like
EN | retail | lead
andFR | retail | lead
, the country code must be in the first place in other values of the column as well.
Procedure
To create a Smart Naming Convention enrichment for a datastream, follow these steps:
-
Select the workspace you work with in Adverity and then, in the , click Enrichments.
-
In the top right corner, click + Create Enrichment.
-
Click Smart Naming Convention.
-
(Optional) To assign the enrichment to individual datastreams of your choice, follow these steps:
-
In the Assign to section, select Individual datastreams.
-
In the drop-down menu, select the datastreams to assign the enrichment to them.
-
-
(Optional) To assign the enrichment to all existing and new datastreams that belong to Datastream Types of your choice, follow these steps:
-
In the Assign to section, select Datastreams Types.
-
In the drop-down menu, select the Datastream Types to assign the enrichment to all datastreams that belong to these types.
-
(Optional) In the Do not assign to these individual datastreams drop-down menu, select the individual datastreams that belong to the Datastream Types that you have selected, but you do not want to assign the enrichment to them.
-
-
Click Next.
-
Select the source column for which you want to enforce naming conventions. You can only choose from columns which are mapped as dimensions with String data type. For more information on Data Mapping, see Harmonizing data. For more information on the data types used in Adverity, see Data types used in data harmonization.
-
Click Next.
-
Deselect any values in the source column which are not consistent with your naming convention. Adverity only considers the selected values when it detects the rules of your naming convention.
-
Click Next.
-
Confirm that Adverity correctly detected the rules of your naming convention by checking the following fields:
-
Delimiters Detected
-
In this field, Adverity displays the detected delimiters. Delimiters are characters that Adverity uses to split the source column into several new columns. For example, if you specify the delimiter
|
, the valueEN | retail | lead
is broken up into the partsEN
,retail
, andlead
. Adverity enters these values into the new created columns in your data extract.Enable the toggle for the delimiters that you want Adverity to use. You must enable at least one delimiter.
For more information on supported delimiter characters, see Supported delimiter characters.
For more information on the date formats you can use in the source column, see Supported date formats.
-
Rules Detected
-
In this field, Adverity displays the detected rules for each new column created based on the delimiters you specify. The rules explain what the values in each new column must look like. For example, when the split values are
EN
and2021
, the rules can be the following:-
Column 1 can only contain upper case characters of length 2.
-
Column 2 can only contain numbers of 4 digits.
Enable the toggle for the rules that you want Adverity to use.
To edit the rules, click
Edit. When you select Predefined values in the Data type field, you can define at most 1,000 values.
In the Edit Rule window, when entering values in the Allowed values field, you can copy and paste a list of values from Google Sheets and Excel. The values are case-sensitive.
-
-
Split Preview
-
In this field, Adverity displays the new columns that will be added to your data extract when it applies the Smart Naming Convention enrichment.
-
-
Click Next.
-
Provide names for the new columns that are added to your data extract. Specify names that are consistent with the other column names in the data extract.
-
Click Next.
-
An uncorrectable error occurs when the source column contains a value that cannot be interpreted in any way according to the naming convention. For example, when a value does not contain any of the delimiter characters.
(Optional) To configure Adverity's behavior in case of an uncorrectable error, fill in the following fields.
-
Send Email
-
Select this checkbox to receive notifications about uncorrectable errors to the email address specified in the datastream settings. Adverity always notifies you about uncorrectable errors in the datastream's Overview page.
-
Continue Processing
-
Select this checkbox to continue the Smart Naming Convention enrichment process even if an uncorrectable error occurs. To stop the enrichment process when an error occurs, clear this checkbox.
-
Add status columns to data extracts
-
Select this checkbox to add three columns to your data extract that show whether a row meets the conditions of the Smart Naming Convention enrichment. The snc_passed column shows the items in the row that following the naming conventions. The snc_failed column shows the items in the row that do not follow the naming conventions. The snc_status column shows whether each row as a whole has followed the naming convention.
-
-
Click Next.
-
A correctable error occurs when the source column contains a value that is not fully consistent with the rules of the naming convention, but Adverity can correct this error. For example, when the source column contains an empty cell.
(Optional) To configure Adverity's behavior in case of a correctable error, fill in the following fields.
-
I want to be informed in the following cases
-
Enable the toggle for the columns for which you want to receive notifications if a correctable error occurs.
-
Send Email
-
Select this checkbox to receive notifications about correctable errors to the email address specified in the datastream settings.
-
Raise warning
-
Select this checkbox to display a notification about correctable errors in the datastream's Overview page..
-
-
Click Next.
-
(Optional) In Enrichment name, rename the enrichment.
-
Click Next.
-
In the Summary page, check the details of the Smart Naming Convention enrichment.
-
Click Create +.
Adverity will apply the Smart Naming Convention enrichment to all future data extracts you fetch with the datastream. For more information, see Collecting and viewing data.
Supported delimiter characters
When specifying delimiters in a Smart Naming Convention enrichment, you can use the following characters:
Character |
Name |
---|---|
| |
vertical bar |
- |
hyphen |
, |
comma |
; |
semicolon |
~ |
tilde |
_ |
underscore |
/ |
slash |
|
space |
. |
dot |
+ |
plus sign |
# |
hash sign |
$ |
dollar sign |
ยง |
section sign |
Supported date formats
When setting up the Smart Naming Convention enrichment, you can use the following date formats in the source column:
-
%d/%m/%Y
-
%d-%m-%Y
-
%d_%m_%Y
-
%d.%m.%Y
-
%m/%d/%Y
-
%m-%d-%Y
-
%m_%d_%Y
-
%m.%d.%Y
-
%Y/%m/%d
-
%Y-%m-%d
-
%Y_%m_%d
-
%Y.%m.%d
Editing the rules of the Smart Naming Convention enrichment
After creating a Smart Naming Convention enrichment, you can modify its rules.
To modify the rules in a Smart Naming Convention enrichment, follow these steps:
-
Select the workspace you work with in Adverity and then, in the , click Enrichments.
-
Select the Smart Naming Convention enrichment to edit.
-
Select a rule and click
to edit the rule.
-
Edit the Smart Naming Convention enrichment configuration.
-
Click Apply.
You cannot change the source column and the delimiters used in the Smart Naming Convention enrichment.