C. Import and configure the BigDataODBCImpalaTemplate data source template in Unica Campaign

This is the third step to integrate Unica Campaign with Impala-based Cloudera Hadoop data sources.

About this task

To enable Unica Campaign to communicate with your Impala-based Hadoop system, you must do the following actions:
  • Import the BigDataODBCImpalaTemplate.xml template into Unica Campaign. You must import the template only once. Importing a template makes it available for creating data sources.

Procedure

  1. Use the configTool utility to import the BigDataODBCImpalaTemplate.xml template into Unica Campaign.
    • BigDataODBCImpalaTemplate.xml is in <Campaign_Home>/conf.
    • configTool is in <Marketing_Platform_Home>/tools/bin. For more information, see the Unica Platform Administrator’s Guide.

    The following example imports the template into the default Unica Campaign partition, partition1. Replace <Campaign_Home> with the complete path to the Unica Campaign installation directory.

    ./configTool -i -p "Affinium|Campaign|partitions|partition1|dataSources" –f <Campaign_Home>/conf/BigDataODBCImpalaTemplate.xml

  2. Create a data source based on BigDataODBCImpalaTemplate.
    1. In Unica Campaign, choose Settings > Configuration
    2. Go to Campaign|partitions|partition[n]|dataSources.
    3. Select BigDataODBCImpalaTemplate.
    4. Complete the fields to set the properties for the new data source, then save your changes.
      Important: Some properties do not have default values, so you must supply them. Pay special attention to the properties described below. This is only a partial list of the properties included in this template. For complete information, see the Unica Campaign Administrator's Guide.
    Configuration property Description
    ASMUserForDBCredentials No default value defined. Specify the Unica Campaign system user.
    DSN DSN Name as specified in the odbc.ini file for the Hive-based Hadoop big data instance.
    JndiName Not needed for user data source.
    SystemTableSchema No default value defined. Specify the user of the database that you connect to.
    OwnerForTableDisplay No default value defined. Specify the user of the database that you connect to.
    LoaderPreLoadDataFileCopyCmd SCP is used to copy data from Unica Campaign to any location on the Impala-based Hadoop system. The location must a valid HDFC location on the Impala server. This value can either specify the SCP command or call a script that specifies the command.

    For more information and detailed instructions about how to export data from Unica Campaign to a Impala-based Hadoop system, see the Unica Campaign Administrator's Guide.

    LoaderPostLoadDataFileRemoveCmd Data files are copied from Unica Campaign to a temp folder on the Hive-based Hadoop system. You must use the SSH "rm" command to remove the temporary data file.

    For more information and detailed instructions about how to export data from Unica Campaign to a Impala-based Hadoop system, see the Unica Campaign Administrator's Guide.

    LoaderDelimiter No default value defined. Specify the delimiter such as comma (,) or semi-colon (;) that separates fields in the temporary data files that are loaded into the big data instance. Tab (/t) is not supported.

    The delimiter value must match the ROW format delimiter that was used when the big data database table was created. In this example, a comma is used: ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' ;"

    SuffixOnTempTableCreation

    SuffixOnSegmentTableCreation

    SuffixOnSnapshotTableCreation

    SuffixOnExtractTableCreation

    SuffixOnUserBaseTableCreation

    SuffixOnUserTableCreation

    No default value defined. Use the same character as specified for LoaderDelimiter.
    UseExceptForMerge Set to FALSE. Hive does not support the EXCEPT clause, so a setting of TRUE can result in process failures.

    DateFormat

    DateTimeFormat

    DateTimeOutputFormatString

    All Date strings must use the dash "-" character to format dates. Hive does not support any other characters for dates. Example: %Y-%m-%d %H:%M:%S
    Type BigDataODBC_Impala
    UseSQLToRetrieveSchema Set to FALSE.
    DataFileStagingFolder Default location value is set to /tmp. You can change the location value. Example: /opt/campaign/
    Note: The value for this folder must have a trailing slash.
    If you have written shell script to copy the Unica Campaign data file to the Hive server, you need to modify it. Example:
    #!/bin/sh
    ssh <USER>@<HADOOP NODE WITH IMPALA> "mkdir -p $2" #Operating system location
    scp $1 <USER>@<HADOOP NODE WITH IMPALA>:$2 # SCP data file to Impala Server
    filename=$(basename "$1")
    extension="${filename##*.}"
    filename="${filename%.*}"
    #Moving Unica Campaign data file with name containing special characters is prohibited, so extracting extension and file names
    ssh <USER>@<HADOOP NODE WITH IMPALA> "mv $2/`basename $1` $2/$filename"
    ssh <USER>@<HADOOP NODE WITH IMPALA> "hadoop fs -put -f $2/$filename $2"
    ssh <USER>@<HADOOP NODE WITH IMPALA> "hadoop fs -mv $2/$filename $2/$filename.$extension"
    ssh <USER>@<HADOOP NODE WITH IMPALA> "hadoop fs -chmod 0777 $2/$filename.$extension"
     
    If you are using LoaderPreLoadDataFileCopyCmd, then you need to update the file location. Example:
    scp <DATAFILE> <USER>@[hostname]:/opt/campaign/
    
    If you are using LoaderPostLoadDataFileRemoveCmd, then you need to update the file location. Example:
    ssh <USER>@<HADOOP NODE WITH IMPALA> "hadoop fs -rm $2/`basename $1`"

    DeleteAsRecreate

    Please set this configuration parameter value to FALSE

    DeleteAsTruncate

    Please set this configuration parameter value to TRUE

What to do next