Giter Site home page Giter Site logo

Comments (1)

nicor88 avatar nicor88 commented on May 24, 2024 1

Adding a bit more context.
The issue occur also for simple models like:

{{ config(
    materialized='incremental',
    incremental_strategy='merge',
    unique_key='user_id',
    table_type='iceberg',
   force_batch='true'
) }}

select 1 as user_id, 'a' as user_name

The issue seems to be in get_partition_batches and create_table_as_with_partitions

Here are some possible solutions:

  • if the underlying dataset is empty - create_table_as_with_partitions can create an empty table from SQL - no hurt/no pain - it's possible to check if __tmp_not_partitioned is empty and if it's the case, we just create an empty relation as tmp table.
  • if the user try to use force_batch with not partitioned tables -> we have 2 options:
    • all works normally and force_batch it's just ignored, e.g. pass partitioning(bool) to safe_create_table_as
    • we raise an error and ask the user to remove force_batch from not partitioned tables
  • if the user works with partitioned tables by the data is not more than 100 partitions partition batches everything should still work. - must be tested

@svdimchenko FYI.

from dbt-athena.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.