diff --git a/web-common/src/features/templates/schema-utils.ts b/web-common/src/features/templates/schema-utils.ts index 5a3fef50c39..da5efd9f7ce 100644 --- a/web-common/src/features/templates/schema-utils.ts +++ b/web-common/src/features/templates/schema-utils.ts @@ -531,17 +531,6 @@ export function getConditionalValues( return result; } -/** - * Returns the backend driver name for a schema. - * If x-driver is specified, returns that; otherwise returns the schemaName. - */ -export function getBackendConnectorName( - schema: MultiStepFormSchema | null, - schemaName: string, -): string { - return schema?.["x-driver"] ?? schemaName; -} - /** * Returns custom button labels from the schema based on current form values. * Looks up x-button-labels[fieldKey][fieldValue] for each field in values. diff --git a/web-common/src/features/templates/schemas/athena.ts b/web-common/src/features/templates/schemas/athena.ts deleted file mode 100644 index d22c311e7a2..00000000000 --- a/web-common/src/features/templates/schemas/athena.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const athenaSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "Athena", - "x-category": "warehouse", - properties: { - aws_access_key_id: { - type: "string", - title: "AWS access key ID", - description: "AWS access key ID used to authenticate to Athena", - "x-placeholder": "your_access_key_id", - "x-secret": true, - "x-env-var-name": "AWS_ACCESS_KEY_ID", - "x-step": "connector", - }, - aws_secret_access_key: { - type: "string", - title: "AWS secret access key", - description: "AWS secret access key paired with the access key ID", - "x-placeholder": "your_secret_access_key", - "x-secret": true, - "x-env-var-name": "AWS_SECRET_ACCESS_KEY", - "x-step": "connector", - }, - output_location: { - type: "string", - title: "S3 output location", - description: - "S3 URI where Athena should write query results (e.g., s3://bucket/path/)", - pattern: "^s3://.+", - errorMessage: { - pattern: "Must be an S3 URI (e.g., s3://bucket/path/)", - }, - "x-placeholder": "s3://bucket-name/path/", - "x-step": "connector", - }, - region: { - type: "string", - title: "AWS Region", - description: "AWS region for Athena queries", - "x-placeholder": "us-east-1", - "x-step": "connector", - }, - workgroup: { - type: "string", - title: "Workgroup", - description: "Athena workgroup name", - "x-placeholder": "primary", - "x-step": "connector", - }, - role_arn: { - type: "string", - title: "IAM Role ARN", - description: "IAM role ARN to assume for Athena queries", - "x-placeholder": "arn:aws:iam::123456789012:role/MyRole", - "x-step": "connector", - "x-advanced": true, - }, - role_session_name: { - type: "string", - title: "Role Session Name", - description: "Session name for STS AssumeRole", - "x-placeholder": "rill-session", - "x-step": "connector", - "x-advanced": true, - }, - external_id: { - type: "string", - title: "External ID", - description: "External ID for cross-account role assumption", - "x-placeholder": "your-external-id", - "x-step": "connector", - "x-advanced": true, - }, - sql: { - type: "string", - title: "SQL", - description: "SQL query to run against your warehouse", - "x-placeholder": "Input SQL", - "x-step": "explorer", - }, - name: { - type: "string", - title: "Model name", - description: "Name for the source model", - pattern: "^[a-zA-Z0-9_]+$", - "x-placeholder": "my_model", - "x-step": "explorer", - }, - }, - required: [ - "aws_access_key_id", - "aws_secret_access_key", - "output_location", - "sql", - "name", - ], -}; diff --git a/web-common/src/features/templates/schemas/azure.ts b/web-common/src/features/templates/schemas/azure.ts deleted file mode 100644 index f382c659c5f..00000000000 --- a/web-common/src/features/templates/schemas/azure.ts +++ /dev/null @@ -1,131 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const azureSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "Azure Blob Storage", - "x-category": "objectStore", - properties: { - auth_method: { - type: "string", - title: "Authentication method", - enum: ["connection_string", "account_key", "sas_token", "public"], - default: "connection_string", - description: "Choose how to authenticate to Azure Blob Storage", - "x-display": "radio", - "x-enum-labels": [ - "Connection String", - "Storage Account Key", - "SAS Token", - "Public", - ], - "x-enum-descriptions": [ - "Provide a full Azure Storage connection string.", - "Provide the storage account name and access key.", - "Provide the storage account name and SAS token.", - "Access publicly readable blobs without credentials.", - ], - "x-ui-only": true, - "x-grouped-fields": { - connection_string: ["azure_storage_connection_string"], - account_key: ["azure_storage_account", "azure_storage_key"], - sas_token: ["azure_storage_account", "azure_storage_sas_token"], - public: [], - }, - "x-step": "connector", - }, - azure_storage_connection_string: { - type: "string", - title: "Connection string", - description: "Paste an Azure Storage connection string", - "x-placeholder": "Enter Azure storage connection string", - "x-secret": true, - "x-env-var-name": "AZURE_STORAGE_CONNECTION_STRING", - "x-step": "connector", - "x-visible-if": { auth_method: "connection_string" }, - }, - azure_storage_account: { - type: "string", - title: "Storage account", - description: "The name of the Azure storage account", - "x-placeholder": "Enter Azure storage account", - "x-step": "connector", - "x-visible-if": { auth_method: ["account_key", "sas_token"] }, - }, - azure_storage_key: { - type: "string", - title: "Access key", - description: "Primary or secondary access key for the storage account", - "x-placeholder": "Enter Azure storage access key", - "x-secret": true, - "x-env-var-name": "AZURE_STORAGE_KEY", - "x-step": "connector", - "x-visible-if": { auth_method: "account_key" }, - }, - azure_storage_sas_token: { - type: "string", - title: "SAS token", - description: - "Shared Access Signature token for the storage account (starting with ?sv=)", - "x-placeholder": "Enter Azure SAS token", - "x-secret": true, - "x-env-var-name": "AZURE_STORAGE_SAS_TOKEN", - "x-step": "connector", - "x-visible-if": { auth_method: "sas_token" }, - }, - path_prefixes: { - type: "string", - title: "Path prefixes", - description: - "Comma-separated list of container path prefixes this connector is allowed to access", - "x-placeholder": "azure://my-container/path/", - "x-step": "connector", - "x-advanced": true, - }, - allow_host_access: { - type: "boolean", - title: "Allow host access", - description: - "Use Azure credentials from the host environment in addition to configured credentials", - "x-step": "connector", - "x-advanced": true, - }, - path: { - type: "string", - title: "Blob URI", - description: - "URI to the Azure blob container or directory (e.g., https://.blob.core.windows.net/container)", - pattern: "^azure://.+", - errorMessage: { - pattern: "Must be an Azure URI (e.g. azure://container/path)", - }, - "x-placeholder": "azure://container/path", - "x-step": "source", - }, - name: { - type: "string", - title: "Model name", - description: "Name for the source model", - pattern: "^[a-zA-Z0-9_]+$", - "x-placeholder": "my_model", - "x-step": "source", - }, - }, - required: ["path", "name"], - allOf: [ - { - if: { properties: { auth_method: { const: "connection_string" } } }, - then: { required: ["azure_storage_connection_string"] }, - }, - { - if: { properties: { auth_method: { const: "account_key" } } }, - then: { required: ["azure_storage_account", "azure_storage_key"] }, - }, - { - if: { properties: { auth_method: { const: "sas_token" } } }, - then: { - required: ["azure_storage_account", "azure_storage_sas_token"], - }, - }, - ], -}; diff --git a/web-common/src/features/templates/schemas/bigquery.ts b/web-common/src/features/templates/schemas/bigquery.ts deleted file mode 100644 index a6852772be0..00000000000 --- a/web-common/src/features/templates/schemas/bigquery.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const bigquerySchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "BigQuery", - "x-category": "warehouse", - properties: { - google_application_credentials: { - type: "string", - title: "GCP credentials", - description: "Service account JSON (uploaded or pasted)", - format: "file", - "x-display": "file", - "x-file-accept": ".json", - "x-file-encoding": "json", - "x-file-extract": { project_id: "project_id" }, - "x-secret": true, - "x-env-var-name": "GOOGLE_APPLICATION_CREDENTIALS", - "x-step": "connector", - }, - project_id: { - type: "string", - title: "Project ID", - description: "Google Cloud project ID to use for queries", - "x-placeholder": "my-project", - "x-hint": - "If empty, Rill will use the project ID from your credentials when available.", - "x-step": "connector", - }, - log_queries: { - type: "boolean", - title: "Log queries", - description: "Enable SQL query logging for debugging", - "x-step": "connector", - "x-advanced": true, - }, - sql: { - type: "string", - title: "SQL", - description: "SQL query to run against your warehouse", - "x-placeholder": "Input SQL", - "x-step": "explorer", - }, - name: { - type: "string", - title: "Model name", - description: "Name for the source model", - pattern: "^[a-zA-Z0-9_]+$", - "x-placeholder": "my_model", - "x-step": "explorer", - }, - }, - required: ["google_application_credentials", "project_id", "sql", "name"], -}; diff --git a/web-common/src/features/templates/schemas/clickhouse.ts b/web-common/src/features/templates/schemas/clickhouse.ts deleted file mode 100644 index 54eb6f40518..00000000000 --- a/web-common/src/features/templates/schemas/clickhouse.ts +++ /dev/null @@ -1,375 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const clickhouseSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "ClickHouse", - "x-category": "olap", - "x-form-height": "tall", - "x-form-width": "wide", - "x-button-labels": { - deployment_type: { - playground: { idle: "Connect", loading: "Connecting..." }, - "rill-managed": { idle: "Connect", loading: "Connecting..." }, - }, - }, - properties: { - deployment_type: { - type: "string", - title: "Connection type", - enum: ["cloud", "playground", "self-managed"], // removed rill-managed until SQL support is ready - default: "cloud", - "x-display": "select", - "x-select-style": "rich", - "x-enum-labels": [ - "ClickHouse Cloud", - "ClickHouse Playground", - "Self Managed", - ], - "x-enum-descriptions": [ - "Connect to your ClickHouse Cloud instance", - "Free public instance for testing and demos", - "Connect to your own self-hosted server", - ], - "x-ui-only": true, - "x-grouped-fields": { - cloud: ["connection_mode"], - playground: ["playground_info"], - "self-managed": ["connection_mode"], - "rill-managed": ["managed"], - }, - "x-step": "connector", - }, - connection_mode: { - type: "string", - enum: ["parameters", "dsn"], - default: "parameters", - "x-display": "tabs", - "x-enum-labels": ["Enter parameters", "Enter connection string"], - "x-ui-only": true, - "x-tab-group": { - parameters: [ - "host", - "port", - "username", - "password", - "database", - "cluster", - "ssl", - ], - dsn: ["dsn"], - }, - "x-visible-if": { - deployment_type: ["cloud", "self-managed"], - }, - "x-step": "connector", - }, - dsn: { - type: "string", - title: "Connection string", - description: - "DSN connection string (use instead of individual host/port/user settings)", - "x-placeholder": - "clickhouse://localhost:9000?username=default&password=password", - "x-secret": true, - "x-env-var-name": "CLICKHOUSE_DSN", - "x-visible-if": { - deployment_type: ["cloud", "self-managed"], - }, - "x-step": "connector", - }, - managed: { - type: "boolean", - title: "Managed", - description: - "This option uses ClickHouse as an OLAP engine with Rill-managed infrastructure. No additional configuration is required - Rill will handle the setup and management of your ClickHouse instance.", - default: true, - "x-informational": true, - "x-visible-if": { - deployment_type: "rill-managed", - }, - "x-step": "connector", - }, - playground_info: { - type: "boolean", - title: "Playground", - description: - 'Connect to ClickHouse\'s free public playground instance. This is a read-only demo environment with sample datasets, perfect for testing Rill\'s ClickHouse integration without any setup. No credentials required.', - default: true, - "x-informational": true, - "x-ui-only": true, - "x-visible-if": { - deployment_type: "playground", - }, - "x-step": "connector", - }, - host: { - type: "string", - title: "Host", - description: "Hostname or IP address of the ClickHouse server", - "x-placeholder": "your.clickhouse.server.com", - "x-hint": "Your ClickHouse hostname (e.g., your-server.com)", - "x-visible-if": { - deployment_type: ["cloud", "self-managed"], - }, - "x-step": "connector", - }, - port: { - type: "string", - title: "Port", - description: - "Port number of the ClickHouse server. Common ports: 8443 (HTTPS), 9440 (Native TLS, secure), 8123 (HTTP, insecure), 9000 (Native TCP, insecure)", - pattern: "^\\d+$", - errorMessage: { pattern: "Port must be a number" }, - default: "8443", - "x-placeholder": "8443", - "x-visible-if": { - deployment_type: ["cloud", "self-managed"], - }, - "x-step": "connector", - }, - username: { - type: "string", - title: "Username", - description: "Username to connect to the ClickHouse server", - default: "default", - "x-placeholder": "default", - "x-visible-if": { - deployment_type: ["cloud", "self-managed"], - }, - "x-step": "connector", - }, - password: { - type: "string", - title: "Password", - description: "Password to connect to the ClickHouse server", - "x-placeholder": "Database password", - "x-secret": true, - "x-env-var-name": "CLICKHOUSE_PASSWORD", - "x-visible-if": { - deployment_type: ["cloud", "self-managed"], - }, - "x-step": "connector", - }, - database: { - type: "string", - title: "Database", - description: "Name of the ClickHouse database to connect to", - default: "default", - "x-placeholder": "default", - "x-visible-if": { - deployment_type: ["cloud", "self-managed"], - }, - "x-step": "connector", - }, - cluster: { - type: "string", - title: "Cluster", - description: - "Cluster name. If set, models are created as distributed tables.", - "x-placeholder": "Cluster name", - "x-visible-if": { - deployment_type: ["cloud", "self-managed"], - }, - "x-step": "connector", - }, - ssl: { - type: "boolean", - title: "SSL", - description: "Use SSL to connect to the ClickHouse server", - default: true, - "x-visible-if": { - deployment_type: ["cloud", "self-managed"], - }, - "x-step": "connector", - }, - mode: { - type: "boolean", - title: "Enable write mode", - description: - "Read-write mode allows Rill to drop, create, and modify tables, not just query them", - default: false, - "x-display": "toggle", - "x-yaml-value": "readwrite", - "x-visible-if": { deployment_type: ["cloud", "self-managed"] }, - "x-step": "connector", - "x-advanced": true, - }, - write_dsn: { - type: "string", - title: "Write DSN", - description: "Separate connection string for write operations", - "x-placeholder": "clickhouse://localhost:9000?username=default", - "x-secret": true, - "x-visible-if": { deployment_type: ["cloud", "self-managed"] }, - "x-step": "connector", - "x-advanced": true, - }, - database_whitelist: { - type: "string", - title: "Database whitelist", - description: "Comma-separated list of databases to show", - "x-placeholder": "db1,db2", - "x-visible-if": { deployment_type: ["cloud", "self-managed"] }, - "x-step": "connector", - "x-advanced": true, - }, - query_settings: { - type: "string", - title: "Query settings", - description: - "Default query settings (comma-separated, e.g. max_threads=8)", - "x-placeholder": "max_threads=8", - "x-visible-if": { deployment_type: ["cloud", "self-managed"] }, - "x-step": "connector", - "x-advanced": true, - }, - query_settings_override: { - type: "string", - title: "Query settings override", - description: "Override query settings that take precedence over defaults", - "x-placeholder": "max_threads=8", - "x-visible-if": { deployment_type: ["cloud", "self-managed"] }, - "x-step": "connector", - "x-advanced": true, - }, - max_open_conns: { - type: "number", - title: "Max open connections", - description: "Maximum number of open database connections", - "x-placeholder": "20", - "x-visible-if": { deployment_type: ["cloud", "self-managed"] }, - "x-step": "connector", - "x-advanced": true, - }, - max_idle_conns: { - type: "number", - title: "Max idle connections", - description: "Maximum number of idle database connections", - "x-placeholder": "5", - "x-visible-if": { deployment_type: ["cloud", "self-managed"] }, - "x-step": "connector", - "x-advanced": true, - }, - dial_timeout: { - type: "string", - title: "Dial timeout", - description: "Connection dial timeout duration (e.g. 60s)", - "x-placeholder": "60s", - "x-visible-if": { deployment_type: ["cloud", "self-managed"] }, - "x-step": "connector", - "x-advanced": true, - }, - conn_max_lifetime: { - type: "string", - title: "Connection max lifetime", - description: "Maximum connection lifetime duration", - "x-placeholder": "0s", - "x-visible-if": { deployment_type: ["cloud", "self-managed"] }, - "x-step": "connector", - "x-advanced": true, - }, - read_timeout: { - type: "string", - title: "Read timeout", - description: "Read timeout duration (e.g. 300s)", - "x-placeholder": "300s", - "x-visible-if": { deployment_type: ["cloud", "self-managed"] }, - "x-step": "connector", - "x-advanced": true, - }, - log_queries: { - type: "boolean", - title: "Log queries", - description: "Enable SQL query logging for debugging", - "x-visible-if": { deployment_type: ["cloud", "self-managed"] }, - "x-step": "connector", - "x-advanced": true, - }, - }, - required: ["deployment_type"], - allOf: [ - { - if: { properties: { deployment_type: { const: "rill-managed" } } }, - then: { - required: ["managed"], - properties: { - managed: { const: true }, - }, - }, - }, - { - if: { properties: { deployment_type: { const: "playground" } } }, - then: { - properties: { - managed: { const: false }, - host: { const: "play.clickhouse.com" }, - port: { const: "9440" }, - username: { const: "play" }, - password: { const: "" }, - database: { const: "default" }, - ssl: { const: true }, - }, - }, - }, - { - if: { - properties: { - deployment_type: { const: "cloud" }, - connection_mode: { const: "parameters" }, - }, - }, - then: { - required: ["host", "username", "port"], - properties: { - managed: { const: false }, - ssl: { const: true }, - }, - }, - }, - { - if: { - properties: { - deployment_type: { const: "cloud" }, - connection_mode: { const: "dsn" }, - }, - }, - then: { - required: ["dsn"], - properties: { - managed: { const: false }, - }, - }, - }, - { - if: { - properties: { - deployment_type: { const: "self-managed" }, - connection_mode: { const: "parameters" }, - }, - }, - then: { - required: ["host", "username"], - properties: { - managed: { const: false }, - port: { default: "9000" }, - ssl: { default: true }, - }, - }, - }, - { - if: { - properties: { - deployment_type: { const: "self-managed" }, - connection_mode: { const: "dsn" }, - }, - }, - then: { - required: ["dsn"], - properties: { - managed: { const: false }, - }, - }, - }, - ], -}; diff --git a/web-common/src/features/templates/schemas/delta.ts b/web-common/src/features/templates/schemas/delta.ts deleted file mode 100644 index ba4bb62aec2..00000000000 --- a/web-common/src/features/templates/schemas/delta.ts +++ /dev/null @@ -1,154 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const deltaSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "Delta Lake", - "x-category": "fileStore", - "x-form-height": "tall", - properties: { - storage_type: { - type: "string", - title: "Storage backend", - enum: ["local", "public", "gcs", "s3", "azure"], - default: "local", - "x-display": "select", - "x-select-style": "rich", - "x-enum-labels": [ - "Local", - "Public URL", - "Google Cloud Storage", - "Amazon S3", - "Azure Blob Storage", - ], - "x-enum-descriptions": [ - "Read Delta tables from a local directory", - "Read Delta tables from a public HTTP/HTTPS URL", - "Read Delta tables from a GCS bucket", - "Read Delta tables from an S3 bucket", - "Read Delta tables from Azure Blob Storage", - ], - "x-ui-only": true, - "x-required-driver": { - gcs: "gcs", - s3: "s3", - azure: "azure", - }, - "x-grouped-fields": { - gcs: ["gcs_info", "gcs_path"], - s3: ["s3_info", "s3_path"], - azure: ["azure_info", "azure_path"], - local: ["local_path"], - public: ["public_path"], - }, - "x-step": "source", - }, - gcs_info: { - type: "boolean", - title: "GCS Connector Required", - default: true, - "x-informational": true, - "x-ui-only": true, - "x-step": "source", - }, - gcs_path: { - type: "string", - title: "Delta table URI", - description: "GCS path to the Delta table directory", - pattern: "^gs://[^/]+(/.*)?$", - errorMessage: { - pattern: "Must be a GCS URI (e.g. gs://bucket/path/to/delta_table)", - }, - "x-placeholder": "gs://bucket/path/to/delta_table", - "x-step": "source", - }, - s3_info: { - type: "boolean", - title: "S3 Connector Required", - default: true, - "x-informational": true, - "x-ui-only": true, - "x-step": "source", - }, - s3_path: { - type: "string", - title: "Delta table URI", - description: "S3 path to the Delta table directory", - pattern: "^s3://[^/]+(/.*)?$", - errorMessage: { - pattern: "Must be an S3 URI (e.g. s3://bucket/path/to/delta_table)", - }, - "x-placeholder": "s3://bucket/path/to/delta_table", - "x-step": "source", - }, - azure_info: { - type: "boolean", - title: "Azure Connector Required", - default: true, - "x-informational": true, - "x-ui-only": true, - "x-step": "source", - }, - azure_path: { - type: "string", - title: "Delta table URI", - description: "Azure path to the Delta table directory", - pattern: "^azure://.+", - errorMessage: { - pattern: - "Must be an Azure URI (e.g. azure://container/path/to/delta_table)", - }, - "x-placeholder": "azure://container/path/to/delta_table", - "x-step": "source", - }, - local_path: { - type: "string", - title: "Delta table path", - description: "Local filesystem path to the Delta table directory", - "x-placeholder": "/path/to/delta_table", - "x-step": "source", - }, - public_path: { - type: "string", - title: "Delta table URL", - description: "Public HTTP/HTTPS URL to the Delta table directory", - errorMessage: { - pattern: - "Must be an HTTP or HTTPS URL (e.g. https://example.com/path/to/delta_table)", - }, - "x-placeholder": "https://example.com/path/to/delta_table", - "x-step": "source", - }, - name: { - type: "string", - title: "Model name", - description: "Name for the source model", - pattern: "^[a-zA-Z0-9_]+$", - "x-placeholder": "my_delta_model", - "x-step": "source", - }, - }, - required: ["name"], - allOf: [ - { - if: { properties: { storage_type: { const: "gcs" } } }, - then: { required: ["gcs_path"] }, - }, - { - if: { properties: { storage_type: { const: "s3" } } }, - then: { required: ["s3_path"] }, - }, - { - if: { properties: { storage_type: { const: "azure" } } }, - then: { required: ["azure_path"] }, - }, - { - if: { properties: { storage_type: { const: "local" } } }, - then: { required: ["local_path"] }, - }, - { - if: { properties: { storage_type: { const: "public" } } }, - then: { required: ["public_path"] }, - }, - ], -}; diff --git a/web-common/src/features/templates/schemas/druid.ts b/web-common/src/features/templates/schemas/druid.ts deleted file mode 100644 index 04ff362d404..00000000000 --- a/web-common/src/features/templates/schemas/druid.ts +++ /dev/null @@ -1,105 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const druidSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "Druid", - "x-category": "olap", - "x-form-width": "wide", - properties: { - connection_mode: { - type: "string", - title: "Connection method", - enum: ["parameters", "dsn"], - default: "parameters", - "x-display": "tabs", - "x-enum-labels": ["Enter parameters", "Enter connection string"], - "x-ui-only": true, - "x-tab-group": { - parameters: ["host", "port", "username", "password", "ssl"], - dsn: ["dsn"], - }, - }, - dsn: { - type: "string", - title: "Connection string", - description: - "Full Druid SQL/Avatica endpoint, e.g. https://host:8888/druid/v2/sql/avatica-protobuf?authentication=BASIC&avaticaUser=user&avaticaPassword=pass", - "x-placeholder": - "https://example.com/druid/v2/sql/avatica-protobuf?authentication=BASIC&avaticaUser=user&avaticaPassword=pass", - "x-secret": true, - "x-env-var-name": "DRUID_DSN", - }, - host: { - type: "string", - title: "Host", - description: "Druid host or IP", - "x-placeholder": "localhost", - }, - port: { - type: "string", - title: "Port", - description: "Druid port", - pattern: "^\\d+$", - errorMessage: { pattern: "Port must be a number" }, - "x-placeholder": "8888", - }, - username: { - type: "string", - title: "Username", - description: "Druid username", - "x-placeholder": "default", - }, - password: { - type: "string", - title: "Password", - description: "Druid password", - "x-placeholder": "password", - "x-secret": true, - "x-env-var-name": "DRUID_PASSWORD", - }, - ssl: { - type: "boolean", - title: "SSL", - description: "Use SSL for the connection", - default: true, - }, - max_open_conns: { - type: "number", - title: "Max open connections", - description: - "Maximum number of open database connections (0 for default)", - "x-placeholder": "20", - "x-advanced": true, - }, - skip_version_check: { - type: "boolean", - title: "Skip version check", - description: "Skip the Druid version compatibility check", - "x-advanced": true, - }, - skip_query_priority: { - type: "boolean", - title: "Skip query priority", - description: "Skip passing query priority to Druid", - "x-advanced": true, - }, - log_queries: { - type: "boolean", - title: "Log queries", - description: "Enable SQL query logging for debugging", - "x-advanced": true, - }, - }, - required: [], - oneOf: [ - { - title: "Use connection string", - required: ["dsn"], - }, - { - title: "Use individual parameters", - required: ["host", "ssl"], - }, - ], -}; diff --git a/web-common/src/features/templates/schemas/duckdb.ts b/web-common/src/features/templates/schemas/duckdb.ts deleted file mode 100644 index eedac2d4da7..00000000000 --- a/web-common/src/features/templates/schemas/duckdb.ts +++ /dev/null @@ -1,91 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const duckdbSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "DuckDB", - "x-form-width": "wide", - "x-category": "olap", - "x-button-labels": { - connector_type: { - "rill-managed": { idle: "Connect", loading: "Connecting..." }, - }, - }, - properties: { - connector_type: { - type: "string", - title: "Connection type", - enum: ["rill-managed", "self-hosted"], - default: "rill-managed", - "x-display": "select", - "x-select-style": "rich", - "x-enum-labels": ["Rill Managed", "Local File"], - "x-enum-descriptions": [ - "Rill manages your DuckDB infrastructure", - "Connect to your own DuckDB database file", - ], - "x-ui-only": true, - "x-grouped-fields": { - "rill-managed": ["managed"], - "self-hosted": ["path"], - }, - "x-step": "connector", - }, - managed: { - type: "boolean", - title: "Managed", - description: - "This option uses DuckDB as an OLAP engine with Rill-managed infrastructure. No additional configuration is required - Rill will handle the setup and management of your DuckDB instance.", - default: false, - "x-informational": true, - "x-ui-only": true, - "x-visible-if": { - connector_type: "rill-managed", - }, - "x-step": "connector", - }, - path: { - type: "string", - title: "Path", - description: "Path to external DuckDB database", - "x-placeholder": "/path/to/main.db", - "x-visible-if": { - connector_type: "self-hosted", - }, - "x-step": "connector", - }, - mode: { - type: "boolean", - title: "Enable write mode", - description: - "Read-write mode allows Rill to drop, create, and modify tables, not just query them", - default: false, - "x-display": "toggle", - "x-yaml-value": "readwrite", - "x-visible-if": { connector_type: "self-hosted" }, - "x-step": "connector", - "x-advanced": true, - }, - }, - required: ["connector_type"], - allOf: [ - { - if: { properties: { connector_type: { const: "rill-managed" } } }, - then: { - required: ["managed"], - properties: { - managed: { const: true }, - }, - }, - }, - { - if: { properties: { connector_type: { const: "self-hosted" } } }, - then: { - required: ["path"], - properties: { - managed: { const: false }, - }, - }, - }, - ], -}; diff --git a/web-common/src/features/templates/schemas/gcs.ts b/web-common/src/features/templates/schemas/gcs.ts deleted file mode 100644 index 801690a15ac..00000000000 --- a/web-common/src/features/templates/schemas/gcs.ts +++ /dev/null @@ -1,112 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const gcsSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "Google Cloud Storage", - "x-category": "objectStore", - properties: { - auth_method: { - type: "string", - title: "Authentication method", - enum: ["credentials", "hmac", "public"], - default: "credentials", - description: "Choose how to authenticate to GCS", - "x-display": "radio", - "x-enum-labels": ["GCP credentials", "HMAC keys", "Public"], - "x-enum-descriptions": [ - "Upload a JSON key file for a service account with GCS access.", - "Use HMAC access key and secret for S3-compatible authentication.", - "Access publicly readable buckets without credentials.", - ], - "x-ui-only": true, - "x-grouped-fields": { - credentials: ["google_application_credentials"], - hmac: ["key_id", "secret"], - public: [], - }, - "x-step": "connector", - }, - google_application_credentials: { - type: "string", - title: "Service account key", - description: - "Upload a JSON key file for a service account with GCS access.", - format: "file", - "x-display": "file", - "x-file-accept": ".json", - "x-file-encoding": "json", - "x-secret": true, - "x-env-var-name": "GOOGLE_APPLICATION_CREDENTIALS", - "x-step": "connector", - "x-visible-if": { auth_method: "credentials" }, - }, - key_id: { - type: "string", - title: "Access Key ID", - description: "HMAC access key ID for S3-compatible authentication", - "x-placeholder": "Enter your HMAC access key ID", - "x-secret": true, - "x-env-var-name": "GCP_ACCESS_KEY_ID", - "x-step": "connector", - "x-visible-if": { auth_method: "hmac" }, - }, - secret: { - type: "string", - title: "Secret Access Key", - description: "HMAC secret access key for S3-compatible authentication", - "x-placeholder": "Enter your HMAC secret access key", - "x-secret": true, - "x-env-var-name": "GCP_SECRET_ACCESS_KEY", - "x-step": "connector", - "x-visible-if": { auth_method: "hmac" }, - }, - path_prefixes: { - type: "string", - title: "Path prefixes", - description: - "Comma-separated list of bucket path prefixes this connector is allowed to access", - "x-placeholder": "gs://my-bucket/path/", - "x-step": "connector", - "x-advanced": true, - }, - allow_host_access: { - type: "boolean", - title: "Allow host access", - description: - "Use Application Default Credentials from the host environment in addition to configured credentials", - "x-step": "connector", - "x-advanced": true, - }, - path: { - type: "string", - title: "GCS URI", - description: "Path to your GCS bucket or prefix", - pattern: "^gs://[^/]+(/.*)?$", - errorMessage: { - pattern: "Must be a GS URI (e.g. gs://bucket/path)", - }, - "x-placeholder": "gs://bucket/path", - "x-step": "source", - }, - name: { - type: "string", - title: "Model name", - description: "Name for the source model", - pattern: "^[a-zA-Z0-9_]+$", - "x-placeholder": "my_model", - "x-step": "source", - }, - }, - required: ["path", "name"], - allOf: [ - { - if: { properties: { auth_method: { const: "credentials" } } }, - then: { required: ["google_application_credentials"] }, - }, - { - if: { properties: { auth_method: { const: "hmac" } } }, - then: { required: ["key_id", "secret"] }, - }, - ], -}; diff --git a/web-common/src/features/templates/schemas/https.ts b/web-common/src/features/templates/schemas/https.ts deleted file mode 100644 index f4b709dac4c..00000000000 --- a/web-common/src/features/templates/schemas/https.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const httpsSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "HTTP(S)", - "x-category": "fileStore", - "x-button-labels": { - "*": { "*": { idle: "Continue", loading: "Continuing..." } }, - }, - properties: { - auth_method: { - type: "string", - title: "Authentication method", - enum: ["with_headers", "public"], - default: "with_headers", - description: "Choose how to authenticate to GCS", - "x-display": "radio", - "x-enum-labels": ["Headers", "Public"], - "x-enum-descriptions": [ - "Add headers for credentials.", - "Access publicly readable urls without credentials.", - ], - "x-ui-only": true, - "x-grouped-fields": { - with_headers: ["headers"], - public: [], - }, - "x-step": "connector", - }, - headers: { - title: "Headers", - description: "HTTP headers to include in the request", - "x-display": "key-value", - "x-placeholder": "Header name", - "x-hint": "e.g. Authorization: Bearer <token>", - "x-step": "connector", - "x-visible-if": { auth_method: "with_headers" }, - }, - path: { - type: "string", - title: "URI", - description: "HTTP/HTTPS URL to the remote file", - pattern: "^https?://.+", - errorMessage: { - pattern: "URI must start with http:// or https://", - }, - "x-placeholder": "https://example.com/file.csv", - "x-step": "source", - }, - name: { - type: "string", - title: "Model name", - description: "Name of the model", - "x-placeholder": "my_new_model", - "x-step": "source", - }, - }, - required: ["path", "name"], -}; diff --git a/web-common/src/features/templates/schemas/iceberg.ts b/web-common/src/features/templates/schemas/iceberg.ts deleted file mode 100644 index 856914f217e..00000000000 --- a/web-common/src/features/templates/schemas/iceberg.ts +++ /dev/null @@ -1,208 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const icebergSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "Iceberg", - "x-category": "fileStore", - "x-form-height": "tall", - properties: { - storage_type: { - type: "string", - title: "Storage backend", - enum: ["local", "public", "gcs", "s3", "azure"], - default: "local", - "x-display": "select", - "x-select-style": "rich", - "x-enum-labels": [ - "Local", - "Public URL", - "Google Cloud Storage", - "Amazon S3", - "Azure Blob Storage", - ], - "x-enum-descriptions": [ - "Read Iceberg tables from a local directory", - "Read Iceberg tables from a public HTTP/HTTPS URL", - "Read Iceberg tables from a GCS bucket", - "Read Iceberg tables from an S3 bucket", - "Read Iceberg tables from Azure Blob Storage", - ], - "x-ui-only": true, - "x-required-driver": { - gcs: "gcs", - s3: "s3", - azure: "azure", - }, - "x-grouped-fields": { - gcs: ["gcs_info", "gcs_path"], - s3: ["s3_info", "s3_path"], - azure: ["azure_info", "azure_path"], - local: ["local_path"], - public: ["public_path"], - }, - "x-step": "source", - }, - gcs_info: { - type: "boolean", - title: "GCS Connector Required", - default: true, - "x-informational": true, - "x-ui-only": true, - "x-step": "source", - }, - gcs_path: { - type: "string", - title: "Iceberg table URI", - description: "GCS path to the Iceberg table directory", - pattern: "^gs://[^/]+(/.*)?$", - errorMessage: { - pattern: "Must be a GCS URI (e.g. gs://bucket/path/to/iceberg_table)", - }, - "x-placeholder": "gs://bucket/path/to/iceberg_table", - "x-step": "source", - }, - s3_info: { - type: "boolean", - title: "S3 Connector Required", - default: true, - "x-informational": true, - "x-ui-only": true, - "x-step": "source", - }, - s3_path: { - type: "string", - title: "Iceberg table URI", - description: "S3 path to the Iceberg table directory", - pattern: "^s3://[^/]+(/.*)?$", - errorMessage: { - pattern: "Must be an S3 URI (e.g. s3://bucket/path/to/iceberg_table)", - }, - "x-placeholder": "s3://bucket/path/to/iceberg_table", - "x-step": "source", - }, - azure_info: { - type: "boolean", - title: "Azure Connector Required", - default: true, - "x-informational": true, - "x-ui-only": true, - "x-step": "source", - }, - azure_path: { - type: "string", - title: "Iceberg table URI", - description: "Azure path to the Iceberg table directory", - pattern: "^azure://.+", - errorMessage: { - pattern: - "Must be an Azure URI (e.g. azure://container/path/to/iceberg_table)", - }, - "x-placeholder": "azure://container/path/to/iceberg_table", - "x-step": "source", - }, - local_path: { - type: "string", - title: "Iceberg table path", - description: "Local filesystem path to the Iceberg table directory", - "x-placeholder": "/path/to/iceberg_table", - "x-step": "source", - }, - public_path: { - type: "string", - title: "Iceberg table URL", - description: "Public HTTP/HTTPS URL to the Iceberg table directory", - errorMessage: { - pattern: - "Must be an HTTP or HTTPS URL (e.g. https://example.com/path/to/iceberg_table)", - }, - "x-placeholder": "https://example.com/path/to/iceberg_table", - "x-step": "source", - }, - allow_moved_paths: { - type: "boolean", - title: "Allow moved paths", - description: - "Allow reading tables where data files have been moved from their original location", - default: false, - "x-step": "source", - "x-advanced": true, - }, - metadata_compression_codec: { - type: "string", - title: "Metadata compression codec", - description: - "Compression codec for metadata files (e.g. 'gzip'). Leave empty for uncompressed.", - "x-placeholder": "gzip", - "x-step": "source", - "x-advanced": true, - }, - version: { - type: "string", - title: "Version", - description: - "Explicit version string, hint file, or guessing pattern (leave empty for latest)", - "x-placeholder": "2", - "x-step": "source", - "x-advanced": true, - }, - version_name_format: { - type: "string", - title: "Version name format", - description: - "Controls how versions are converted to metadata file names (uses printf-style %s placeholders)", - "x-placeholder": "v%s%s.metadata.json,%s%s.metadata.json", - "x-step": "source", - "x-advanced": true, - }, - snapshot_from_id: { - type: "string", - title: "Snapshot ID", - description: - "Access a specific snapshot by its ID (leave empty for latest)", - "x-placeholder": "3776207205136740581", - "x-step": "source", - "x-advanced": true, - }, - snapshot_from_timestamp: { - type: "string", - title: "Snapshot timestamp", - description: - "Access the snapshot at a specific timestamp (leave empty for latest)", - "x-placeholder": "2023-01-01 00:00:00", - "x-step": "source", - "x-advanced": true, - }, - name: { - type: "string", - title: "Model name", - description: "Name for the source model", - pattern: "^[a-zA-Z0-9_]+$", - "x-placeholder": "my_iceberg_model", - "x-step": "source", - }, - }, - required: ["name"], - allOf: [ - { - if: { properties: { storage_type: { const: "gcs" } } }, - then: { required: ["gcs_path"] }, - }, - { - if: { properties: { storage_type: { const: "s3" } } }, - then: { required: ["s3_path"] }, - }, - { - if: { properties: { storage_type: { const: "azure" } } }, - then: { required: ["azure_path"] }, - }, - { - if: { properties: { storage_type: { const: "local" } } }, - then: { required: ["local_path"] }, - }, - { - if: { properties: { storage_type: { const: "public" } } }, - then: { required: ["public_path"] }, - }, - ], -}; diff --git a/web-common/src/features/templates/schemas/local_file.ts b/web-common/src/features/templates/schemas/local_file.ts deleted file mode 100644 index 34021c0a46f..00000000000 --- a/web-common/src/features/templates/schemas/local_file.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; -import { - PossibleFileExtensions, - PossibleZipExtensions, -} from "@rilldata/web-common/features/sources/modal/possible-file-extensions.ts"; -import { - UploadFileSizeLimitInBytes, - UploadSizeExceededIsWarning, -} from "@rilldata/web-common/features/sources/upload-utils.ts"; - -export const localFileSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "Local File", - "x-category": "fileStore", - properties: { - file: { - title: "Path", - description: "Local file path or glob (relative to project root)", - "x-display": "file", - "x-file-accept": [ - ...PossibleFileExtensions, - ...PossibleZipExtensions, - ].join(","), - "x-step": "source", - "x-hint": "CSV, TSV, Parquet, TXT or JSON", - "x-file-size-limit": UploadFileSizeLimitInBytes, - "x-file-size-soft-limit": UploadSizeExceededIsWarning, - "x-file-size-limit-warning-message": - "Files over 100MB can be used locally but deployment to Rill Cloud is not allowed. Consider storing the data externally (e.g. S3) if you plan to deploy this project", - }, - }, - required: ["file"], -}; diff --git a/web-common/src/features/templates/schemas/motherduck.ts b/web-common/src/features/templates/schemas/motherduck.ts deleted file mode 100644 index 4477e37d1dd..00000000000 --- a/web-common/src/features/templates/schemas/motherduck.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const motherduckSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "MotherDuck", - "x-category": "olap", - "x-form-width": "wide", - properties: { - path: { - type: "string", - title: "Path", - description: "MotherDuck database path (prefix with md:)", - "x-placeholder": "md:my_db", - }, - token: { - type: "string", - title: "Token", - description: "MotherDuck token", - "x-placeholder": "your_motherduck_token", - "x-secret": true, - "x-env-var-name": "MOTHERDUCK_TOKEN", - }, - schema_name: { - type: "string", - title: "Schema name", - description: "Default schema to use", - "x-placeholder": "main", - }, - mode: { - type: "boolean", - title: "Enable write mode", - description: - "Read-write mode allows Rill to drop, create, and modify tables, not just query them", - default: false, - "x-display": "toggle", - "x-yaml-value": "readwrite", - "x-advanced": true, - }, - }, - required: ["path", "token", "schema_name"], -}; diff --git a/web-common/src/features/templates/schemas/mysql.ts b/web-common/src/features/templates/schemas/mysql.ts deleted file mode 100644 index b94aa2547ba..00000000000 --- a/web-common/src/features/templates/schemas/mysql.ts +++ /dev/null @@ -1,132 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const mysqlSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "MySQL", - "x-category": "sqlStore", - "x-form-height": "tall", - properties: { - connection_mode: { - type: "string", - title: "Connection method", - enum: ["parameters", "dsn"], - default: "parameters", - "x-display": "tabs", - "x-enum-labels": ["Enter parameters", "Enter connection string"], - "x-ui-only": true, - "x-tab-group": { - parameters: [ - "host", - "port", - "database", - "user", - "password", - "ssl-mode", - ], - dsn: ["dsn"], - }, - }, - dsn: { - type: "string", - title: "MySQL connection string", - description: - "Full DSN, e.g. mysql://user:password@host:3306/database?ssl-mode=REQUIRED", - "x-placeholder": "mysql://user:password@host:3306/database", - "x-secret": true, - "x-env-var-name": "MYSQL_DSN", - "x-hint": - "Use DSN or fill host/user/password/database below (not both at once).", - }, - host: { - type: "string", - title: "Host", - description: "MySQL server hostname or IP", - "x-placeholder": "localhost", - }, - port: { - type: "string", - title: "Port", - description: "MySQL server port", - pattern: "^\\d+$", - errorMessage: { pattern: "Port must be a number" }, - default: "3306", - "x-placeholder": "3306", - }, - database: { - type: "string", - title: "Database", - description: "Database name", - "x-placeholder": "my_database", - }, - user: { - type: "string", - title: "Username", - description: "MySQL user", - "x-placeholder": "mysql", - }, - password: { - type: "string", - title: "Password", - description: "MySQL password", - "x-placeholder": "your_password", - "x-secret": true, - "x-env-var-name": "MYSQL_PASSWORD", - }, - "ssl-mode": { - type: "string", - title: "SSL mode", - enum: ["DISABLED", "PREFERRED", "REQUIRED"], - "x-placeholder": "Select SSL mode", - }, - log_queries: { - type: "boolean", - title: "Log queries", - description: "Enable SQL query logging for debugging", - "x-advanced": true, - }, - sql: { - type: "string", - title: "SQL", - description: "SQL query to run against your database", - "x-placeholder": "SELECT * FROM my_table", - "x-step": "explorer", - }, - name: { - type: "string", - title: "Model name", - description: "Name for the source model", - pattern: "^[a-zA-Z0-9_]+$", - "x-placeholder": "my_model", - "x-step": "explorer", - }, - }, - required: ["sql", "name"], - oneOf: [ - { - title: "Use DSN", - required: ["dsn"], - not: { - anyOf: [ - { required: ["host"] }, - { required: ["database"] }, - { required: ["user"] }, - { required: ["password"] }, - { required: ["port"] }, - { required: ["ssl-mode"] }, - ], - }, - }, - { - title: "Use individual parameters", - required: ["host", "database", "user"], - }, - ], - allOf: [ - { - if: { properties: { connection_mode: { const: "dsn" } } }, - then: { required: ["dsn"] }, - else: { required: ["host", "database", "user"] }, - }, - ], -}; diff --git a/web-common/src/features/templates/schemas/pinot.ts b/web-common/src/features/templates/schemas/pinot.ts deleted file mode 100644 index 40e17bd2745..00000000000 --- a/web-common/src/features/templates/schemas/pinot.ts +++ /dev/null @@ -1,124 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const pinotSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "Pinot", - "x-category": "olap", - "x-form-height": "tall", - "x-form-width": "wide", - properties: { - connection_mode: { - type: "string", - title: "Connection method", - enum: ["parameters", "dsn"], - default: "parameters", - "x-display": "tabs", - "x-enum-labels": ["Enter parameters", "Enter connection string"], - "x-ui-only": true, - "x-tab-group": { - parameters: [ - "broker_host", - "broker_port", - "controller_host", - "controller_port", - "username", - "password", - "ssl", - ], - dsn: ["dsn"], - }, - }, - dsn: { - type: "string", - title: "Connection string", - description: - "Full Pinot connection string, e.g. http(s)://user:password@broker:8000?controller=host:9000", - "x-placeholder": - "https://username:password@localhost:8000?controller=localhost:9000", - "x-secret": true, - "x-env-var-name": "PINOT_DSN", - }, - broker_host: { - type: "string", - title: "Broker host", - description: "Pinot broker host", - "x-placeholder": "localhost", - }, - broker_port: { - type: "string", - title: "Broker port", - description: "Pinot broker port", - pattern: "^\\d+$", - errorMessage: { pattern: "Port must be a number" }, - "x-placeholder": "8000", - }, - controller_host: { - type: "string", - title: "Controller host", - description: "Pinot controller host", - "x-placeholder": "localhost", - }, - controller_port: { - type: "string", - title: "Controller port", - description: "Pinot controller port", - pattern: "^\\d+$", - errorMessage: { pattern: "Port must be a number" }, - "x-placeholder": "9000", - }, - username: { - type: "string", - title: "Username", - description: "Pinot username", - "x-placeholder": "default", - }, - password: { - type: "string", - title: "Password", - description: "Pinot password", - "x-placeholder": "password", - "x-secret": true, - "x-env-var-name": "PINOT_PASSWORD", - }, - ssl: { - type: "boolean", - title: "SSL", - description: "Use SSL", - default: true, - }, - max_open_conns: { - type: "number", - title: "Max open connections", - description: - "Maximum number of open database connections (0 for default)", - "x-placeholder": "20", - "x-advanced": true, - }, - timeout_ms: { - type: "number", - title: "Query timeout (ms)", - description: - "Timeout in milliseconds for queries (0 for cluster default)", - "x-placeholder": "0", - "x-advanced": true, - }, - log_queries: { - type: "boolean", - title: "Log queries", - description: "Enable SQL query logging for debugging", - "x-advanced": true, - }, - }, - required: [], - oneOf: [ - { - title: "Use connection string", - required: ["dsn"], - }, - { - title: "Use individual parameters", - required: ["broker_host", "controller_host", "ssl"], - }, - ], -}; diff --git a/web-common/src/features/templates/schemas/postgres.ts b/web-common/src/features/templates/schemas/postgres.ts deleted file mode 100644 index ffa6c282de7..00000000000 --- a/web-common/src/features/templates/schemas/postgres.ts +++ /dev/null @@ -1,141 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const postgresSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "PostgreSQL", - "x-category": "sqlStore", - "x-form-height": "tall", - properties: { - connection_mode: { - type: "string", - title: "Connection method", - enum: ["parameters", "dsn"], - default: "parameters", - "x-display": "tabs", - "x-enum-labels": ["Enter parameters", "Enter connection string"], - "x-ui-only": true, - "x-tab-group": { - parameters: ["host", "port", "user", "password", "dbname", "sslmode"], - dsn: ["dsn"], - }, - }, - dsn: { - type: "string", - title: "Postgres connection string", - description: - "e.g. postgresql://user:password@host:5432/dbname?sslmode=require", - "x-placeholder": "postgresql://postgres:postgres@localhost:5432/postgres", - "x-secret": true, - "x-env-var-name": "POSTGRES_DSN", - "x-hint": - "Use a DSN or provide host/user/password/dbname below (but not both).", - }, - host: { - type: "string", - title: "Host", - description: "Postgres server hostname or IP", - "x-placeholder": "localhost", - }, - port: { - type: "string", - title: "Port", - description: "Postgres server port", - pattern: "^\\d+$", - errorMessage: { pattern: "Port must be a number" }, - default: "5432", - "x-placeholder": "5432", - }, - user: { - type: "string", - title: "Username", - description: "Postgres user", - "x-placeholder": "postgres", - }, - password: { - type: "string", - title: "Password", - description: "Postgres password", - "x-placeholder": "your_password", - "x-secret": true, - "x-env-var-name": "POSTGRES_PASSWORD", - }, - dbname: { - type: "string", - title: "Database", - description: "Database name", - "x-placeholder": "postgres", - }, - sslmode: { - type: "string", - title: "SSL mode", - enum: ["disable", "allow", "prefer", "require"], - "x-placeholder": "Select SSL mode", - }, - log_queries: { - type: "boolean", - title: "Log queries", - description: "Enable SQL query logging for debugging", - "x-advanced": true, - }, - sql: { - type: "string", - title: "SQL", - description: "SQL query to run against your database", - "x-placeholder": "SELECT * FROM my_table", - "x-step": "explorer", - }, - name: { - type: "string", - title: "Model name", - description: "Name for the source model", - pattern: "^[a-zA-Z0-9_]+$", - "x-placeholder": "my_model", - "x-step": "explorer", - }, - }, - required: ["sql", "name"], - oneOf: [ - { - title: "Use DSN", - required: ["dsn"], - not: { - anyOf: [ - { required: ["database_url"] }, - { required: ["host"] }, - { required: ["port"] }, - { required: ["user"] }, - { required: ["password"] }, - { required: ["dbname"] }, - { required: ["sslmode"] }, - ], - }, - }, - { - title: "Use Database URL", - required: ["database_url"], - not: { - anyOf: [ - { required: ["dsn"] }, - { required: ["host"] }, - { required: ["port"] }, - { required: ["user"] }, - { required: ["password"] }, - { required: ["dbname"] }, - { required: ["sslmode"] }, - ], - }, - }, - { - title: "Use individual parameters", - required: ["host", "user", "dbname"], - }, - ], - allOf: [ - { - if: { properties: { connection_mode: { const: "dsn" } } }, - then: { required: ["dsn"] }, - else: { required: ["host", "user", "dbname"] }, - }, - ], -}; diff --git a/web-common/src/features/templates/schemas/redshift.ts b/web-common/src/features/templates/schemas/redshift.ts deleted file mode 100644 index 8a8faff1e6c..00000000000 --- a/web-common/src/features/templates/schemas/redshift.ts +++ /dev/null @@ -1,79 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const redshiftSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "Redshift", - "x-category": "warehouse", - properties: { - aws_access_key_id: { - type: "string", - title: "AWS access key ID", - description: "AWS access key ID", - "x-placeholder": "your_access_key_id", - "x-secret": true, - "x-env-var-name": "AWS_ACCESS_KEY_ID", - }, - aws_secret_access_key: { - type: "string", - title: "AWS secret access key", - description: "AWS secret access key", - "x-placeholder": "your_secret_access_key", - "x-secret": true, - "x-env-var-name": "AWS_SECRET_ACCESS_KEY", - }, - region: { - type: "string", - title: "AWS region", - description: "AWS region (e.g. us-east-1)", - "x-placeholder": "us-east-1", - }, - database: { - type: "string", - title: "Database", - description: "Redshift database name", - "x-placeholder": "dev", - }, - workgroup: { - type: "string", - title: "Workgroup", - description: "Redshift Serverless workgroup name", - "x-placeholder": "default-workgroup", - }, - cluster_identifier: { - type: "string", - title: "Cluster identifier", - description: - "Redshift cluster identifier (use when not using serverless)", - "x-placeholder": "redshift-cluster-1", - }, - log_queries: { - type: "boolean", - title: "Log queries", - description: "Enable SQL query logging for debugging", - "x-advanced": true, - }, - sql: { - type: "string", - title: "SQL", - description: "SQL query to run against your warehouse", - "x-placeholder": "Input SQL", - "x-step": "explorer", - }, - name: { - type: "string", - title: "Model name", - description: "Name for the source model", - pattern: "^[a-zA-Z0-9_]+$", - "x-placeholder": "my_model", - "x-step": "explorer", - }, - }, - required: [ - "aws_access_key_id", - "aws_secret_access_key", - "database", - "sql", - "name", - ], -}; diff --git a/web-common/src/features/templates/schemas/s3.ts b/web-common/src/features/templates/schemas/s3.ts deleted file mode 100644 index f61e742dc0a..00000000000 --- a/web-common/src/features/templates/schemas/s3.ts +++ /dev/null @@ -1,150 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const s3Schema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "S3", - "x-category": "objectStore", - properties: { - auth_method: { - type: "string", - title: "Authentication method", - description: "Choose how to authenticate to S3", - enum: ["access_keys", "public"], - default: "access_keys", - "x-display": "radio", - "x-enum-labels": ["Access keys", "Public"], - "x-enum-descriptions": [ - "Use AWS access key ID and secret access key.", - "Access publicly readable buckets without credentials.", - ], - "x-ui-only": true, - "x-grouped-fields": { - access_keys: [ - "aws_access_key_id", - "aws_secret_access_key", - "region", - "endpoint", - "aws_role_arn", - "aws_role_session_name", - "aws_external_id", - ], - public: [], - }, - "x-step": "connector", - }, - aws_access_key_id: { - type: "string", - title: "Access Key ID", - description: "AWS access key ID for the bucket", - "x-placeholder": "Enter AWS access key ID", - "x-secret": true, - "x-env-var-name": "AWS_ACCESS_KEY_ID", - "x-step": "connector", - "x-visible-if": { auth_method: "access_keys" }, - }, - aws_secret_access_key: { - type: "string", - title: "Secret Access Key", - description: "AWS secret access key for the bucket", - "x-placeholder": "Enter AWS secret access key", - "x-secret": true, - "x-env-var-name": "AWS_SECRET_ACCESS_KEY", - "x-step": "connector", - "x-visible-if": { auth_method: "access_keys" }, - }, - region: { - type: "string", - title: "Region", - description: - "Rill uses your default AWS region unless you set it explicitly.", - "x-placeholder": "us-east-1", - "x-step": "connector", - "x-visible-if": { auth_method: "access_keys" }, - }, - endpoint: { - type: "string", - title: "Endpoint", - description: - "Override the S3 endpoint (for S3-compatible services like R2/MinIO).", - "x-placeholder": "https://s3.example.com", - "x-step": "connector", - "x-visible-if": { auth_method: "access_keys" }, - "x-advanced": true, - }, - aws_role_arn: { - type: "string", - title: "AWS Role ARN", - description: "AWS Role ARN to assume", - "x-placeholder": "arn:aws:iam::123456789012:role/MyRole", - "x-secret": true, - "x-env-var-name": "AWS_ROLE_ARN", - "x-step": "connector", - "x-visible-if": { auth_method: "access_keys" }, - "x-advanced": true, - }, - aws_role_session_name: { - type: "string", - title: "Role Session Name", - description: "Session name for STS AssumeRole", - "x-placeholder": "rill-session", - "x-step": "connector", - "x-visible-if": { auth_method: "access_keys" }, - "x-advanced": true, - }, - aws_external_id: { - type: "string", - title: "External ID", - description: "External ID for cross-account role assumption", - "x-placeholder": "your-external-id", - "x-step": "connector", - "x-visible-if": { auth_method: "access_keys" }, - "x-advanced": true, - }, - path_prefixes: { - type: "string", - title: "Path prefixes", - description: - "Comma-separated list of bucket path prefixes this connector is allowed to access", - "x-placeholder": "s3://my-bucket/path/", - "x-step": "connector", - "x-advanced": true, - }, - allow_host_access: { - type: "boolean", - title: "Allow host access", - description: - "Use AWS credentials from the host environment (e.g. ~/.aws) in addition to configured credentials", - "x-step": "connector", - "x-advanced": true, - }, - path: { - type: "string", - title: "S3 URI", - description: "Path to your S3 bucket or prefix", - pattern: "^s3://[^/]+(/.*)?$", - errorMessage: { - pattern: "Must be an S3 URI (e.g. s3://bucket/path)", - }, - "x-placeholder": "s3://bucket/path", - "x-step": "source", - }, - name: { - type: "string", - title: "Model name", - description: "Name for the source model", - pattern: "^[a-zA-Z0-9_]+$", - "x-placeholder": "my_model", - "x-step": "source", - }, - }, - required: ["path", "name"], - allOf: [ - { - if: { properties: { auth_method: { const: "access_keys" } } }, - then: { - required: ["aws_access_key_id", "aws_secret_access_key"], - }, - }, - ], -}; diff --git a/web-common/src/features/templates/schemas/salesforce.ts b/web-common/src/features/templates/schemas/salesforce.ts deleted file mode 100644 index 794b6199f64..00000000000 --- a/web-common/src/features/templates/schemas/salesforce.ts +++ /dev/null @@ -1,76 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const salesforceSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "Salesforce", - "x-category": "fileStore", - "x-form-height": "tall", - properties: { - username: { - type: "string", - title: "Username", - description: "Salesforce username (usually an email)", - "x-placeholder": "user@example.com", - }, - password: { - type: "string", - title: "Password", - description: - "Salesforce password, optionally followed by security token if required", - "x-placeholder": "your_password", - "x-secret": true, - "x-env-var-name": "SALESFORCE_PASSWORD", - }, - endpoint: { - type: "string", - title: "Login endpoint", - description: - "Salesforce login URL (e.g., login.salesforce.com or test.salesforce.com)", - "x-placeholder": "login.salesforce.com", - }, - key: { - type: "string", - title: "JWT private key", - description: "PEM-formatted private key for JWT auth", - "x-display": "textarea", - "x-placeholder": "your_private_key", - "x-secret": true, - "x-env-var-name": "SALESFORCE_KEY", - "x-advanced": true, - }, - client_id: { - type: "string", - title: "Connected App Client ID", - description: "Client ID (consumer key) for JWT auth", - "x-placeholder": "Connected App client ID", - "x-advanced": true, - }, - soql: { - type: "string", - title: "SOQL", - description: "SOQL query to extract data", - "x-placeholder": "SELECT Id, Name FROM Opportunity", - }, - sobject: { - type: "string", - title: "SObject", - description: "Salesforce object to query", - "x-placeholder": "Opportunity", - }, - queryAll: { - type: "boolean", - title: "Query all", - description: "Include deleted and archived records", - default: false, - }, - name: { - type: "string", - title: "Source name", - description: "Name for the source", - pattern: "^[a-zA-Z0-9_]+$", - "x-placeholder": "my_new_source", - }, - }, - required: ["soql", "sobject", "name", "username", "password"], -}; diff --git a/web-common/src/features/templates/schemas/snowflake.ts b/web-common/src/features/templates/schemas/snowflake.ts deleted file mode 100644 index 7e15c9288cc..00000000000 --- a/web-common/src/features/templates/schemas/snowflake.ts +++ /dev/null @@ -1,181 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -// TODO: Add a "Use as OLAP engine" toggle to the Snowflake form. -// When enabled, set olap_connector: snowflake in rill.yaml so -// isLiveConnectorType resolves true and skips DuckDB ingestion. -export const snowflakeSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "Snowflake", - "x-category": "warehouse", - "x-form-height": "tall", - properties: { - auth_method: { - type: "string", - enum: ["password", "private_key", "dsn"], - default: "password", - "x-display": "tabs", - "x-enum-labels": ["User/Password", "Private Key", "Connection String"], - "x-ui-only": true, - "x-tab-group": { - password: [ - "account", - "user", - "password", - "warehouse", - "database", - "schema", - "role", - ], - private_key: [ - "account", - "user", - "privateKey", - "warehouse", - "database", - "schema", - "role", - "authenticator", - ], - dsn: ["dsn"], - }, - }, - account: { - type: "string", - title: "Account identifier", - description: - "Snowflake account identifier (from your Snowflake URL, before .snowflakecomputing.com)", - "x-placeholder": "abc12345.us-east-1", - "x-hint": "e.g. abc12345 or abc12345.us-east-1 — don't include https://", - }, - user: { - type: "string", - title: "Username", - description: "Snowflake username", - "x-placeholder": "your_username", - }, - password: { - type: "string", - title: "Password", - description: "Snowflake password", - "x-placeholder": "your_password", - "x-secret": true, - "x-env-var-name": "SNOWFLAKE_PASSWORD", - "x-visible-if": { auth_method: "password" }, - }, - privateKey: { - type: "string", - title: "Private key", - description: "Upload your Snowflake private key file (.pem or .p8)", - format: "file", - "x-display": "file", - "x-file-accept": ".pem,.p8", - "x-file-encoding": "base64", - "x-secret": true, - "x-env-var-name": "SNOWFLAKE_PRIVATE_KEY", - "x-visible-if": { auth_method: "private_key" }, - }, - warehouse: { - type: "string", - title: "Warehouse", - description: "Compute warehouse", - "x-placeholder": "your_warehouse", - }, - database: { - type: "string", - title: "Database", - description: "Snowflake database", - "x-placeholder": "your_database", - }, - schema: { - type: "string", - title: "Schema", - description: "Default schema", - "x-placeholder": "public", - }, - role: { - type: "string", - title: "Role", - description: "Snowflake role", - "x-placeholder": "your_role", - }, - dsn: { - type: "string", - title: "Connection string", - description: - "Full Snowflake DSN, e.g. @//?warehouse=&role=", - "x-placeholder": - "@//?warehouse=&role=", - "x-secret": true, - "x-env-var-name": "SNOWFLAKE_DSN", - "x-hint": - "Include authenticator and privateKey query params for JWT if needed.", - "x-visible-if": { auth_method: "dsn" }, - }, - authenticator: { - type: "string", - title: "Authenticator", - description: - "Snowflake authentication type (e.g. snowflake, externalbrowser, snowflake_jwt)", - "x-placeholder": "snowflake", - "x-advanced": true, - "x-disabled-if": { auth_method: "private_key" }, - }, - parallel_fetch_limit: { - type: "number", - title: "Parallel fetch limit", - description: "Maximum number of parallel fetch operations", - "x-advanced": true, - "x-placeholder": "10", - }, - log_queries: { - type: "boolean", - title: "Log queries", - description: "Enable SQL query logging for debugging", - "x-advanced": true, - }, - sql: { - type: "string", - title: "SQL", - description: "SQL query to run against your warehouse", - "x-placeholder": "Input SQL", - "x-step": "explorer", - }, - name: { - type: "string", - title: "Model name", - description: "Name for the source model", - pattern: "^[a-zA-Z0-9_]+$", - "x-placeholder": "my_model", - "x-step": "explorer", - }, - }, - required: ["sql", "name"], - allOf: [ - { - if: { - properties: { auth_method: { const: "password" } }, - }, - then: { - required: ["account", "user", "password", "database", "warehouse"], - }, - }, - { - if: { - properties: { auth_method: { const: "private_key" } }, - }, - then: { - required: ["account", "user", "privateKey", "database", "warehouse"], - properties: { - authenticator: { const: "SNOWFLAKE_JWT" }, - }, - }, - }, - { - if: { - properties: { auth_method: { const: "dsn" } }, - }, - then: { required: ["dsn"] }, - }, - ], -}; diff --git a/web-common/src/features/templates/schemas/sqlite.ts b/web-common/src/features/templates/schemas/sqlite.ts deleted file mode 100644 index ebc7798d46f..00000000000 --- a/web-common/src/features/templates/schemas/sqlite.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const sqliteSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "SQLite", - "x-category": "fileStore", - properties: { - db: { - type: "string", - title: "Database file", - description: "Path to SQLite db file", - "x-placeholder": "/path/to/sqlite.db", - }, - table: { - type: "string", - title: "Table", - description: "SQLite table name", - "x-placeholder": "my_table", - }, - name: { - type: "string", - title: "Source name", - description: "Name of the source", - pattern: "^[a-zA-Z0-9_]+$", - "x-placeholder": "my_new_source", - }, - }, - required: ["db", "table", "name"], -}; diff --git a/web-common/src/features/templates/schemas/starrocks.ts b/web-common/src/features/templates/schemas/starrocks.ts deleted file mode 100644 index 0f63c3cebd7..00000000000 --- a/web-common/src/features/templates/schemas/starrocks.ts +++ /dev/null @@ -1,106 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const starrocksSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "StarRocks", - "x-category": "olap", - "x-form-height": "tall", - "x-form-width": "wide", - properties: { - connection_mode: { - type: "string", - title: "Connection method", - enum: ["parameters", "dsn"], - default: "parameters", - "x-display": "tabs", - "x-enum-labels": ["Enter parameters", "Enter connection string"], - "x-ui-only": true, - "x-tab-group": { - parameters: [ - "host", - "port", - "username", - "password", - "catalog", - "database", - "ssl", - ], - dsn: ["dsn"], - }, - }, - dsn: { - type: "string", - title: "Connection string", - description: - "MySQL DSN format. If provided, do not set host/port/username/password. Catalog and database should be set separately for external catalogs.", - "x-placeholder": - "user:password@tcp(host:9030)/?timeout=30s&readTimeout=300s&parseTime=true", - "x-secret": true, - }, - host: { - type: "string", - title: "Host", - description: "Hostname or IP address of the StarRocks FE node", - "x-placeholder": "localhost", - }, - port: { - type: "string", - title: "Port", - description: "MySQL protocol port of the StarRocks FE node", - pattern: "^\\d+$", - errorMessage: { pattern: "Port must be a number" }, - default: "9030", - "x-placeholder": "9030", - }, - username: { - type: "string", - title: "Username", - description: "Username to connect to StarRocks", - default: "root", - "x-placeholder": "root", - }, - password: { - type: "string", - title: "Password", - description: "Password to connect to StarRocks", - "x-placeholder": "password", - "x-secret": true, - }, - catalog: { - type: "string", - title: "Catalog", - description: - "StarRocks catalog name. Use default_catalog for internal tables, or specify an external catalog (e.g. Iceberg, Hive).", - default: "default_catalog", - "x-placeholder": "default_catalog", - }, - database: { - type: "string", - title: "Database", - description: "Name of the StarRocks database to connect to", - "x-placeholder": "default", - }, - ssl: { - type: "boolean", - title: "SSL", - description: "Enable SSL/TLS encryption for the connection", - }, - log_queries: { - type: "boolean", - title: "Log queries", - description: "Enable SQL query logging for debugging", - "x-advanced": true, - }, - }, - required: [], - allOf: [ - { - if: { - properties: { connection_mode: { const: "dsn" } }, - }, - then: { required: ["dsn"] }, - else: { required: ["host"] }, - }, - ], -}; diff --git a/web-common/src/features/templates/schemas/supabase.ts b/web-common/src/features/templates/schemas/supabase.ts deleted file mode 100644 index 4e2b0a5b28d..00000000000 --- a/web-common/src/features/templates/schemas/supabase.ts +++ /dev/null @@ -1,143 +0,0 @@ -import type { MultiStepFormSchema } from "./types"; - -export const supabaseSchema: MultiStepFormSchema = { - $schema: "http://json-schema.org/draft-07/schema#", - type: "object", - title: "Supabase", - "x-category": "sqlStore", - "x-form-height": "tall", - properties: { - connection_mode: { - type: "string", - title: "Connection method", - enum: ["parameters", "dsn"], - default: "parameters", - "x-display": "tabs", - "x-enum-labels": ["Enter parameters", "Enter connection string"], - "x-ui-only": true, - "x-tab-group": { - parameters: ["host", "port", "user", "password", "dbname", "sslmode"], - dsn: ["dsn"], - }, - }, - dsn: { - type: "string", - title: "Supabase connection string", - description: - "e.g. postgresql://postgres.[ref]:[password]@aws-0-[region].pooler.supabase.com:5432/postgres", - "x-placeholder": - "postgresql://postgres.[ref]:[password]@aws-0-[region].pooler.supabase.com:5432/postgres", - "x-secret": true, - "x-env-var-name": "SUPABASE_DSN", - "x-hint": - "Use a DSN or provide host/user/password/dbname below (but not both).", - }, - host: { - type: "string", - title: "Host", - description: "Supabase database host", - "x-placeholder": "aws-0-[region].pooler.supabase.com", - }, - port: { - type: "string", - title: "Port", - description: "Supabase database port", - pattern: "^\\d+$", - errorMessage: { pattern: "Port must be a number" }, - default: "5432", - "x-placeholder": "5432", - }, - user: { - type: "string", - title: "Username", - description: "Supabase database user", - "x-placeholder": "postgres.[ref]", - }, - password: { - type: "string", - title: "Password", - description: "Supabase database password", - "x-placeholder": "your_password", - "x-secret": true, - "x-env-var-name": "SUPABASE_PASSWORD", - }, - dbname: { - type: "string", - title: "Database", - description: "Database name", - "x-placeholder": "postgres", - }, - sslmode: { - type: "string", - title: "SSL mode", - description: "Supabase requires SSL for all connections", - default: "require", - "x-disabled": true, - }, - log_queries: { - type: "boolean", - title: "Log queries", - description: "Enable SQL query logging for debugging", - "x-advanced": true, - }, - sql: { - type: "string", - title: "SQL", - description: "SQL query to run against your database", - "x-placeholder": "SELECT * FROM my_table", - "x-step": "explorer", - }, - name: { - type: "string", - title: "Model name", - description: "Name for the source model", - pattern: "^[a-zA-Z0-9_]+$", - "x-placeholder": "my_model", - "x-step": "explorer", - }, - }, - required: ["sql", "name"], - oneOf: [ - { - title: "Use DSN", - required: ["dsn"], - not: { - anyOf: [ - { required: ["database_url"] }, - { required: ["host"] }, - { required: ["port"] }, - { required: ["user"] }, - { required: ["password"] }, - { required: ["dbname"] }, - { required: ["sslmode"] }, - ], - }, - }, - { - title: "Use Database URL", - required: ["database_url"], - not: { - anyOf: [ - { required: ["dsn"] }, - { required: ["host"] }, - { required: ["port"] }, - { required: ["user"] }, - { required: ["password"] }, - { required: ["dbname"] }, - { required: ["sslmode"] }, - ], - }, - }, - { - title: "Use individual parameters", - required: ["host", "user", "dbname"], - }, - ], - allOf: [ - { - if: { properties: { connection_mode: { const: "dsn" } } }, - then: { required: ["dsn"] }, - else: { required: ["host", "user", "dbname"] }, - }, - ], -};