The parameter "macros=true" has a limitation when using the nested SQL queries. For example, consider the use case below determines:
Following is an example of a A SQL query where the output of the outer query is fed as input to the inner query.
...
In this case, if we enable macros=true, the inner query executes first and it won't be able to find a substitution value for "directory_id" and won't be able to execute . Thus, this query is not executed successfully.