Dynamically set connection string on jdbc_streaming filter

Is it possible to dynamically set the connection string on a jdbc_streaming filter?

Something like this for example:

    mutate {
        add_field => {
            "connection_string" => "jdbc:sqlserver://test.mydb.com:1433;databaseName=%{[database_name]};integratedSecurity=false;trustServerCertificate=true"
        }
    }

 jdbc_streaming {
        jdbc_connection_string => "%{[connection_string]}"
        jdbc_user => "test-user"
        jdbc_password => "test-pass"
        jdbc_driver_library => "C:\Program Files\Logstash\resources\drivers\mssql-jdbc-10.2.1.jre17.jar"
        jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
        statement => "SELECT * FROM my-table"
}

Based on my testing it does not seem possible in 7.17 as when I tried this the pipeline failed to be created:

 Pipeline error {:pipeline_id=>"test-pipeline", :exception=>#<URI::InvalidURIError: bad URI(is not URI?): %{[connection_string]}>,

No, it is not. The filter does not sprintf the connection string, it just passes it to the SQL library that the filter is built on top of.

That connection is set up once when the pipeline is first configured. If it were dynamic the filter might have to rebuild the connection for every event, which would add a lot of overhead.