Overview

Skill Level: Intermediate

Prerequisites

This interface supports programmatically exporting Relational Table and Relational Table Query data from your Watson Campaign Automation Org and uploading a CSV, TSV, or PSV file to the SFTP account or to the Stored Files directory associated with the session.

Step-by-step

  1. Syntax of the request and response XML for ExportTable

    Operation <ExportTable>
    Elements TABLE_NAME Optional parameter that specifies the folder path and name of the Relational Table or Relational Table Query that you are exporting. Either TABLE_NAME or TABLE_ID is required.

    Note: If you specify TABLE_VISIBILITY, Acoustic Campaign ignores Private/Shared in TABLE_NAME.
      TABLE_ID Optional parameter to specify the ID of the Relational Table or Relational Table Query that you are exporting. Either TABLE_NAME or TABLE_ID is required.
      TABLE_VISIBILITY Optional field that defines the visibility of the table you are referencing. Required if not specified in TABLE_NAME.

    • 0 – Private
    • 1 – Shared
      EMAIL Optional If specified, Acoustic Campaign sends a notification email
    to the provided email address when the job is complete.
      EXPORT_FORMAT Specifies the file format for the exported data. Valid values are:

    • CSV – create a comma-separated values file.
    • TAB – create a tab-separated values file.
    • PIPE – create a pipe-separated values file.
      FILE_ENCODING Optional Defines the encoding of the exported file. Supported values are:

    • utf-8
    • iso-8859-1

    If not specified, Acoustic Campaign uses the Organization default encoding.

      ADD_TO_STORED_FILES Optional Use the ADD_TO_STORED_FILES parameter to write output to the Stored
    Files folder in Acoustic Campaign. If you omit this parameter, Acoustic Campaign moves exported files to the download directory of your FTP account.
      DATE_START Optional Specifies the beginning boundary of information to export (relative to the last modified date of the row). If time is included, it must be in 24-hour format.
      DATE_END Optional Specifies the ending boundary of information to export (relative to the last modified date of the row). If time is included, it must be in 24-hour format.
    Example
    <Envelope>
      <Body>
        <ExportTable>
          <TABLE_NAME>Web Analytics Purchases</TABLE_NAME>
          <TABLE_VISIBILITY>1</TABLE_VISIBILITY>
          <EXPORT_FORMAT>CSV</EXPORT_FORMAT>
          <ADD_TO_STORED_FILES/>
          <DATE_START>07/25/2011 12:12:11</DATE_START>
          <DATE_END>09/30/2011 14:14:11</DATE_END>
        </ExportTable>
      </Body>
    </Envelope>
    

    Example for exporting a Relational Table Query by Name
    <Envelope>
      <Body>
        <ExportTable>
          <TABLE_NAME>Shared/Web Analytics Purchases - last 30 days</TABLE_NAME>
          <EXPORT_FORMAT>PIPE</EXPORT_FORMAT>
          <ADD_TO_STORED_FILES/>
        </ExportTable>
      </Body>
    </Envelope>
    


    Example for exporting a Relational Table by ID
    <Envelope>
      <Body>
        <ExportTable>
          <TABLE_ID>59294</TABLE_ID>
          <EXPORT_FORMAT>CSV</EXPORT_FORMAT>
          <ADD_TO_STORED_FILES/>
          <DATE_START>01/01/2017 00:00:01</DATE_START>
        </ExportTable>
      </Body>
    </Envelope>
    

    Response <RESULT>
    Elements SUCCESS True if successful.
      JOB_ID Identifies the Acoustic Campaign background job that is created and scheduled for this export.
      FILE_PATH Returns the file name of the export file.
    Example
    <Envelope>
      <Body>
        <RESULT>
          <SUCCESS>TRUE</SUCCESS>
          <JOB_ID>499600</JOB_ID>
          <FILE_PATH>
            /download/Purchases ‚Äď Oct 11 2011 03-58- 17PM.CSV
          </FILE_PATH>
        </RESULT>
      </Body>
    </Envelope>
    

Join The Discussion

Your email address will not be published. Required fields are marked *