Data360 Analyze

 View Only
  • 1.  DbExecute Node Error

    Employee
    Posted 02-25-2021 14:44

    Input Data:

    Ban

    123456789

    General Tab

    sqlSelect(1,
    "{{^query^}}",
    BAN.str().trim())

    Bind name in teradata sql statements must not begin with a digit. Col: 134
    select
    *
    from
    EDWCCDVIEWS.CRDT_APP
    Where b.acct_nbr = :1

     

     



  • 2.  RE: DbExecute Node Error

    Employee
    Posted 02-27-2021 05:59

    I think you need to perform your processing to construct the query to be sent to DB prior to using the sqlSelect() function in the script. 

    For example, if a static SQL expression is as follows:

    The type of table can be parameterized by supplying the key in an input field:

     

    The DB Execute node script is configured as follows to incorporate the key binding into a string-valued expression that can then be used in the sqlSelect() function. 



  • 3.  RE: DbExecute Node Error

    Employee
    Posted 03-01-2021 08:50

    Hello Adrian:

    I am now getting the following error:  Syntax error: expected something between the beginning of the request and the integer '980025754'.  I have attached the node I am trying to run. The data in the static node is an representation of the output from another query that leads into the DbExecute node Thank you for your assistance.

     

     

     



  • 4.  RE: DbExecute Node Error

    Employee
    Posted 03-01-2021 12:50

    Hi Michael,

    can you try attaching the data flow again as there was nothing attached to your post. It is a two-step approach - you have to choose the file first and then click the Attach File button before clicking on the Submit button.



  • 5.  RE: DbExecute Node Error

    Employee
    Posted 03-01-2021 12:56

    Hi Adrian:

    File is now attached.  Thank you

     

     

    Attached files

    Lavastorm Community.brg

     



  • 6.  RE: DbExecute Node Error

    Employee
    Posted 03-02-2021 01:17

    The reason you are getting the above error is that there is effectively no SQL query statement being sent to the DB. The current code is only inserting the value of the BAN as the query.

    Looking at the original error message in your first post, the query needs to be something like the following:

     

    sqlQuery = strcat("SELECT * FROM EDWCCDVIEWS.CRDT_APP WHERE b.acct_nbr = ", BAN.str().trim())

    sqlSelect(1,sqlQuery)

     



  • 7.  RE: DbExecute Node Error

    Employee
    Posted 03-04-2021 11:59

    Hi Adrian:

    I am still running into issue.  To level set, I have attached a DB execute node that runs successfully when connected to an Oracle(OCI) DBInterface.  When using the same node(different server)  connected to an Teradata (CLI) DBInterface I receive the following error.  How should I configure the bind and sql statement when connecting to an teradata server.

    Bind name in teradata sql statements must not begin with a digit. Col: 126 select acct_nbr, curr_crdt_sts_cd, curr_crdt_sts_rsn_cd, crdt_sts_rsn_desc from ECDW_EDWCCDVIEWS.CRDT_APP where acct_nbr = :1

     

     

    Attached files

    Lavastorm Community_2.brg

     



  • 8.  RE: DbExecute Node Error

    Employee
    Posted 03-06-2021 03:16

    I'm not familiar with the details of the Teradata syntax but the issue in the query may be the =:1 

    This forum post indicates that perhaps using a alphanumeric name in the binding instead of a numeric value of 1 may help.

    https://support.infogix.com/hc/en-us/community/posts/360028736814-DB-Execute-Binding-with-another-teradata-query