Skip to content
This repository was 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

@gbonazzoli

Description

@gbonazzoli
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions