Reference Guide#

2-Step Configuration#

Follow the instruction to get the app and details about installation in Native App Installation.

Events and Logs#

To observe and troubleshoot app behavior, you can enable Logging and Event Tracing for your account and share the app logs with us. For more information, please check Snowflake Documentations below:

Stored Procedures#

CHECK_SINGLE_CONTACT#

The CHECK_SINGLE_CONTACT procedure validates and standardizes individual name, company, and address components using the Personator Consumer API. It returns the verification results in JSON format or optional output table, supporting optional fields for flexible and accurate contact validation.

To get started, please contact a sales representative at Snowflakemarketplace@Melissa.com for your License Key.

2 ways to check a contact in Native App Personator Consumer for Snowflake:

  1. Checking Form.

  2. Manually run a Snowflake SQL script to call the stored procedure.

Checking Form#

In your Snowflake account, select Data Products > Apps > PERSONATOR_CONSUMER > Menu > Check Single Contact > Try It Now > Start Checking.

Input Example#
  1. Enter the license key and contact information you want to check.

    ../../_images/Personator-Snowflake-Check-Single-Try-Now.png
  2. Select Check.

  3. Result will be displayed on the left sidebar.

Output Examples#
Check a single contact#
../../_images/Personator-Snowflake-Check-Single-Try-Now-Output.png
Check a single contact, insert the result to an output table#
../../_images/Personator-Snowflake-Check-Single-Try-Now-Output-Default.png
Check a single contact with selected output table fields#
../../_images/Personator-Snowflake-Check-Single-Try-Now-Output-Selected.png

SQL Script#

Manually call our procedures using a Snowflake SQL script.

Setup and Sample Script#
  1. Select Projects > Worksheets on the left panel in your Snowflake account.

    You can find the installed application database in Projects > Worksheets > Databases.

    ../../_images/Personator-Snowflake-Check-Single-SQL-Structure.png
  2. Select + to create a new SQL worksheet.

    ../../_images/Personator-Snowflake-Check-Single-SQL-Add-Worksheet.png
  3. Copy and paste the usage example below onto your worksheet to call the stored procedure, replace with your values.

    Check Input Parameters for more information.

    /******************************************************************
    Personator Consumer - Check Single Contact Usage Example
    ******************************************************************/
    USE PERSONATOR_CONSUMER.CORE;
    
    CALL PERSONATOR_CONSUMER.CORE.CHECK_SINGLE_CONTACT(
        LICENSE                => '<REPLACE_WITH_YOUR_LICENSE_KEY>'
       ,OPTIONS                => ''
       ,COMPANY                => ''
       ,FULLNAME               => 'Linda Fortune'
       ,ADDRESSLINE1           => '2206 Rue de la Coupole'
       ,ADDRESSLINE2           => ''
       ,CITY                   => 'Quebec'
       ,STATE                  => 'QC'
       ,POSTALCODE             => 'G2B 5A8'
       ,COUNTRY                => 'CA'
       ,MELISSAADDRESSKEY      => ''
       ,OUTPUT_TABLE_NAME      => ''
       ,OUTPUT_TABLE_FIELDS    => ''
    );
    
    /* Result view, if Output Table is provided */
    SELECT *
    FROM <YOUR_OUTPUT_TABLE_NAME>;
    

    Example of a stored procedure call from a SQL worksheet. Highlight the SQL statement then select Run button on the right top corner.

    ../../_images/Personator-Snowflake-Check-Single-SQL-Run.png
Input Parameters#

Input parameters when calling stored procedure CHECK_SINGLE_CONTACT.

Parameter

Data Type

Description

Example

LICENSE

VARCHAR

Required.
The License Key with Credits issued by Melissa.

Get it here.

MY_LICENSE_KEY

OPTIONS

VARCHAR

Required.
[OptionName:Parameter], separate by semicolon(;)

See more information about OPTIONS

UsePreferredCity:on; Diacritics:off

COMPANY

VARCHAR

Required.
Empty string or the company name

FULLNAME

VARCHAR

Required. US Only.
Empty string or prefix and/or First and/or Middle and/or last and/or suffix.

ADDRESS_LINE1

VARCHAR

Required.
The input field for the address

This should contain the delivery address information (house number, thoroughfare, building, suite, etc.) but should not contain locality information (city, state, postal code, etc.) which have their own inputs.

22382 Avenida Empresa

ADDRESS_LINE2

VARCHAR

Required.
The input field for the address.

CITY

VARCHAR

Required.
The city name.

The most common population center data element.

Rancho Santa Margarita

STATE

VARCHAR

Required.
The US state.

The most common geographic data element.

CA

POSTALCODE

VARCHAR

Required.
The postal code.

The complete postal code for a particular delivery point.

92688

COUNTRY

VARCHAR

Required.
The country.

This can only take in variations of US or Canada. All other countries will return AS09 (Foreign Address). Invalid or blank inputs will default to US and Canada.

MELISSAADDRESSKEY

VARCHAR

Required.
Empty string or a proprietary unique key identifier for an address.

OUTPUT_TABLE_NAME

VARCHAR

Required.
Empty string or name of the output table.

A new table will be created in the same application database if it doesn’t exist. If the table exists, its structure must remain unchanged.

OUTPUT_TABLE_FIELDS

VARCHAR

Required. Case-sensitive.

Only valid when OUTPUT_TABLE_NAME provided.

Fields in the output table; fields separates by comma(,) if not ‘All’.

Field name must match in one or all in an example list.

Empty string will return Default Ouput Fields.

RecordID,
inCompany,
inFullName,
inAddressLine1,
inAddressLine2,
inCity,
inState,
inPostalCode,
inCountry,
inMelissaAddressKey,
MelissaAddressKey,
MelissaAddressKeyBase,
Results,
AddressKey,
AddressLine1,
AddressLine2,
City,
CompanyName,
NameFull,
PostalCode,
State,
AddressExtras,
RecordExtras,
Reserved,
Latitude,
Longitude,
Response,
Timestamp

Output Examples#
Check a single contact#
/******************************************************************
Personator Consumer - Check Single Contact Usage Example
******************************************************************/
USE PERSONATOR_CONSUMER.CORE;

CALL PERSONATOR_CONSUMER.CORE.CHECK_SINGLE_CONTACT(
   LICENSE                => '<REPLACE_WITH_YOUR_LICENSE_KEY>'
   ,OPTIONS                => ''
   ,COMPANY                => ''
   ,FULLNAME               => 'Linda Fortune'
   ,ADDRESSLINE1           => '2206 Rue de la Coupole'
   ,ADDRESSLINE2           => ''
   ,CITY                   => 'Quebec'
   ,STATE                  => 'QC'
   ,POSTALCODE             => 'G2B 5A8'
   ,COUNTRY                => 'CA'
   ,MELISSAADDRESSKEY      => ''
   ,OUTPUT_TABLE_NAME      => ''
   ,OUTPUT_TABLE_FIELDS    => ''
);

Result is displayed in JSON format.

../../_images/Personator-Snowflake-Check-Single-SQL-Output.png
Check a single contact, insert the result into an output table#

If OUTPUT_TABLE_NAME is provided, a new table will be created if not already existed in the same application database with Default Ouput Fields.

  • Call stored procedure CHECK_SINGLE_CONTACT.

    CALL PERSONATOR_CONSUMER.CORE.CHECK_SINGLE_CONTACT(
        LICENSE                => '<REPLACE_WITH_YOUR_LICENSE_KEY>'
       ,OPTIONS                => ''
       ,COMPANY                => ''
       ,FULLNAME               => 'Linda Fortune'
       ,ADDRESSLINE1           => '2206 Rue de la Coupole'
       ,ADDRESSLINE2           => ''
       ,CITY                   => 'Quebec'
       ,STATE                  => 'QC'
       ,POSTALCODE             => 'G2B 5A8'
       ,COUNTRY                => 'CA'
       ,MELISSAADDRESSKEY      => ''
       ,OUTPUT_TABLE_NAME      => 'SINGLE_CONTACTS_DEFAULT'
       ,OUTPUT_TABLE_FIELDS    => ''
    );
    
    ../../_images/Personator-Snowflake-Check-Single-SQL-Output-Default.png
  • Query output table.

    /* Result view, if Output Table is provided */
    SELECT *
    FROM <YOUR_OUTPUT_TABLE_NAME>;
    
Check a single contact with selected output fields#

You have an option to choose OUTPUT_TABLE_FIELDS to include in your output table.

  • Call stored procedure CHECK_SINGLE_CONTACT.

    CALL PERSONATOR_CONSUMER.CORE.CHECK_SINGLE_CONTACT(
        LICENSE                => '<REPLACE_WITH_YOUR_LICENSE_KEY>'
       ,OPTIONS                => ''
       ,COMPANY                => ''
       ,FULLNAME               => ''
       ,ADDRESSLINE1           => '22382 Avenida Empresa'
       ,ADDRESSLINE2           => ''
       ,CITY                   => 'Rancho Santa Margarita'
       ,STATE                  => 'CA'
       ,POSTALCODE             => '92688'
       ,COUNTRY                => 'US'
       ,MELISSAADDRESSKEY      => ''
       ,OUTPUT_TABLE_NAME      => 'SINGLE_CONTACTS_SELECTED'
       ,OUTPUT_TABLE_FIELDS    => 'RecordID,MelissaAddressKey,Response,Timestamp'
    );
    
    ../../_images/Personator-Snowflake-Check-Single-SQL-Output-Selected.png
  • Query output table.

    /* Result view, if Output Table is provided */
    SELECT *
    FROM <YOUR_OUTPUT_TABLE_NAME>;
    
Check a single contact with ‘ALL’ output table fields#
  • Call stored procedure CHECK_SINGLE_CONTACT.

    CALL PERSONATOR_CONSUMER.CORE.CHECK_SINGLE_CONTACT(
         LICENSE                => '<REPLACE_WITH_LICENSE_KEY>'
        ,OPTIONS                => ''
        ,COMPANY                => ''
        ,FULLNAME               => ''
        ,ADDRESSLINE1           => '22382 Avenida Empresa'
        ,ADDRESSLINE2           => ''
        ,CITY                   => 'Rancho Santa Margarita'
        ,STATE                  => 'CA'
        ,POSTALCODE             => '92688'
        ,COUNTRY                => 'US'
        ,MELISSAADDRESSKEY      => ''
        ,OUTPUT_TABLE_NAME      => 'SINGLE_CONTACTS_ALL'
        ,OUTPUT_TABLE_FIELDS    => 'All'
    );
    
    ../../_images/Personator-Snowflake-Check-Single-SQL-Output-All.png
  • Query output table.

    /* Result view, if Output Table is provided */
    SELECT *
    FROM <YOUR_OUTPUT_TABLE_NAME>;
    

CHECK_MULTIPLE_CONTACTS#

The CHECK_MULTIPLE_CONTACTS procedure processes records in batches, validating and standardizing key components using the Personator Consumer API.

It can handle tables of any size, returning the results in a specified output table and supports optional fields for flexible, accurate contacts validation.

To get started, please contact a sales representative at Snowflakemarketplace@Melissa.com for your License Key.

Requirements#

To use this feature, you need to prepare an input table in Snowflake beforehand referencing our default input fields below.

Default Input Fields#

Column Name

Data Type

Description

RECORDID

NUMBER

Required. Record identifier, primary key.

MELISSAADDRESSKEY

VARCHAR

Required. Empty string is allowed.
A proprietary unique key identifier for an address

COMPANYNAME

VARCHAR

Required. Empty string is allowed.
The organization name associated with the address record.

FULLNAME

VARCHAR

Required. Empty string is allowed.
Fullname.

ADDRESSLINE1

VARCHAR

Required. The input field for the address line 1.

ADDRESSLINE2

VARCHAR

Required. Empty string is allowed.
The input field for the address line 2.

CITY

VARCHAR

Required. The city name.

STATE

VARCHAR

Required. The US state.

POSTALCODE

VARCHAR

Required. The postal code.

COUNTRY

VARCHAR

Required. The country name, abbreviation, or code.

SQL Script#

You can find the installed application database in Projects > Worksheets > Databases.

../../_images/Personator-Snowflake-Check-Multiple-SQL-Structure.png
Setup and Sample Script#

The step-by-step example below shows how to use our stored procedure CHECK_MULTIPLE_CONTACTS with the default values. Replace with your values.

  • Step 0 - Prepare an input table

    Assume that the input table has the signature below:

    CREATE TABLE IF NOT EXISTS <INPUT_DATABASE>.<INPUT_SCHEMA>.<INPUT_TABLE> (
          RECID NUMBER(38,0) autoincrement start 1 increment 1 noorder,
          MELISSAADDRESSKEY VARCHAR(16777216) DEFAULT '',
          COMPANYNAME VARCHAR(16777216) DEFAULT '',
          FULLNAME VARCHAR(16777216) DEFAULT '',
          ADDRESS1 VARCHAR(16777216) DEFAULT '',
          ADDRESS2 VARCHAR(16777216) DEFAULT '',
          CITY VARCHAR(16777216) DEFAULT '',
          STATE VARCHAR(16777216) DEFAULT '',
          POSTAL VARCHAR(16777216) DEFAULT '',
          COUNTRY VARCHAR(16777216) DEFAULT ''
    ) CLUSTER BY (RECID);
    

This input table has different column names from the Default Input Fields. Mapping column names in Step 2 is neccessary for the program to get the correct parameters.

  • Step 1 - Grant Required Privileges

    Ensure the application has the necessary access to the input table. Replace placeholders with your actual values.

    /**********************************************************************
    Personator Consumer - Multiple Contacts Usage Example
    **********************************************************************/
    /* Grant usage on input table to the application, replace with your values.*/
    GRANT USAGE ON DATABASE <INPUT_DATABASE> TO APPLICATION PERSONATOR_CONSUMER;
    GRANT USAGE ON SCHEMA <INPUT_DATABASE>.<INPUT_SCHEMA> TO APPLICATION PERSONATOR_CONSUMER;
    GRANT SELECT ON TABLE <INPUT_DATABASE>.<INPUT_SCHEMA>.<INPUT_TABLE> TO APPLICATION PERSONATOR_CONSUMER;
    
  • Step 2 - Map Input Columns with the Default Input Fields

    Set the required parameters and map your input columns to our Default Input Fields.

    You can skip the mapping step if your input table matches our Default Input Fields exactly.

    USE PERSONATOR_CONSUMER.CORE;
    
    /* Set input parameters, replace with your values */
    SET LICENSE             = '<REPLACE_WITH_YOUR_LICENSE_KEY>';
    SET OPTIONS             = '<OptionName_1:Parameter,OptionName_2:Parameter>';
    SET INPUT_TABLE_NAME    = '<INPUT_DATABASE>.<INPUT_SCHEMA>.<INPUT_TABLE_NAME>';
    SET OUTPUT_TABLE_NAME   = '<YOUR_OUTPUT_TABLE_NAME>';
    SET OUTPUT_TABLE_FIELDS = '<Field_1,Field_2>';
    
    /* Map your input columns with our default input fields, replace with your actual column names if they differ from our default values */
    CREATE OR REPLACE TEMPORARY VIEW INPUT_RECORDS AS
    SELECT
       RECID                               AS RECORDID,
       COALESCE(MELISSAADDRESSKEY, '')     AS MELISSAADDRESSKEY,
       COALESCE(COMPANYNAME, '')           AS COMPANYNAME,
       COALESCE(FULLNAME, '')              AS FULLNAME,
       COALESCE(ADDRESS1, '')              AS ADDRESSLINE1,
       COALESCE(ADDRESS2, '')              AS ADDRESSLINE2,
       COALESCE(CITY, '')                  AS CITY,
       COALESCE(STATE, '')                 AS STATE,
       COALESCE(POSTAL, '')                AS POSTALCODE,
       COALESCE(COUNTRY, '')               AS COUNTRY
    FROM IDENTIFIER($INPUT_TABLE_NAME);
    
  • Step 3 - Call stored procedure ``CHECK_MULTIPLE_CONTACTS`` to verify your data

    /* Call the stored procedure */
    CALL CHECK_MULTIPLE_CONTACTS(
        LICENSE                => $LICENSE
       ,OPTIONS                => $OPTIONS
       ,INPUT_TABLE_NAME       => TABLE(INPUT_RECORDS)
       ,OUTPUT_TABLE_NAME      => $OUTPUT_TABLE_NAME
       ,OUTPUT_TABLE_FIELDS    => $OUTPUT_TABLE_FIELDS
       -- Size limit for variables is 256. If your input string exceeds the limit, parse the string directly in the call
       -- e.g. OUTPUT_TABLE_FIELDS    => 'Field_1,Field_2'
    );
    
    /* Output table view */
    SELECT TOP 100 *
    FROM IDENTIFIER($OUTPUT_TABLE_NAME)
    ORDER BY (RECORDID);
    
Full SQL Script
/**********************************************************************
Personator Consumer - Multiple Contacts Usage Example
**********************************************************************/
/* Grant usage on input table to the application, replace with your values.*/
GRANT USAGE ON DATABASE <INPUT_DATABASE> TO APPLICATION PERSONATOR_CONSUMER;
GRANT USAGE ON SCHEMA <INPUT_DATABASE>.<INPUT_SCHEMA> TO APPLICATION PERSONATOR_CONSUMER;
GRANT SELECT ON TABLE <INPUT_DATABASE>.<INPUT_SCHEMA>.<INPUT_TABLE> TO APPLICATION PERSONATOR_CONSUMER;

USE PERSONATOR_CONSUMER.CORE;

/* Set input parameters, replace with your values */
SET LICENSE             = '<REPLACE_WITH_YOUR_LICENSE_KEY>';
SET OPTIONS             = '<OptionName_1:Parameter,OptionName_2:Parameter>';
SET INPUT_TABLE_NAME    = '<INPUT_DATABASE>.<INPUT_SCHEMA>.<INPUT_TABLE_NAME>';
SET OUTPUT_TABLE_NAME   = '<YOUR_OUTPUT_TABLE_NAME>';
SET OUTPUT_TABLE_FIELDS = '<Field_1,Field_2>';

/* Map your input columns with our default input fields, replace with your actual column names if they differ from our default values */
CREATE OR REPLACE TEMPORARY VIEW INPUT_RECORDS AS
SELECT
   RECID                               AS RECORDID,
   COALESCE(MELISSAADDRESSKEY, '')     AS MELISSAADDRESSKEY,
   COALESCE(COMPANYNAME, '')           AS COMPANYNAME,
   COALESCE(FULLNAME, '')              AS FULLNAME,
   COALESCE(ADDRESS1, '')              AS ADDRESSLINE1,
   COALESCE(ADDRESS2, '')              AS ADDRESSLINE2,
   COALESCE(CITY, '')                  AS CITY,
   COALESCE(STATE, '')                 AS STATE,
   COALESCE(POSTAL, '')                AS POSTALCODE,
   COALESCE(COUNTRY, '')               AS COUNTRY
FROM IDENTIFIER($INPUT_TABLE_NAME);

/* Call the stored procedure */
CALL CHECK_MULTIPLE_CONTACTS(
    LICENSE                => $LICENSE
   ,OPTIONS                => $OPTIONS
   ,INPUT_TABLE_NAME       => TABLE(INPUT_RECORDS)
   ,OUTPUT_TABLE_NAME      => $OUTPUT_TABLE_NAME
   ,OUTPUT_TABLE_FIELDS    => $OUTPUT_TABLE_FIELDS
   -- Size limit for variables is 256. If your input string exceeds the limit, parse the string directly in the call
   -- e.g. OUTPUT_TABLE_FIELDS    => 'Field_1,Field_2'
);

/* Output table view */
SELECT TOP 100 *
FROM IDENTIFIER($OUTPUT_TABLE_NAME)
ORDER BY (RECORDID);
Input Parameter#

Input parameters when calling stored procedure CHECK_MULTIPLE_CONTACTS.

Parameter

Data Type

Description

Example

LICENSE

VARCHAR

Required.
The License Key with Credits issued by Melissa.

Get it here.

MY_LICENSE_KEY

OPTIONS

VARCHAR

Required.
[OptionName:Parameter], separate by semicolon(;)

See more information about OPTIONS

USPreferredCityNames:on; USStandardizationType:short

INPUT_TABLE_NAME

VARCHAR

Required.
Name of the input table

OUTPUT_TABLE_NAME

VARCHAR

Required.
The output table name.

A new table will be created in the same application database if it doesn’t exist. If the table exists, its structure must remain unchanged.

OUTPUT_TABLE_FIELDS

VARCHAR

Required. Case-sensitive.

Only valid when OUTPUT_TABLE_NAME provided.

Fields in the output table; fields separates by comma(,) if not ‘All’.

Field name must match in one or all in an example list.

Empty string will return Default Ouput Fields.

RecordID,
inCompany,
inFullName,
inAddressLine1,
inAddressLine2,
inCity,
inState,
inPostalCode,
inCountry,
inMelissaAddressKey,
MelissaAddressKey,
MelissaAddressKeyBase,
Results,
AddressKey,
AddressLine1,
AddressLine2,
City,
CompanyName,
NameFull,
PostalCode,
State,
AddressExtras,
RecordExtras,
Reserved,
Response,
Timestamp

Output Examples#
Check a table of addresses with the default output fields#
  • Call the stored procedure to check multiple contacts with Default Ouput Fields.

    /************************************************************************
    Personator Consumer - Multiple Contacts Usage Example
    ************************************************************************/
    /* Grant usage on input table to application */
    GRANT USAGE ON DATABASE <INPUT_DATABASE> TO APPLICATION PERSONATOR_CONSUMER;
    GRANT USAGE ON SCHEMA <INPUT_DATABASE>.<INPUT_SCHEMA> TO APPLICATION PERSONATOR_CONSUMER;
    GRANT SELECT ON TABLE <INPUT_DATABASE>.<INPUT_SCHEMA>.<INPUT_TABLE> TO APPLICATION PERSONATOR_CONSUMER;
    
    USE SCHEMA PERSONATOR_CONSUMER.CORE;
    
    /* Set input parameters, replace with your values */
    SET LICENSE                 = '<REPLACE_WITH_YOUR_LICENSE_KEY>';
    SET OPTIONS                 = '<OptionName_1:Parameter;OptionName_2:Parameter>';
    SET INPUT_TABLE_NAME        = '<INPUT_DATABASE>.<INPUT_SCHEMA>.<INPUT_TABLE>';
    SET OUTPUT_TABLE_NAME       = 'CHECK_MULTI_CONTACTS_DEFAULT';
    SET OUTPUT_TABLE_FIELDS     = '';
    
    /* Map your input columns with our default input fields, replace with your actual column names if they differ from our default values */
    CREATE OR REPLACE TEMPORARY VIEW INPUT_RECORDS AS
    SELECT
       RECID                               AS RECORDID,
       COALESCE(MELISSAADDRESSKEY, '')     AS MELISSAADDRESSKEY,
       COALESCE(COMPANYNAME, '')           AS COMPANYNAME,
       COALESCE(FULLNAME, '')              AS FULLNAME,
       COALESCE(ADDRESS1, '')              AS ADDRESSLINE1,
       COALESCE(ADDRESS2, '')              AS ADDRESSLINE2,
       COALESCE(CITY, '')                  AS CITY,
       COALESCE(STATE, '')                 AS STATE,
       COALESCE(POSTAL, '')                AS POSTALCODE,
       COALESCE(COUNTRY, '')               AS COUNTRY
    FROM IDENTIFIER($INPUT_TABLE_NAME);
    
    /* Call the verify procedure */
    CALL CHECK_MULTIPLE_CONTACTS(
        LICENSE                => $LICENSE
       ,OPTIONS                => $OPTIONS
       ,INPUT_TABLE_NAME       => TABLE(INPUT_RECORDS)
       ,OUTPUT_TABLE_NAME      => $OUTPUT_TABLE_NAME
       ,OUTPUT_TABLE_FIELDS    => $OUTPUT_TABLE_FIELDS
    );
    
    ../../_images/Personator-Snowflake-Check-Multiple-SQL-Output-Default.png
  • Query output table

    /* Output table view */
    SELECT TOP 100 *
    FROM IDENTIFIER($OUTPUT_TABLE_NAME)
    ORDER BY (RECORDID);
    
    ../../_images/Personator-Snowflake-Check-Multiple-SQL-Output-Default-Table.png
Check a table of addresses with selected output fields#
  • Call stored procedure to check multiple contacts from an input table with selected output fields.

    /************************************************************************
    Personator Consumer - Multiple Contacts Usage Example
    ************************************************************************/
    /* Grant usage on input table to application */
    GRANT USAGE ON DATABASE <INPUT_DATABASE> TO APPLICATION PERSONATOR_CONSUMER;
    GRANT USAGE ON SCHEMA <INPUT_DATABASE>.<INPUT_SCHEMA> TO APPLICATION PERSONATOR_CONSUMER;
    GRANT SELECT ON TABLE <INPUT_DATABASE>.<INPUT_SCHEMA>.<INPUT_TABLE> TO APPLICATION PERSONATOR_CONSUMER;
    
    USE SCHEMA PERSONATOR_CONSUMER.CORE;
    
    /* Set input parameters, replace with your values */
    SET LICENSE                 = '<REPLACE_WITH_YOUR_LICENSE_KEY>';
    SET OPTIONS                 = '<OptionName_1:Parameter;OptionName_2:Parameter>';
    SET INPUT_TABLE_NAME        = '<INPUT_DATABASE>.<INPUT_SCHEMA>.<INPUT_TABLE>';
    SET OUTPUT_TABLE_NAME       = 'CHECK_MULTI_CONTACTS_SELECTED';
    SET OUTPUT_TABLE_FIELDS     = '<Field_1,Field_2>';
    
    /* Map your input columns with our default input fields, replace with your actual column names if they differ from our default values */
    CREATE OR REPLACE TEMPORARY VIEW INPUT_RECORDS AS
    SELECT
       RECID                               AS RECORDID,
       COALESCE(MELISSAADDRESSKEY, '')     AS MELISSAADDRESSKEY,
       COALESCE(COMPANYNAME, '')           AS COMPANYNAME,
       COALESCE(FULLNAME, '')              AS FULLNAME,
       COALESCE(ADDRESS1, '')              AS ADDRESSLINE1,
       COALESCE(ADDRESS2, '')              AS ADDRESSLINE2,
       COALESCE(CITY, '')                  AS CITY,
       COALESCE(STATE, '')                 AS STATE,
       COALESCE(POSTAL, '')                AS POSTALCODE,
       COALESCE(COUNTRY, '')               AS COUNTRY
    FROM IDENTIFIER($INPUT_TABLE_NAME);
    
    /* Call the verify procedure */
    CALL CHECK_MULTIPLE_CONTACTS(
        LICENSE                => $LICENSE
       ,OPTIONS                => $OPTIONS
       ,INPUT_TABLE_NAME       => TABLE(INPUT_RECORDS)
       ,OUTPUT_TABLE_NAME      => $OUTPUT_TABLE_NAME
       ,OUTPUT_TABLE_FIELDS    => $OUTPUT_TABLE_FIELDS
     -- Size limit for variables is 256. If your input string exceeds the limit, parse the string directly in the call
     -- e.g. OUTPUT_TABLE_FIELDS    => 'Field_1,Field_2'
    );
    
    ../../_images/Personator-Snowflake-Check-Multiple-SQL-Output-Selected.png
  • Query output table.

    /* Output table view */
    SELECT TOP 100 *
    FROM IDENTIFIER($OUTPUT_TABLE_NAME)
    ORDER BY (RECORDID);
    
    ../../_images/Personator-Snowflake-Check-Multiple-SQL-Output-Selected-Table.png

DROP_OUTPUT_TABLE#

After the creation, output table is only allowed for:

  • Select.

    Query the output table with regular SELECT clause

    SELECT TOP 100 *
    FROM <OUTPUT_TABLE_NAME>;
    
  • Insert.

    By calling the same stored procedure without changing the input structure, new records will be inserted to the same table.

  • Drop.

    Use stored procedure DROP_OUTPUT_TABLE if you wish to remove the table from the application database. Only tables created by the procedure call can be dropped.

    CALL PERSONATOR_CONSUMER.CORE.DROP_OUTPUT_TABLE('<OUTPUT_TABLE_NAME>');
    

Default Ouput Fields#

If OUTPUT_TABLE_FIELDS is an empty string, output table will have a default schema as below.

Column Name

Data Type

RECORDID

NUMBER

MELISSAADDRESSKEY

VARCHAR

MELISSAADDRESSKEYBASE

VARCHAR

INCOMPANY

VARCHAR

INFULLNAME

VARCHAR

INADDRESSLINE1

VARCHAR

INADDRESSLINE2

VARCHAR

INCITY

VARCHAR

INSTATE

VARCHAR

INPOSTALCODE

VARCHAR

INCOUNTRY

VARCHAR

INMELISSAADDRESSKEY

VARCHAR

RESULTS

VARCHAR

COMPANYNAME

VARCHAR

NAMEFULL

VARCHAR

ADDRESSLINE1

VARCHAR

ADDRESSLINE2

VARCHAR

CITY

VARCHAR

STATE

VARCHAR

POSTALCODE

VARCHAR

ADDRESSKEY

VARCHAR

RESERVED

VARCHAR

TIMESTAMP

TIMESTAMP_NTZ

Versions and Updates#

Check for current version#

  • Select Data Products > Apps, the current version of the app will be on display.

  • Or, run this query in Projects > Worksheets.

    SHOW APPLICATIONS;
    

Updates#

When Melissa releases a new version of the Native App, your installed application will get updated automatically.

However, you will need to reinstall the app’s functionality after the upgrade is complete, as described in Application Configuration.

Result Codes#

Interpreting Results#

The Personator API and other Melissa APIs will have a Results Output. Several different Result Codes may be returned by the service in order to give you detailed information about the status of the record submitted.

It is important to understand these result codes in order for you to make a determination of good vs bad data and how you would want to use it.

The following shows you the indicators for the different results:

Code

Description

Quality Indicator

AS01

Address verified at the unit level

Good Data

AS02

Address verified at the building level

Good Data

AS03

Valid non-USPS address

Good Data

PS01

Valid phone number

Good Data

ES01

Valid email address

Good Data

NS01

Name successfully parsed

Good Data

AE**

Results that begin with AE are an indication of address errors

Bad Data

PE**

Results that begin with PE are an indication of phone errors

Bad Data

EE**

Results that begin with EE are an indication of email errors

Bad Data

NE**

Results that begin with NE are an indication of name errors

Bad Data

GS05

Rooftop level accuracy for Lat/Long

High Accuracy GeoCoding

GS06

Interpolated rooftop level accuracy for Lat/Long

High Accuracy GeoCoding

GS01

Street level accuracy for Lat/Long

Medium Accuracy GeoCoding

For the full list of all possible result codes, please visit here.