Customer Portal

OracleDataWriter component support for TRAILING NULLCOLS

Comments 2

  • Avatar
    slechtaj
    0
    Comment actions Permalink
    Hi Pensky,

    you are right, this issue is caused by NULL values in the last column. For this issues has been created a ticket in our system (you can keep yourself updated here: https://bug.javlin.eu/browse/CL-2512). Basicaly there are two workarounds that might be considered instead:
    1. Set a default value for NULL values in the last column. Create a SQL trigger that checks whether the last inserted row contains this value, and if so set the value as NULL.
    2. Load your data into an external temporary file. Set the filepath into the "Loader input file" (the file where you recently saved the data). Write a SQL script into the "Control script" field. Most likely, your script would look as follows:

    load data            
    infile *
    append
    into table DNB_DU
    TRAILING NULLCOLS
    (
    COL1 TERMINATED BY ';',
    COL2 TERMINATED BY ';',
    COL3 TERMINATED BY WHITESPACE
    )
  • Avatar
    pensky
    0
    Comment actions Permalink
    Jan,

    Thanks for your reply and suggested workarounds. However, #1 would not work for direct path (bulk) loads in Oracle since triggers are disabled prior to load.

    Regards,

    Dennis.

Please sign in to leave a comment.