# Importing Data using Java Table Functions

DevFeed: [Importing Data using Java Table Functions](<https://devfeed.tech/articles/importing-data-using-java-table-functions-64792.md>)

Original publisher: [Read original article](<https://duckdb.org/2026/10/05/import-data-with-java.html>)

Author: Guest Author, Geertjan Wielenga, Alex Kasko

Published: 2026-10-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [DuckDB](<https://devfeed.tech/sources/duckdb.md>)

Topics: [Rockset](<https://devfeed.tech/topics/rockset.md>), [Java](<https://devfeed.tech/topics/java.md>), [batch insert](<https://devfeed.tech/topics/batch-insert.md>)

Tags: [batch-insert](<https://devfeed.tech/tags/batch-insert.md>), [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [duckdb](<https://devfeed.tech/tags/duckdb.md>), [java](<https://devfeed.tech/tags/java.md>), [using-duckdb](<https://devfeed.tech/tags/using-duckdb.md>)

## AI overview

The article describes importing vulnerability data from MongoDB into DuckDB to speed analytical queries and exports. It compares a MongoDB community extension with Java JDBC batch inserts, DuckDB's Appender, and a custom Java table function. The table function had the lowest overhead among the Java approaches; the production pipeline used a non-parallel version with sorting in the same table creation query, achieving import times on par with the extension.

## Source excerpt

When the analytics screen running on our main operational database got too slow, we moved a year of data into DuckDB on the same server. Getting the data in was the hard part. This is the story of every method we tried, and why a table function written in pure Java is the one we shipped.