Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The parameter "The macros=true" has parameter has a limitation when used in nested SQL queries.

For example, consider the following use case below determines:A SQL query where where the output of the outer an outer query is fed as an input to the inner SQL query.:

Code Block
select ap.directory_id,
CONCAT('{sql-query:dataSource=SQLSERVER|table=false}
use jiradbnew;
select user_name, directory_id, display_name, email_address, dir.directory_position
from cwd_user usr
join cwd_directory dir on dir."id" = usr."directory_id" and dir."id"= ', ap.DIRECTORY_ID, ' {sql-query}') as "JiraVal"
from cwd_group ap

In this case, if we enable macros=trueif macros is set to True, the inner query executes first and it won't be able to find a substitution value for ", thus, substitution values for directory_id" is not available. Therefore, this query is not executed successfully.