0

Unable to use DuckDB in an incremental lightweight xform. The docs read to access the duckdb object from the context, but it fails to do so.

from transforms.api import transform, incremental, Input, Output

@incremental(v2_semantics=True)
@transform.using(
    input=Input(""),
    output=Output(""),
)
def compute(ctx, input, output):
    ddb = ctx.duckdb(read_modes={input: ["current", "previous"]})

Error:

ddb = ctx.duckdb(read_modes={input: ["current", "previous"]})
          ^^^^^^^^^^
AttributeError: 'LightweightContext' object has no attribute 'duckdb'

All dependencies are up to data in Code Repository.

Wonder if anyone is using DuckDB in this same environment? Any example on how to access the duckdb object?

1 Answer 1

0

You should upgrade your code repository, via the upgrade PR, so that you get a higher version of transforms library (>3.123 should work !)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.