POS Import Task

The Import Task receives data from the POS system in .csv format and imports it to the staging database tables. The data can then be picked up by the Interface Task, which writes the data to the SO_RESULTS_DETAIL table. The Import Task should be scheduled to run before the Interface Task.

For the POS interface, the Import Task is configured with SO RESULTS DETAIL TABLE IMPORT as the import type in its task parameters. This import type corresponds with an XML map that determines how columns in the .csv file that is imported from the POS system are translated into columns in the SO_RESULTS_DETAIL table.

This is the default XML map for the SO RESULTS DETAIL TABLE IMPORT import type:

<table-config>
  <table name="SO_RESULTS_DETAIL" transaction-type="INSERT" 
    primarykey="RESDET_ID">
    <deletes>
      <delete type="PRE">
        <delete-field db-field="RESDET_DATE" 
          default-value="!SYSTEM_DATE" day="SAT" 
          condition="GREATER" offset="-7"/>
        <delete-field db-field="RESDET_DATE" 
          default-value="!SYSTEM_DATE" day="SAT" 
          condition="LESS_EQUALS"/>
        <delete-field db-field="INVTYP_ID" default-value="1"
          condition="EQUALS"/>
      </delete>
    </deletes>
    <fields>
      <field index="1" db-field="SKDGRP_ID">
        <reference table-name="SO_SCHEDULE_GROUP" 
          suppliedvalue="SKDGRP_CLIENTKEY" 
          resolve-to-field="SKDGRP_ID"/>
      </field>
      <field index="2" db-field="RESDET_DATE" 
        date-format="MM/dd/yyyy" default-value="!SYSTEM_DATE"/>
      <field index="3" db-field="RESDET_TIME" date-format="HH:mm"/>
      <field index="4" db-field="RESDET_VOLUME"/>
      <field index="5" db-field="INVTYP_ID" default-value="1"/>
    </fields>
  </table>
</table-config>

See POS Interface Task for details on the columns in the SO_RESULTS_DETAIL table.