Skip to content

Add support for CREATE SECRET syntax (DuckDB) #1184

@kspeeckaert

Description

@kspeeckaert

What are you building with SQLPage ?

SAP Message Analysis. Currently adding an interface that allows directly ingesting data from a blob storage (using the azure extension) and converting the XML files into DuckDB as a table (using the webbed extension).

What is your problem ?

I'm trying to store a connection string as a secret in DuckDB, which requires using the CREATE SECRET statement, which is not supported by the SQL parser in SQLPage.

Currently this results in the following error:

[2026-01-11T13:16:38.046Z ERROR sqlpage::webserver::database::execute_queries] Parsing failed: SQLPage couldn't understand the SQL file. Please check for syntax errors on line 13:
    CREATE OR REPLACE PERSISTENT SECRET $secret_name
                     ⬆️
    (
    Caused by:
        0: sql parser error: Expected: [EXTERNAL] TABLE or [MATERIALIZED] VIEW or FUNCTION after CREATE OR REPLACE, found: PERSISTENT at Line: 13, Column: 19
        1: import/upsert_container.sql contains a syntax error preventing SQLPage from parsing and preparing its SQL statements.

What are you currently doing ?

No workaround other than manually (through a SQL interface) running the SQL statement myself, as the extension I'm using (azure) does not support any other way to authenticate to the backend than using secrets (env. variables are deprecated).

Describe the solution you'd like

Support for the CREATE SECRET and DROP SECRET (documentation) statements.

Describe alternatives you've considered

None, as I don't see any alternatives at the moment (at least not through SQLPage).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions