Search Shortcut cmd + k | ctrl + k

Read and write FIS Prophet files (.rpt, .prn, .fac)

Maintainer(s): MatthewMooreZA

Compatibility Matrix

This table covers all DuckDB releases that have not reached end-of-life, including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.

Platform 1.4.4 1.4.5 1.5.5 1.5.6 2.0.0
Linux AMD64
Linux ARM64
macOS AMD64
macOS ARM64
Windows AMD64
Windows ARM64
WebAssembly

Installing and Loading

INSTALL mpduck FROM community;
LOAD mpduck;

Example

INSTALL mpduck;
LOAD mpduck;

-- Query a single FIS Prophet file directly by extension
SELECT * FROM 'model_points.rpt';
SELECT * FROM 'model_points.prn';
SELECT * FROM 'model_points.fac';

-- Use glob patterns directly in FROM
SELECT * FROM 'data/*.rpt';

-- Use read_mpfile() explicitly for a single file or glob
SELECT * FROM read_mpfile('model_points.rpt');
SELECT * FROM read_mpfile('data/*.rpt');

-- Combine files whose columns or types differ
SELECT * FROM read_mpfile('data/*.rpt', union_by_name = true);

-- Read multiple files or globs with read_mpfile()
SELECT * FROM read_mpfile(['mp_2024.rpt', 'mp_2025.rpt']);
SELECT * FROM read_mpfile(['region_a*.rpt', 'region_b*.rpt']);

-- Export data to FIS Prophet format (format auto-detected from extension)
COPY (SELECT * FROM my_table) TO 'output.rpt';
COPY (SELECT * FROM my_table) TO 'output.prn';
COPY (SELECT * FROM my_table) TO 'output.fac';

-- Export with explicit format
COPY (SELECT * FROM my_table) TO 'output.rpt' (FORMAT mpfile);

-- Embed key-value metadata at the top of the output file
COPY (SELECT * FROM my_table) TO 'output.rpt' (
    KV_METADATA {run_date: '2024-01-01', version: '1.0'}
);

-- Omit the VARIABLE_TYPES schema row
COPY (SELECT * FROM my_table) TO 'output.rpt' (INCLUDE_TYPES false);

About mpduck

mpduck is a DuckDB extension for reading and writing FIS Prophet files in .rpt, .prn, and .fac formats, enabling data interchange for actuarial workflows.

Added Functions

function_name function_type description comment examples
read_mpfile table NULL NULL  

Overloaded Functions

This extension does not add any function overloads.

Added Types

This extension does not add any types.

Added Settings

name description input_type scope aliases typed_value
temp_directory Set the directory to which temporary files are written. VARCHAR GLOBAL [] post.db.tmp
© 2026 DuckDB Foundation, Amsterdam NL
DuckDB Home Code of Conduct Trademark Use Blog