AudienceView Connect

Editing the Control File

 

Warning
The layout of the control file determines the data structure that will be used to feed the content of the data files into the application.

Because of this, it is strongly advised that you do not alter the content of any dataloader control files unless assisted by an AudienceView System Delivery Associate.

Different areas of the control file manage different aspects of the data being imported into AudienceView. Some information manages the configuration of the data load, detailing the user, password, and role that will be used to access the system. Others detail the physical data structure that will be used to load data into AudienceView. The control files for the different data loads will differ depending upon the data being loaded.

Take for example the following control file for loading customer users. This would be used to load in online users for customers already existing in AudienceView.

The control file would look like the following:

<ControlFile>
   <Config>
      <Source name="user_record" fileName="create_customer_users.csv" key="customer_id" type="File" format="CSV" Path="." fileEncoding="" />
      <TixApplicationSettings>
         <user_id>root</user_id>
         <password>root</password>
         <role>Box Office</role>
            <encrypted_db_connect_str>9ktcFpCRaDobKbG3bbbcEWu8VGijaWEMtIlyPZpg/CK0D6TSNluFGQ91JhZhG2KY1lV7VC6IcfvpOy/+3Fq2U2rNg/p

+uEuGWZd5gxfOtKciU7y4nB95mJxbHSTT5fVXZYg2AywiYsVMtTVKTlWVvg==</encrypted_db_connect_str>
      </TixApplicationSettings>
      <NoOfThreads>1</NoOfThreads>
      <logging level="1">
         <onCondition>failure</onCondition>
         <onCondition>warnings</onCondition>
         <onCondition>success</onCondition>
         <logFileName>create_customer_users.log</logFileName>
         <outputField>conditon</outputField>
         <outputField>inputRecord</outputField>
         <outputField>responseCode</outputField>
         <outputField>responseMessage</outputField>
      </logging>
   </Config>
   <DataMap>
      <set name="load_successful">true</set>
   </DataMap>
   <DataMap source="user_record">
      <Object alias="customerObject" name="TScustomerBO">
         <set name="Customer::customer_id">customer_id</set>
      </Object>
      <doWork action="load" objectName="customerObject" result="load_successful" />
      <condition expression="load_successful=='true'">
         <Object alias="customerObject">
            <add alias="user" name="Users">
               <condition exists="default_contact_id">
                  <set name="contact_id">default_contact_id</set>
               </condition>
               <condition exists="user_name">
                  <set name="user_name">user_name</set>
               </condition>
               <condition exists="language">
                  <set name="language">language</set>
               </condition>
               <condition exists="password">
                  <set name="password">password</set>
                  <set name="comp_password">password</set>
               </condition>
               <condition exists="role_id">
                  <set name="role_id">role_id</set>
               </condition>
               <condition exists="group_id">
                  <set name="group_id">group_id</set>
               </condition>
            </add>
         </Object>
         <doWork action="update" objectName="customerObject" result="load_successful" />
      </condition>
   </DataMap>
</ControlFile>

The 'create_customer_users.xml' Control File

The different XML tags detail the different configuration points or data elements to be transferred into the AudienceView database. The following describes the different areas and in the 'create_customer_users.xml' file:

XML Tag Description
Control File Defines the contents of the entire control file. Everything found between the open and close tags represents the entire control file.
Config Defines the different configuration settings required for the dataloader that determines the name of the associated data files that will be used or the format of the data files.
TixApplicationSettings Defines the user ID, password, and role that will be used to access the AudienceView application functions
NoOfThreads The number of dataloader threads that will be used for the data import. Depending upon the type of data being loaded, you may be able to load more than one thread of data at one time. Consult an AudienceView System Delivery Associate for more information.
Logging Defines the level of logging that will occur and further defines what conditions will trigger a log entry. Once a loggable event is triggered (e.g. failure, success), the log file is created and fields defined as part of the output are exported (e.g. condition of failure, response codes and messages).
DataMap The physical mapping of data fields from the data files to the data fields in the AudienceView database that are managed and entered by the AudienceView application. The AudienceView data object is defined (e.g. TSCustomerBO) along with the mapping of each data field from the data file. Once the data is loaded, the operation to create the data instance is called and the element is added to the AudienceView database.
Script


does not appear in the above example
Information extracted by the Data Extractor (for more information, refer to Extracting Article Data), must be directly related to the Dataloader for it to be processed and run. The <script> tag is used to allow blocks to be referenced from an external source. The <script> tag and one attribute/source, which gives the file path with the <datamap> block.

A minor configuration must be made to the <script> tag to allow the extracted data to run. The user will have to specify the source attribute by specifying a path to the external link, which can be absolute or relative. The font highlighted in green below, is the path information/name that must be provided to reference the control file to the extracted information and external file:
<Script source="{extracted_file_path}" />

Once this information is entered into the control file, the Dataloader will be able to run and process all of the associated extracted information provided solely by the <script> tag.