Customer Portal

Graph property in SQL query

Comments 3

  • Avatar
    avackova
    0
    Comment actions Permalink
    Hello Martin,
    parameters are instantiated, when graph is read from xml, so such direct parameter access doesn't work from java code. To resolve parameters you have to use graph.getGraphProperties().get...Property("param") instead of ${param}
  • Avatar
    martind
    0
    Comment actions Permalink
    hi avackova,

    Thanks for your help.

    Does it mean that DBInputTable is not able to resolve parameters in SQL queries and that I should create a query with no parameters before passing it to the DBInputTable?

    This is fine in case of Strings but if you want to use Dates and you don't know their format in the database (or you want your query to be portable), this is problematic.
  • Avatar
    avackova
    0
    Comment actions Permalink
    Hello Martin,
    you can't access parameters with this simple way (${param}), when you build your graph in java. And it doesn't matter if you try to use it in DBOutputTable or anywhere else. Such defined parameters can be used only in xml graph definition. You can write your graph in xml (with parameters) and just run it from java (see cloverETL.examples.rel-2-9-2.zip/cloverETL/examples/javaExamples/testXMLGraph.java)

Please sign in to leave a comment.