The problem I’m having
I would like to use incremental on hive, but it does not work based on my configuration.
The context of why I’m trying to do this
I want to improve my sql, use ‘inset into’.
What I’ve already tried
I has use 'incremental_strategy=‘inert_overwrite’and incremental_strategy=‘append’’,but
the result is:
create table xxx.test0302_1
as
select * from xxx.test0302
error:
Unable to establish connection to Hive server: Error while compiling statement: FAILED: SemanticException org.apache.hadoop.hive.ql.parse.SemanticException: Table already exists: xxx.test0302_1
Some example code or error messages
this is my jinja:
{{ config(materialized=‘incremental’, incremental_strategy=‘insert_overwrite’,unique_key=‘’) }}
select * from {{ ref(‘test0302’) }}
{% if is_incremental() %}
where event_time >= (select max(event_time) from misphq.test0302_1)
{% endif %}
but:
Put code inside backticks
to preserve indentation
which is especially important
for Python and YAML!