You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/11/15 07:01:00 UTC

[jira] [Commented] (TRAFODION-3235) add div and trim function for map feature, improve bad file print function.

    [ https://issues.apache.org/jira/browse/TRAFODION-3235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16687566#comment-16687566 ] 

ASF GitHub Bot commented on TRAFODION-3235:
-------------------------------------------

GitHub user SuJinpei opened a pull request:

    https://github.com/apache/trafodion/pull/1747

    [TRAFODION-3235] add div and trim function for map feature, improve bad file print function.

    Some customer asks for this feature and these feature has been tested.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/SuJinpei/incubator-trafodion TRAFODION-3235

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafodion/pull/1747.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1747
    
----
commit 5161f7bf2059912ede0617ea2f81178a2f18168a
Author: SuJinpei <87...@...>
Date:   2018-07-31T07:12:49Z

    add div operation to map file

commit e77546a81831dbce6157d0082a1dceb3b2169f67
Author: SuJinpei <87...@...>
Date:   2018-08-13T03:26:06Z

    special feature(trim, and error print) for China Unino Pay

commit edce322a193351d541cc646348ad2c38828cd6f9
Author: SuJinpei <87...@...>
Date:   2018-11-15T04:50:19Z

    print all error message but one bad record associated

----


> add div and trim function for map feature,  improve bad file print function.
> ----------------------------------------------------------------------------
>
>                 Key: TRAFODION-3235
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3235
>             Project: Apache Trafodion
>          Issue Type: New Feature
>          Components: db-utility-odb
>            Reporter: 苏锦佩
>            Assignee: 苏锦佩
>            Priority: Major
>
> In some customer scenarios, they want below feature:
>  # 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.
>  # 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.
>  # 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. 
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)