Procedure: Detailed

About this task

All files and executables related to GDPR are available at the <CAMPAIGN_HOME>/tools/GDPR path

Procedure

  1. Setting Up the gdpr.properties before Running the gdpr_purge Utility:
    The user is required to fill all the information listed underneath for every Audience in their Unica Campaign application:For the Default Audience Level - Customer:
    # Name of the audience.
    # This is case sensitive.
    
    Campaign.Audience.Name=Customer
    
    # Database type for Campaign System tables.
    # Name of this property should have the audience name. 
    # Format used here is Campaign.<Audience>.DBType
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.DBType=MSSQL
    # This property can have be set to one value from MSSQL, DB2, ORACLE. 
    # This is case sensitive.
    
    Campaign.Customer.DBType=
    
    # The Contact history table mapped in Campaign for the audience level - Customer.
    # This property name should contain the audience name. 
    # The format used here is Campaign.<Audience>.ContactHistoryTable
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.ContactHistoryTable=UA_ContactHistory
    
    Campaign.Customer.ContactHistoryTable=UA_ContactHistory
    
    # The Response history table mapped in Campaign for the audience level - Customer.
    # This property name should contain  the audience name. 
    # The format used here is Campaign.<Audience>.ResponseHistoryTable
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.ResponseHistoryTable=UA_ResponseHistory 
    
    Campaign.Customer.ResponseHistoryTable=UA_ResponseHistory
    
    # The Detail contact history table mapped in campaign for the audience level - Customer.
    # This property name should contain the audience name. 
    # The format used here is Campaign.<Audience>.DetailContactHistoryTable
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.DetailContactHistoryTable=UA_DtlContactHist
    
    Campaign.Customer.DetailContactHistoryTable=UA_DtlContactHist
    
    # The Segment membership table mapped in campaign for the audience level - Customer.
    # This property name should contain  the audience name. 
    # The format used here is Campaign.<Audience>.SegmentMembershipTable
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.SegmentMembershipTable=UA_SegMembership
    
    Campaign.Customer.SegmentMembershipTable=UA_SegMembership
    
    # The Action table used in campaign for the audience level - Customer.
    # This property name should contain the audience name. 
    # The format used here is Campaign.<Audience>.ActionTable
    # This can be blank, if not used.
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.ActionTable=UA_ActionCustomer
    
    Campaign.Customer.ActionTable=UA_ActionCustomer
    
    # The Schema name used in Unica Campaign for Unica Campaign system tables.
    # This property name should contain the audience name. 
    # The format used here is Campaign.<Audience>.Db.Schema.Name
    # This can be blank if DB schema is not used.
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.Db.Schema.Name=dbo
    
    Campaign.Customer.Db.Schema.Name=
    
    # The Audience ID field for the audience level - Customer.
    # This property name should contain the audience name. 
    # The format used here is Campaign.<Audience>.Field
    # If the composite key is present, then define multiple fields.
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.Field=CustomerID
    
    Campaign.Customer.Field=CustomerID
    
    # The Data type for the Audience fields for the audience level - Customer.
    # This property name should contain the audience name and the field name. 
    # The format used here is Campaign.<Audience>.<FieldName>.Datatype
    # For composite Audience level, define multiple field data types
    # Valid values for these properties are number/string.
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.CustomerID.Datatype=number
    
    Campaign.Customer.CustomerID.Datatype=number
    
    # The Absolute path to the input CSV file which has values for different columns defined for the 
    # audience level - Customer.
    # This property name should contain the audience name. 
    # The format used here is Campaign.<Audience>.Csv
    # Note: Usage of forward slashes (/) or double-backslashes (\\) is mandatory
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.Csv=/sample/Customer.csv
    # Note: Here <GDPR_HOME> need to be replaced with actual path.
    #This is the input csv which contains the customer records which needs to be erased 
    # from the Campaign system
    
    Campaign.Customer.Csv=<GDPR_HOME>/sample/Customer.csv
    
    # The Absolute path to the output SQL file which will be generated by GDPR tool for the audience 
    # level - Customer.
    # This property name should contain the audience name. 
    # The format used here is Campaign.<Audience>.Output
    # Note: Usage forward slashes (/) or double-backslashes (\\) is mandatory
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.Output=/Customer.sql
    #Note: Here <GDPR_HOME> need to be replaced with actual path.
    #This Customer.sql will contains the delete statements
    
    Campaign.Customer.Output=<GDPR_HOME>/Customer.sql
    
    # The Maximum size of the output file in megabytes. If value of this property is nonzero 
    # then the output files will be split if the file size is going beyond the limit specified
    # below.
    # The output file could be a little larger than the size specified underneath in the 
    property.
    # This property name should contain the audience name. 
    # The format used here is Campaign.<Audience>.Output.FileSizeLimit
    # Supports only positive values.
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.Output.FileSizeLimit=10
    
    Campaign.Customer.Output.FileSizeLimit=10
    For the Additional Audience Level (For example: Composite):
    Note: For Additional audience levels, for example composite Audience level, the user must replace the values with the names they use for additional Audience levels in their campaign application.
    Copy-paste the section underneath for every Audience for all the Additional Audience levels defined in the campaign:
    # Audience name.
    # This is case sensitive.
    
    Campaign.Audience.Name=CompositeAudience
    
    # Database type for Campaign System tables.
    # Name of this property should have the audience name. 
    # Format used here is Campaign.<Audience>.DBType
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.DBType=MSSQL
    # This property can be set to one value from MSSQL, DB2, ORACLE.
    # This is case sensitive.
    
    Campaign.CompositeAudience.DBType=
    
    # Contact history table mapped in campaign for the audience level - CompositeAudience.
    # This property name should contain the audience name.
    # The format used here is Campaign.<Audience>.ContactHistoryTable
    # If there is space in audience name then escape space with single backslash
    # For example 
    # Campaign.Composite\ Audience.ContactHistoryTable=UA_ContactHistory_CompositeAudience
    
    Campaign.CompositeAudience.ContactHistoryTable=UA_ContactHistory_CompositeAudience
    
    # Response history table mapped in campaign for the audience level - CompositeAudience
    # This property name should contain the audience name.
    # The format used here is Campaign.<Audience>.ResponseHistoryTable
    # If there is space in audience name then escape space with single backslash
    # For example 
    # Campaign.Composite\ Audience.ResponseHistoryTable=UA_ResponseHistory_CompositeAudience
    
    Campaign.CompositeAudience.ResponseHistoryTable=UA_ResponseHistory_CompositeAudience
    
    # Detail contact history table mapped in campaign for the audience level - CompositeAudience
    # This property name should contain the audience name.
    # The format used here is Campaign.<Audience>.DetailContactHistoryTable
    # If there is space in audience name then escape space with single backslash
    # For example 
    # Campaign.Composite\ Audience.DetailContactHistoryTable=UA_DtlContactHist_CompositeAudience
     Campaign.CompositeAudience.DetailContactHistoryTable=UA_DtlContactHist_CompositeAudience
    
    # Segment membership table mapped in Unica Campaign for the audience level - CompositeAudience
    # This property name should contain the audience name.
    # The format used here is Campaign.<Audience>.SegmentMembershipTable
    # If there is space in audience name then escape space with single backslash
    # For example 
    # Campaign.Composite\ Audience.SegmentMembershipTable=UA_SegMembership_CompositeAudience
    
    Campaign.CompositeAudience.SegmentMembershipTable=UA_SegMembership_CompositeAudience
    
    # Action table used in Unica Campaign for the audience level - CompositeAudience
    # This property name should contain the audience name.
    # The format used here is Campaign.<Audience>.ActionTable
    # This can be blank if not used.
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.ActionTable=UA_Action_CompositeAudience
    
    Campaign.CompositeAudience.ActionTable=UA_Action_CompositeAudience
    
    # Schema name used in campaign for campaign system tables.
    # This property name should contain the audience name.
    # The format used here is Campaign.<Audience>.Db.Schema.Name
    # This can be blank if no DB schema is used.
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.Db.Schema.Name=dbo
    
    Campaign.CompositeAudience.Db.Schema.Name=dbo
    
    # Audience ID field for audience level CompositeAudience
    # This property name should contain the audience name.
    # The format used here is Campaign.<Audience>.Field
    # For composite Audience level , define multiple fields.
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.Field=Field1PK
    
    Campaign.CompositeAudience.Field=Field1PK
    Campaign.CompositeAudience.Field=Field2PK
    Campaign.CompositeAudience.Field=Field3PK
    
    # Data type for the Audience fields for the audience level - CompositeAudience.
    # This property name should contain the audience name and field name.
    # The format used here is Campaign.<Audience>.<FieldName>.Datatype
    # For composite Audience level, define multiple field data types
    # Valid values for these properties are number/string.
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.Field1PK.Datatype=number
    
    Campaign.CompositeAudience.Field1PK.Datatype=number
    Campaign.CompositeAudience.Field2PK.Datatype=string
    Campaign.CompositeAudience.Field3PK.Datatype=string
    
    # Absolute path to the input CSV file which has values for different columns defined for 
    # audience level CompositeAudience
    # This property name should contain the audience name.
    # The format used here is Campaign.<Audience>.Csv
    # Note: Usage of forward slashes (/) or double-backslashes (\\) is mandatory
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.Csv=/sample/CompositeAudience.csv
    # Note: Here <GDPR_HOME> need to be replaced with actual path.
    
    Campaign.CompositeAudience.Csv=<GDPR_HOME>/sample/CompositeAudience.csv
    
    # Absolute path to the output SQL file which will be generated by GDPR tool for 
    # the audience level CompositeAudience
    # This property name should contain the audience name.
    # The format used here is Campaign.<Audience>.Output
    # Note: Usage of forward slashes (/) or double-backslashes (\\) is mandatory
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.Output=/CompositeAudience.sql
    # Note: Here <GDPR_HOME> need to be replaced with actual path.
    
    Campaign.CompositeAudience.Output=<GDPR_HOME>/CompositeAudience.sql
    
    # Maximum size of the output file in megabytes. If value of this property is nonzero
    # then the output files will be split if file size is going beyond the limit 
    # mentioned underneath.
    # Output file could be bit larger than the size specified by property below.
    # This property name should contain the audience name.
    # The format used here is Campaign.<Audience>.Output.FileSizeLimit
    # Only positive values are supported.
    # If there is space in audience name then escape space with single backslash
    # For example Campaign.Composite\ Audience.Output.FileSizeLimit=10
    
    Campaign.CompositeAudience.Output.FileSizeLimit=10
    Note: If no additional Action table is used for the Additional Audience level, then the “Campaign.CompositeAudience.ActionTable" property value can be blank.
    Configuring Common Properties
    # Query separator character to be used for separating the queries that will be 
    # generated by the GDPR utility
    QuerySeparator=;
    
    <NOTE: Remove N for Oracle and DB2 database>
    # Nationalized string prefix to be used while generating the DB queries.
    # If your audience name or the value specified in the csv file has non-English characters, 
    # then the N prefix should be used for MSSQL.
    NLS.String.Prefix=N
    
    # Flag to define if Watson Campaign Automation integration is used. 
    # If integration is used, then specify this property as true or else specify false.
    IsWatsonCampaignAutomationIntegrated=false
    Note: The input CSV file that contains customer information to be deleted from the Campaign system tables can be generated through Campaign using the select and snapshot process box; output only the audienceId field into the CSV file.
  2. Running the gdpr_purge Utility:1. Launch the command prompt and navigate to <CAMPAIGN_HOME>/tools/GDPR .2. Run the gdpr_purge.bat / shNote: In case of any errors, please check the gdpr.log file generated at <CAMPAIGN_HOME>\tools\GDPR\logs.Logging for gdpr_purge.sh/bat utility:In case of errors in the GDPR utility execution user can use the log4j.properties to change the logging of GDPR utility.log4j.properties is available in <CAMPAIGN_HOME>\tools\GDPR\.
  3. Reviewing and Executing SQL:The Output sql file containing delete statements gets generated at the following locations:Campaign.Customer.Output=<CAMPAIGN_HOME>\tools\GDPR\Customer.sqlCampaign.CompositeAudience.Output=<CAMPAIGN_HOME>\tools\GDPR/CompositeAudience.sqlAll the sql files created for all the audiences configured in Campaign system must be executed.The GDPR utility might generate multiple files of delete statements of customer records to be erased, depending on output file size specified in the properties file: Campaign.CompositeAudience.Output.FileSizeLimitThe Campaign user / Campaign DBA must execute all these files.If there are multiple partitions, the SQls must be executed on every database schema for every partition defined in Campaign.

Known Issue

When you execute the script generated via the GDPR utility on DB2, you might come across the following error that you can ignore:Warning/ERROR .TRUNCATE TABLE camp912x.Temp_8652429716865416192DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0104N An unexpected token "END-OF-STATEMENT" was found following"_8652429716865416192". Expected tokens may include: "IMMEDIATE". SQLSTATE=42601