Customer Portal

Problem while inserting record using DBOutputTable

Comments 3

  • Avatar
    avackova
    0
    Comment actions Permalink
    Hello,
    you can use only one DBOutputTable with two queries, if you want to execute both queries for each record. Or you have to set higher phase number to the DBOutputTabla that inserts data to the child table.
  • Avatar
    pgargdd
    0
    Comment actions Permalink
    Thanks Agata,

    I resolved the above problem by inserting a speed limiter between components. I am requiring some additional inputs on DBOutputTable component. Can I use sql functions as a sql statement in DBOutputTable. Actually, i need to insert and update the existing records of the table, but we can't change the structure of the graph after its execution started. This decision I need to take dynamically as the data is transformed by the clover. I am using Reformat component where I am taking this decision, but I need to have two separate DBOutputTable node for insert and update query and on the basis of existence of record by doing a query lookup, I am selecting the particular node to execute its statement. Can we have both the queries in one single DBOutputTable component, and on the basis of existence of record we can execute only one sql query dynamically. I am doubtful if this behaviour is present in DBOutputTable so that we can execute a single sql statement from a bunch of queries given to DBOutputTable.

    So I thought if I can have this decision making as a part of my sql functions, so that things would be much more easier.

    Thanks
    Pushpendra
  • Avatar
    avackova
    0
    Comment actions Permalink
    Hello, I'm not sure if I've understood you well, but the simplest way to decide to which component to send the record is using return value in transform() function of Reformat, something like that:
    function transform() {
    if (my_condition){
    transform0();
    return 0;
    }else{
    transform1();
    return 1;
    }


    where transform0() prepares records for one DBOutputTable and transform1() prepares them for the second one.

Please sign in to leave a comment.