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 instruction. The Smart Naming Convention enrichment provides a user-friendly interface that helps you create the regular expression used to find and split the fields.

Prerequisites

Before you complete the procedure in this guide, perform all of the following actions:

  • Use consistent naming conventions in your data.

  • Use delimiters (special characters) in string values to separate pieces of information. For example, you can use the delimiter | to separate pieces of information in the value EN | retail | lead.

  • Place the same information in the same position in string values. For example, if you have a column with values like EN | retail | lead and FR | retail | lead, the country code must be in the beginning of the column value.

Configuring the Smart Naming Convention enrichment

This guide explains how to configure the Smart Naming Convention enrichment. Before completing this step, start creating an enrichment by following the instructions in Using standard enrichments. To configure this enrichment, follow these steps:

  1. In Select column, click the source column for which you want to enforce naming conventions. You can only choose a column that is mapped as a dimension with the string data type. For more information on Data Mapping, see Applying Data Mapping to a datastream.

  1. Click Next.

  1. In Exclude values, deselect any values in the source column that are not consistent with your naming convention. Adverity only uses the selected values when it detects the rules of your naming convention.

  1. Click Next.

  1. In Rules and delimiters, confirm that Adverity correctly detected the rules of your naming convention by checking the following fields:

    Delimiters detected

    In this section, enable the delimiters that you want Adverity to use. You must enable at least one delimiter.

    You can see the delimiters that Adverity has detected. For example, if you use the delimiter |, the value EN | retail | lead is broken up into the parts EN, retail, and lead. Adverity creates new columns based on these values in your data extract.

    For more information on supported delimiter characters, see Supported delimiters.

    For more information on the date formats you can use in the source column, see Supported date formats.

    Rules detected

    In this section, configure the rules that you want Adverity to use. To edit a rule, click Edit.

    You can see the rules that Adverity has detected in your source column, and the new columns 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 and 2021, the detected rules are:

    • Column 1 contains only upper case characters of length 2.

    • Column 2 contains only numbers of 4 digits.

    Using predefined values

    If you select Predefined values in the Data type field, you can define up to 1000 values. When entering values in the Allowed values field, you can copy and paste a list of values from Google Sheets or Excel. The values are case-sensitive.

    Split preview

    Here, you can preview the new columns that will be added to your data extract using the delimiters and rules enabled in the sections above.

  1. Click Next.

  1. In Set headers, enter names for the new columns that are added to your data extract.

  1. Click Next.

  1. In Receive errors, choose what Adverity should do if the source column contains a value that your Smart Naming Convention enrichment cannot split in any way (for example, if a value does not contain any delimiters).

    Send email

    If Adverity encounters an error, an email notification is sent to the email addresses specified in the datastream notification settings. Errors will always be displayed in the datastream overview as well.

    Continue processing

    If Adverity encounters an error, the Smart Naming Convention enrichment continues. This may result in inconsistencies in your data extract because some values will be enriched and some will not.

    If this checkbox is cleared, the enrichment process will stop if an error occurs.

    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.

  1. Click Next.

  1. In Receive warnings, choose what Adverity should do if the source column contains a value that is not fully consistent with the rules of your Smart Naming Convention enrichment, but Adverity can try to split (for example, if one element of the value in the source column is missing).

    I want to be informed in the following cases

    Enable the toggles for the situations in which you want to be informed of the inconsistent values.

    Send email

    If Adverity finds an inconsistency, an email notification is sent to the email addresses specified in the datastream notification settings.

    Raise warning

    If Adverity finds an inconsistency, a notification about the inconsistent values is displayed in the datastream overview.

  1. Click Next.

  1. (Optional) In Name the enrichment, enter a name for this Smart Naming Convention enrichment.

  1. Click Next.

  1. In the Summary page, check the details of the Smart Naming Convention enrichment. If you need to make any changes, click the corresponding step in the list on the left to go back.

  2. Click Create +.

Supported delimiters

You can use the following characters as delimiters in a Smart Naming Convention enrichment:

Character

Name

|

vertical bar

-

hyphen

,

comma

;

semicolon

~

tilde

_

underscore

/

slash

space

.

dot

+

plus sign

#

hash sign

$

dollar sign

ยง

section sign

Supported date formats

You can use the following data formats in the source column for a Smart Naming Convention enrichment:

  • %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 an existing Smart Naming Convention enrichment

After creating a Smart Naming Convention enrichment, you can change the rules, column names and notification settings it uses. To do this, follow these steps:

  1. Select the workspace you work with in Adverity and then, in the platform navigation menu, click Enrichments.

  2. Select the Smart Naming Convention enrichment you want to edit.

  3. In the secondary menu on the left, select the setting you want to edit, e.g. Rules and delimiters.

  4. Edit the Smart Naming Convention enrichment configuration.

  5. Click Apply.

You cannot change the source column or the delimiters used in the Smart Naming Convention enrichment.