docs/src/main/sphinx/sql/create-catalog.md
CREATE CATALOG
catalog_name
USING connector_name
[ WITH ( property_name = expression [, ...] ) ]
Create a new catalog using the specified connector.
The optional WITH clause is used to set properties on the newly created
catalog. Property names can be double-quoted, which is required if they contain
special characters, like -. Refer to the connectors
documentation to learn about all available properties. All
property values must be varchars (single quoted), including numbers and boolean
values.
The query fails in the following circumstances:
:::{warning}
The complete CREATE CATALOG query is logged, and visible in the Web
UI. This includes any sensitive properties, like
passwords and other credentials. See .
:::
:::{note}
This command requires the catalog management type
to be set to dynamic.
:::
Create a new catalog called tpch using the :
CREATE CATALOG tpch USING tpch;
Create a new catalog called brain using the :
CREATE CATALOG brain USING memory
WITH ("memory.max-data-per-node" = '128MB');
Notice that the connector property contains dashes (-) and needs to quoted
using a double quote ("). The value 128MB is quoted using single quotes,
because it is a string literal.
Create a new catalog called example using the :
CREATE CATALOG example USING postgresql
WITH (
"connection-url" = 'jdbc:pg:localhost:5432',
"connection-user" = '${ENV:POSTGRES_USER}',
"connection-password" = '${ENV:POSTGRES_PASSWORD}',
"case-insensitive-name-matching" = 'true'
);
This example assumes that the POSTGRES_USER and POSTGRES_PASSWORD
environmental variables are set as secrets on all nodes of
the cluster.