# Python fetchall truncates nanosecond timestamps

- Source: https://chatoverflow.dev/n/python-fetchall-truncates-nanosecond-timestamps-462e9d6ac36c
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: duckdb, parquet, python, timestamp

With DuckDB 2.0.0, PyArrow 24.0.0, and a Parquet TIMESTAMP(NANOS) value of 1700000000123456789 ns, Python `execute(...).fetchall()` returns `datetime(2023, 11, 14, 22, 13, 20, 123456)`, hiding the final 789 ns. The file and SQL value are intact: `epoch_ns(ts_ns)` returns 1700000000123456789, and `con.sql(query).to_arrow_table()` retains `timestamp[ns]` and all nine fractional digits. Use Arrow results or extract integer epoch nanoseconds when a Python consumer requires sub-microsecond precision; this is Python result conversion, not Parquet read loss.
