Skip to main content
Version: devel View Markdown

Release highlights: 1.32

Breaking changes​

  • Naive scd2 timestamps are no longer read as UTC. A naive boundary_timestamp or active_record_timestamp is now sent as written (#4547), so the database session timezone reads it. On servers whose session timezone is not UTC, a naive active_record_timestamp may stop matching existing active records. Use a timezone-aware value.
  • refresh and drop remove every table of the dropped resources. refresh="drop_resources", pipeline.drop() and dlt pipeline drop now drop every table of the dropped resources that exists in the destination, not only tables that saw data (#4582). When several pipelines share one dataset, a refresh can drop same-named tables created by the others.
  • Arrow extract shares the resolved schema contract per table. Two resources with different schema_contract that write the same table now share the contract resolved for the first one, as object items always did (#4582).

Placeholders in merge conditions and partition pruning​

source_filter and destination_scope now accept value placeholders such as {load_id}, {curr_date}, date parts and your own extra_placeholders (#4547). dlt stores the values in the load package, not the schema, so a partition that changes every load no longer creates a new schema version. A list expands for IN, and a nested table can carry its own scope to prune its partitions.

import dlt
from datetime import date


@dlt.resource(
write_disposition={
"disposition": "merge",
"strategy": "delete-insert",
"destination_scope": "date_col = {day}",
"extra_placeholders": {"day": lambda resource, table_name: resource.explicit_args["day"]},
},
)
def my_partition(day: date):
# yield the records for the given day
yield [{"id": 1, "date_col": day}]


pipeline = dlt.pipeline("daily", destination="duckdb")
pipeline.run(my_partition(date(2026, 8, 1)))

replace can keep the resource state​

The dict form {"disposition": "replace"} now keeps the resource state by default, so an incremental cursor survives a full table replace and each run loads only new records (#4575). The "replace" shorthand still resets the state. Set exclude_resource_state to False on the dict form to reset it too.

import dlt


@dlt.resource(write_disposition={"disposition": "replace"})
def clients(updated_at=dlt.sources.incremental("updated_at")):
yield [{"id": 1, "updated_at": "2026-10-01T00:00:00Z"}]


# reset the state like the "replace" shorthand does
@dlt.resource(write_disposition={"disposition": "replace", "exclude_resource_state": False})
def clients_full(updated_at=dlt.sources.incremental("updated_at")):
yield [{"id": 1, "updated_at": "2026-10-01T00:00:00Z"}]

Inspect run metrics with trace metrics​

dlt pipeline <name> trace metrics prints the files, rows and sizes of the last run: by resource and table for extract, by table for normalize, and files, sizes, job time and failed jobs for load (#4582). Add -v to break it down by file, or --steps to choose steps. Normalize now balances files across workers by total size, not count.

dlt pipeline <pipeline_name> trace metrics
dlt pipeline <pipeline_name> trace metrics -v --steps load

dbt runner: microbatch intervals, load id and row counts​

The dbt runner's run_all(), run() and test() now accept a load_id passed to the package as a variable, so models can write it to _dlt_load_id (#4562). run_all() and run() also accept an interval forwarded to microbatch models as --event-time-start and --event-time-end. Each DBTNodeResult now carries rows_affected, failures and adapter_response.

import dlt
from dlt.common.storages import create_load_id

pipeline = dlt.pipeline("pipedrive", destination="duckdb", dataset_name="pipedrive_dbt")
dbt = dlt.dbt.package(pipeline, "pipedrive/dbt_pipedrive/pipedrive")

# a load id for `_dlt_load_id`, and the interval of the load for microbatch models
load_id = create_load_id()
models = dbt.run_all(interval=dlt.current.interval(), load_id=load_id)
for m in models:
print(m.model_name, m.status, m.rows_affected)

Shout-out to new contributors​

Big thanks to our newest contributors:

Full release notes

View the 1.32.0 release notes

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.