Data360 Analyze

Welcome to the Data360 Analyze community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Here are some useful links where you can find more information:

Product Announcements  Product Documentation  Ideas Portal

Discussions

Members

Resources

Events

 View Only
  • 1.  Use Oracle Sequence and add to incoming data

    Posted 03-24-2023 15:09
    Edited by Dhinmar James Cayog 03-24-2023 15:11

    Hi,

    I want to insert incoming records from transformation node to "TABLE_A" using DB Store node. But before I insert it to "TABLE_A", I want to add the database sequence used by "TABLE_A" as ID.

    That would be something like this:

    Incoming
    column A column B
    A1 B1
    A2 B2
    A3 B3

    select sequence_name.nextval as ID from dual;

    with sequence
    ID column A column B
    6 A1 B1
    7 A2 B2
    8 A3 B3

    Is this feasible or are there other ways of doing it?



    ------------------------------
    Dhinmar James Cayog
    Knowledge Community Shared Account
    ------------------------------



  • 2.  RE: Use Oracle Sequence and add to incoming data
    Best Answer

    Posted 03-26-2023 16:49

    If your organization's coding standards allow for it, then the easiest thing to do is to set the column default value to the sequence.NEXTVAL you want to use, and ignore the entire column in the insert statement. This works with JDBC store, I think it should work with DB Store.



    ------------------------------
    Peter Sykes
    Vontobel Holding AG
    ZUERICH
    ------------------------------



  • 3.  RE: Use Oracle Sequence and add to incoming data

    Posted 03-31-2023 09:45

    Thank you Peter.



    ------------------------------
    Dhinmar James Cayog
    Knowledge Community Shared Account
    ------------------------------