Skip to Content
avatar image
Former Member

unable to use variable in bods - sql transform

hi all,

i am trying to incorporate 2 options to a bods job, need your suggestions on resolving the error :

1) variables inside sql transform in a bods job.

eg:

select * from db.schema.table where ...........

to be replaced by

select * from {$db}.{$schema}.{$table} where........

but seems variable is not supported here, when i click on update schema button, i get the error message that error in the sql script needs to be rectified.

i also tried variable inside square braces like [$db], but that too gave same error.

2) can i use variable to select the desired connection for a datastore?

i am adjusting the job for production environment wherein every option should be able to adjust as requrired

can anyone suggest on this?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Aug 01, 2017 at 06:56 PM

    Hi Swetha,

    Use variable like [$var] when you are using in SQL transform to parametrize table.

    like :- select * from [$G_SCHEMA].[$G_TABLE]

    But first you have to give table name and update schema in SQL transform and then you can parameterize table name. Otherwise it wont work.

    Thanks,

    Ravi kiran

    Add comment
    10|10000 characters needed characters exceeded