Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-3235

add div and trim function for map feature, improve bad file print function.

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • db-utility-odb
    • None

    Description

      In some customer scenarios, they want below feature:

      1. Div function in the map file, so the numeric data in the data file can be divided with some value before loading to the database. for example, we have a COL NUMERIC(6,2) column and the data '123456' in the data file, we can use the mapping rule 'COL:<field>\DIV:100' to translate the data to '1234.56' before loading to the database.
      2. Trim function in the map file,  so if some field containing leading and trailing space in the data file can be trimmed before loading to the database. for example, suppose we have a COL CHAR(20) and the data '   abc    ' in the data file, we can use the mapping rule 'COL:<field>:TRIM' to translate the data to 'abc' before loading to the database.
      3. Now, the odb tool will print a record for each ODBC error message in the bad file. But some bad row may report more than one error message, so the bad file may contain duplicated records. So add a fix to ensure that one bad record only printed once in bad file. 

       

      Attachments

        Issue Links

          Activity

            People

              sujinpei 苏锦佩
              sujinpei 苏锦佩
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: