I’m using dbt core with dbt-hive adapter.
I used to set variables in hive as follows.
set hive.server2.enable.doAs=false;
set hive.server2.tez.default.queues=default;
set hive.server2.tez.initialize.default.sessions=false;
set hive.server2.tez.sessions.per.default.queue=1;
I would like to apply different configurations using macros.
But I got ParseException. (FAILED: ParseException line 19:0 cannot recognize input near ‘set’ ‘hive.server2.enable.doAs’ ‘=’ in create table statement)
{% macro tpch_settings(engine='mr') %}
{% if engine == 'mr' %}
set hive.server2.enable.doAs=false;
set hive.server2.tez.default.queues=default;
set hive.server2.tez.initialize.default.sessions=false;
set hive.server2.tez.sessions.per.default.queue=1;
....
{% endif %}
{% endmacro %}