Use Extension
Besides built-in extensions, you could also use the published external extensions which built by VulcanSQL team or other contributor.
Install extension npm package
VulcanSQL provides some external extension packages for you to use them optionally, please see the @vulcan-sql/ prefix npm packages.
Declare used extensions
After you installed extension npm package, please declare which package you used under the extensions key in the vulcan.yaml.
# Declare used external extension package name and give a extension name
extensions:
extension-name1: @vulcan-sql/ext-xxx
extension-name2: contributor-ext
The extensions could let you decide what external extensions you would like to use in the VulcanSQL.
You should declare a extension name and specify to extension package name you installed under the extensions key. For example the extension-name1 is the extension name and specify to @vulcan-sql/ext-xxx package.
Set-up extension options
After you define the extension name, use the set the options under extension name:
extension-name1:
... # The configuration options of the extension-name1
extension-name2:
... # The configuration options of extension-name2
# The configuration options of core feature and built-in extension
...
Here is an specific example, you could see the @vulcan-sql/extension-dbt it looks like the below:
extensions:
dbt: '@vulcan-sql/extension-dbt'
dbt:
modelFiles: path/to/folder
⚠️ Not all extensions have options
Some extension options may rely on internal or built-extensions configuration options and set options under internal or built-extensions configuration options. We should check each document of the extensions npm package.
For example, if you would like to use @vulcan-sql/extension-driver-duckdb it looks like the below:
extensions:
duckdb: '@vulcan-sql/extension-driver-duckdb'
But the duckdb is an data source driver, so if you would like to make your Data API /orders could query orders from duckdb driver, you should define the duckdb data source driver in data source profile like below:
# duckdb-profile.yaml
name: duck
type: duckdb
connection:
persistent-path: ./test-data/moma.db
log-queries: true
log-parameters: true
allow: '*'