Skip to main content
Open

Inline Querier Transformer choice of using SQLite and DuckDB

Related products:Transformers
  • September 29, 2024
  • 3 replies
  • 57 views
siennaatsafe
jamal
cwinfield
  • siennaatsafe
    siennaatsafe
  • jamal
    jamal
  • cwinfield
    cwinfield

oliver.morris
Contributor

I propose adding DuckDB as the underlying database engine in the Inline Querier transformer for the following reasons:

1. Performance Benefits:

  • Columnar Storage: DuckDB’s columnar storage model allows for much faster query execution, particularly on large datasets, as it optimises for analytical queries. This would result in quicker workflows, especially for FME users dealing with substantial data volumes.
  • Vectorised Execution: DuckDB uses a vectorised execution model that can process chunks of data more efficiently than the row-wise approach used in SQLite. This would significantly enhance performance in complex querying scenarios.

2. Better Handling of Analytical Workloads:

  • DuckDB is designed with analytical workloads in mind, making it more suitable for data processing tasks typically performed in FME. This switch would provide users with more efficient query processing when handling large geospatial datasets.

3. Increased Flexibility with Data Types:

  • DuckDB offers more advanced data types and functions, which would extend the flexibility of the Inline Querier transformer. This would enable more sophisticated transformations and analytics directly within FME, reducing the need for external tools.

4. Seamless Integration:

  • SQL Syntax Compatibility: DuckDB supports standard SQL queries similar to SQLite, ensuring a relatively smooth transition with minimal changes to existing workflows. Users will benefit from enhanced performance without needing to extensively rework their SQL queries.

5. Broader Ecosystem Support:

  • DuckDB has strong integrations with modern data ecosystems (e.g., Python, R, Parquet), which can open doors for future FME integrations and expand the functionality of the Inline Querier.

6. Open-Source, Actively Developed:

  • Like SQLite, DuckDB is open-source but has a much more active development roadmap focused on big data analytics. This would future-proof the Inline Querier transformer by providing new features and optimisations more regularly.

Finally the ability to create macros in duckdb sql and refer to these inline could be very useful indeed, also the native spatial support would really help!

3 replies

bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • October 9, 2024

Personally, it would be better to see both supported.  DuckDB is not always faster in all situations and of course the SQL syntax is different, and it is very likely that query optimisation techniques would differ between the platforms, and DuckDB doesn’t have anything like the user base yet for experience/support, but it would make a handy addition.

If it was built into InlineQuerier, then instead would suggest a new DropDown Parameter like “Database Engine” to flick between whichever engine the user wants to use.

I would also love to see Spatialite added as well at some point to make use of the huge library of SQL spatial functions built for this. 😉   Similarly would note to support spatial extensions for SQLite->Spatialite extension and DuckDB->DuckDB Spatial Extension would need behind the scenes for InlineQuerier to perform the extension load.

As another add-on, if this got implemented then a complementary improvement would be also to support DuckDB within SQLExecutor and SQLCreator, which currently support SQLite and Spatialite (albeit not the latest Spatialite extension) but not DuckDB.


LizAtSafe
Safer
Forum|alt.badge.img+15
  • Safer
  • December 16, 2024
NewOpen

LizAtSafe
Safer
Forum|alt.badge.img+15
  • Safer
  • April 5, 2025
This idea relates to https://community.safe.com/ideas/inlinequerier-support-spatialite-db-format-34964

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings