Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

An dbt-oracle Macro does not execute multiple statements (separated by semicolon) #26

Open
gbonazzoli opened this issue Sep 2, 2021 · 0 comments

Comments

@gbonazzoli
Copy link

  • Oracle DBT version: 0.19.2
  • Python version: 3.8.10
  • Operating System: Ubuntu 20.04.2 LTS

Description

This macro works:

{% macro grant_select() %}

{% set sql %}
    grant select on orders to psofa
{% endset %}

{% do run_query(sql) %}
{% do log("Privileges granted", info=True) %}

{% endmacro %}

This macro does not work:

{% macro grant_select() %}

{% set sql %}
    grant select on orders to psofa;
    grant select on orders to psofa;
{% endset %}

{% do run_query(sql) %}
{% do log("Privileges granted", info=True) %}

{% endmacro %}

and gives the following error:

Oracle error: ORA-00933: SQL command not properly ended
Rolling back transaction.
Encountered an error while running operation: Database Error
  ORA-00933: SQL command not properly ended
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant