cancel
Showing results for 
Search instead for 
Did you mean: 

unable to use variable in bods - sql transform

former_member186160
Contributor
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

former_member208402
Active Contributor
0 Kudos

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

Answers (0)