Skip to Content
Configuration files schemas

Configuration processed during initialization

All configuration files are parsed as templates. For more information about the template parser, see its reference.

User Defined Template functions are not available during Engine initialization, therefore cannot be used in the following templates:

  • Main Application Configuration
  • Descriptor bundle information file (bundle-info.yaml)
  • Virtual Database information file
  • Script Module bundle information file (bundle-script-info.yaml)
  • SQL Function Module bundle information file (bundle-sql-function-info.yaml)
  • Template Function Module bundle information file (bundle-function-info.yaml)

General

Main application configuration

--- type: "object" id: "schema:kubling:dbvirt:config:app:Application" properties: instanceName: type: "string" transports: type: "object" id: "schema:kubling:dbvirt:config:app:Transports" properties: pgProtocol: type: "object" id: "schema:kubling:dbvirt:config:app:Transport" properties: bindAddress: type: "string" description: "Listening bind address." portNumber: type: "integer" description: "Listening port number." secure: type: "boolean" description: "Indicates whether this transport must be secured (requires\ \ SSL configuration)." sslConfig: type: "object" id: "schema:kubling:dbvirt:config:app:SSLConfig" properties: storeType: type: "string" description: "TLS certificate store type (do not change if certificates\ \ were generated with Kubling CLI)." storeFilePath: type: "string" description: "Location of the certificate store file." storePassword: type: "string" description: "Certificate store password." entryAlias: type: "string" description: "Certificate store entry name/alias (do not change if\ \ certificates were generated with Kubling CLI)." enable: type: "boolean" ipFilter: type: "object" id: "schema:kubling:dbvirt:config:app:IPFilter" properties: type: type: "string" description: "The type of the list: WHITELIST or BLACKLIST." enum: - "WHITELIST" - "BLACKLIST" cidrBlocks: type: "array" description: "List of CIDR blocks representing IP ranges (e.g. 192.168.0.0/24)." items: type: "string" nativeProtocol: type: "object" $ref: "schema:kubling:dbvirt:config:app:Transport" grpc: type: "object" $ref: "schema:kubling:dbvirt:config:app:Transport" management: type: "object" id: "schema:kubling:dbvirt:config:app:Management" properties: enableRestartEndpoint: type: "boolean" vdb: type: "object" id: "schema:kubling:dbvirt:config:app:VirtualDatabase" properties: descriptorBundle: type: "string" http: type: "object" id: "schema:kubling:dbvirt:config:app:HttpApplicationProperties" properties: tls: type: "object" id: "schema:kubling:dbvirt:config:app:HttpTlsProperties" properties: storeType: type: "string" description: "TLS certificate store type (do not change if certificates\ \ were generated with Kubling CLI)." storeFilePath: type: "string" description: "Location of the certificate store file." storePassword: type: "string" description: "Certificate store password." entryAlias: type: "string" description: "Certificate store entry name/alias (do not change if certificates\ \ were generated with Kubling CLI)." minimumTlsVersion: type: "string" description: "Minimum TLS protocol version accepted by the server. Use\ \ TLS_1_2 to allow TLS 1.2 and TLS 1.3; use TLS_1_3 to require TLS 1.3\ \ only. Default: TLS_1_3." enum: - "TLS_1_2" - "TLS_1_3" corsAllowedOrigins: type: "array" description: "Browser origins allowed to access the HTTP API through CORS." items: type: "string" console: type: "object" id: "schema:kubling:dbvirt:config:app:Console" properties: moduleRepoBaseURI: type: "string" description: "URL of the repository used to resolve modules. Used also when\ \ resolving URI with 'kbl' scheme." cache: type: "object" id: "schema:kubling:dbvirt:config:app:EngineCacheProperties" properties: sessionScoped: type: "boolean" description: "Indicates whether the cache entries are scoped to individual\ \ sessions. When set to false, the cache is shared across all sessions.\ \ Default is false." maxEntries: type: "integer" description: "Maximum number of entries allowed in the cache, used when maxMemorySizeMB\ \ is not defined. Default is 1024." maxMemorySizeMB: type: "integer" description: "Maximum allowed memory size for this cache. By default, the\ \ Engine ignores this setting and limits the cache solely by maxEntries.\ \ However, when enabled, the Engine estimates the memory size of each cache\ \ entry, which may significantly impact cache performance. Use this option\ \ only when strict memory constraints are necessary." enableInvalidateEndpoint: type: "boolean" description: "Enables the endpoint to invalidate the cache for specified table\ \ when set to true. Default is false." buffer: type: "object" id: "schema:kubling:dbvirt:config:app:BufferConfig" properties: useDisk: type: "boolean" description: "When enabled, the Engine uses also disk storage for the buffer\ \ instead of memory only. Default is true." encrypt: type: "boolean" description: "Specifies whether the buffer should be encrypted. Default is\ \ true." directory: type: "string" description: "Directory for buffer storage. If useDisk is activated and directory\ \ not specified, the engine will use the system-defined temporary directory\ \ path." rocksBackedBuffer: type: "object" id: "schema:kubling:dbvirt:config:app:RocksBackedBufferConfig" properties: enabled: type: "boolean" description: "Enables the RocksDB-backed buffer implementation. When disabled,\ \ the default file-based buffering mechanism is used." maxStorageSpace: type: "integer" description: "Maximum amount of disk space (in bytes) that Rocks-backed\ \ buffer storage is allowed to consume." maxOpsPerCommit: type: "integer" description: "Maximum number of write operations accumulated before a\ \ RocksDB batch commit is executed. Higher values improve write throughput\ \ but increase memory usage and commit latency." maxOpenFiles: type: "integer" description: "Maximum number of RocksDB files that may remain open simultaneously.\ \ Higher values improve read performance but increase file descriptor\ \ usage." writeBufferSize: type: "integer" description: "Size of the RocksDB write buffer (memtable) in bytes. Larger\ \ buffers improve write throughput but consume more memory." backgroundThreads: type: "integer" description: "Number of background compaction and flush threads used by\ \ RocksDB." inlineLobThresholdBytes: type: "integer" description: "Maximum size (in bytes) for LOB values that may be inlined\ \ inside RocksDB-backed tuple batches. LOBs larger than this threshold\ \ will be streamed to file store instead." maxConcurrentJSContexts: type: "integer" description: "Maximum allowed concurrent script contexts for query resolution." maxConcurrentAuthJSContexts: type: "integer" description: "Maximum allowed concurrent script contexts for auth*." properties: type: "object" description: "Fixed properties that are not expected to change frequently. Useful\ \ for embedding configurations directly into the application configuration instead\ \ of relying on an external properties file." additionalProperties: type: "string" propertiesFilePath: type: "string" description: "Properties file location." softTransactions: type: "object" id: "schema:kubling:dbvirt:config:app:SoftTransactionProperties" properties: enabled: type: "boolean" transactionsDBPath: type: "string" flushRemovalTaskCron: type: "string" description: "Cron expression for periodic transaction DB flush of removed\ \ segments. Default is every 5 minutes. Use a standard cron format, e.g.,\ \ '0 0/5 * * * *'." crashCompensationEnabled: type: "boolean" description: "If true, Kubling scans the soft-transaction store on startup\ \ and executes pending compensations that were registered before a crash.\ \ If false, persisted compensations are ignored after a crash." crashCompensationMaxAgeMinutes: type: "integer" description: "Maximum age in minutes for a persisted compensation entry to\ \ be considered for execution after a crash. Older entries are treated as\ \ expired and will not be executed on startup." kublingAgent: type: "object" id: "schema:kubling:dbvirt:config:app:KublingAgent" properties: instanceIdentifier: type: "string" enabled: type: "boolean" api: type: "object" id: "schema:kubling:dbvirt:model:agent:KublingAgentUpstreamAPI" properties: baseURL: type: "string" description: "Base URL of the Agent API." userAgent: type: "string" description: "User agent." registerInstance: type: "object" id: "schema:kubling:dbvirt:model:agent:AgentAPIEndpoint" description: "API endpoint for registering an instance." properties: httpMethod: type: "string" description: "HTTP method to be used for the request. Supported methods:\ \ GET, POST, PUT, PATCH, HEAD, CONNECT, DELETE, OPTIONS, TRACE." path: type: "string" description: "Relative endpoint path that, when combined with the\ \ base URL, forms the final request URL. If a full URL is provided,\ \ the base URL will be ignored." headers: type: "object" description: "Custom headers to be included in this specific request.\ \ Any value enclosed in '{{' and '}}' will be dynamically replaced\ \ by the corresponding environment variable." additionalProperties: type: "string" unregisterInstance: type: "object" $ref: "schema:kubling:dbvirt:model:agent:AgentAPIEndpoint" description: "API endpoint for unregistering an instance." statementGenerator: type: "object" $ref: "schema:kubling:dbvirt:model:agent:AgentAPIEndpoint" description: "API endpoint for generating a general SQL statement." executableStatementGenerator: type: "object" $ref: "schema:kubling:dbvirt:model:agent:AgentAPIEndpoint" description: "API endpoint for generating an executable Kubling SQL statement." investigation: type: "object" $ref: "schema:kubling:dbvirt:model:agent:AgentAPIEndpoint" description: "API endpoint for conducting an automated investigation." keepAlive: type: "object" id: "schema:kubling:dbvirt:model:agent:KeepAliveEndpoint" properties: activated: type: "boolean" statementGenerator: type: "object" $ref: "schema:kubling:dbvirt:model:agent:AgentAPIEndpoint" description: "API endpoint for sending a keep alive message." cron: type: "string" description: "CRON expression." headers: type: "object" description: "Custom headers to be included in all requests. Any value\ \ enclosed in '{{' and '}}' will be dynamically replaced by the corresponding\ \ environment variable." additionalProperties: type: "string" instrumentation: type: "object" id: "schema:kubling:dbvirt:config:app:InstrumentationProperties" properties: metrics: type: "object" id: "schema:kubling:dbvirt:config:app:instrumentation:MetricsProperties" properties: metricsCommonTags: type: "object" description: "Tags added to exposed metrics. Useful for identifying engine\ \ instances." additionalProperties: type: "string" azureMonitor: type: "object" id: "schema:kubling:dbvirt:config:app:instrumentation:AzureMonitorProperties" properties: enabled: type: "boolean" connectionString: type: "string" openTelemetry: type: "object" id: "schema:kubling:dbvirt:config:app:instrumentation:OpenTelemetryConfig" properties: enabled: type: "boolean" description: "Enables or disables OpenTelemetry instrumentation for\ \ this component. When set to false, no telemetry data (metrics,\ \ traces, or logs) will be emitted. Default: false." stepInMillis: type: "integer" description: "The collection or reporting interval in milliseconds.\ \ Controls how often aggregated telemetry data is emitted. Lower\ \ values increase resolution but also CPU and network usage. Default:\ \ 5000 ms." url: type: "string" description: "The target OTLP endpoint where telemetry data will be\ \ exported. Supports both HTTP and gRPC protocols depending on exporter\ \ configuration. Example: http://localhost:4318 or grpc://localhost:4317." resourceAttributes: type: "object" description: "A set of additional resource-level attributes applied\ \ to all telemetry emitted by this instance." additionalProperties: type: "string" headers: type: "object" description: "Additional HTTP or gRPC headers to include in each telemetry\ \ export request. Commonly used for authentication tokens or custom\ \ tenant headers." additionalProperties: type: "string" temporality: type: "string" description: "The aggregation temporality used for metrics. Determines\ \ whether reported values are cumulative since process start (CUMULATIVE)\ \ or represent deltas since the last export (DELTA). Default: CUMULATIVE." enum: - "DELTA" - "CUMULATIVE" dataDog: type: "object" id: "schema:kubling:dbvirt:config:app:instrumentation:DatadogConfig" properties: enabled: type: "boolean" stepInMillis: type: "integer" url: type: "string" apiKey: type: "string" hostTag: type: "string" tracing: type: "object" id: "schema:kubling:dbvirt:config:app:instrumentation:TracingProperties" properties: scheduleDelayInSeconds: type: "integer" description: "The delay interval (in seconds) between each batch export\ \ operation. Controls how frequently accumulated telemetry data is flushed\ \ to the exporter. Default: 5 seconds." maxExportBatchSize: type: "integer" description: "The maximum number of telemetry items (spans, logs, etc.)\ \ included in a single export batch. Larger batches improve throughput\ \ but may increase export latency. Default: 512." maxQueueSize: type: "integer" description: "The maximum number of telemetry records that can be queued\ \ for export. If the queue reaches its capacity, new records may be\ \ dropped. Default: 512." exporterTimeoutInSeconds: type: "integer" description: "The maximum time (in seconds) allowed for a single export\ \ attempt. If the exporter does not complete within this timeout, the\ \ batch is considered failed. Default: 6 seconds." enabled: type: "boolean" url: type: "string" headers: type: "object" additionalProperties: type: "string" includeQueryPlan: type: "boolean" includeFullCommand: type: "boolean" includeRequestIdSpanAttribute: type: "boolean" sampling: type: "number" description: "The sampling ratio applied to telemetry data. A value of\ \ 1.0 means all telemetry is sampled; lower values reduce the volume\ \ by randomly selecting a fraction of events. Default: 1.0 (always sample)." logs: type: "object" id: "schema:kubling:dbvirt:config:app:instrumentation:LogsProperties" properties: scheduleDelayInSeconds: type: "integer" description: "The delay interval (in seconds) between each batch export\ \ operation. Controls how frequently accumulated telemetry data is flushed\ \ to the exporter. Default: 5 seconds." maxExportBatchSize: type: "integer" description: "The maximum number of telemetry items (spans, logs, etc.)\ \ included in a single export batch. Larger batches improve throughput\ \ but may increase export latency. Default: 512." maxQueueSize: type: "integer" description: "The maximum number of telemetry records that can be queued\ \ for export. If the queue reaches its capacity, new records may be\ \ dropped. Default: 512." exporterTimeoutInSeconds: type: "integer" description: "The maximum time (in seconds) allowed for a single export\ \ attempt. If the exporter does not complete within this timeout, the\ \ batch is considered failed. Default: 6 seconds." url: type: "string" headers: type: "object" additionalProperties: type: "string" core: type: "object" id: "schema:kubling:dbvirt:config:app:instrumentation:CommonLogsProperties" properties: enabled: type: "boolean" level: type: "string" enum: - "DEBUG" - "INFO" - "WARN" - "ERROR" consoleEcho: type: "boolean" script: type: "object" $ref: "schema:kubling:dbvirt:config:app:instrumentation:CommonLogsProperties" agentic: type: "object" $ref: "schema:kubling:dbvirt:config:app:instrumentation:CommonLogsProperties" openTelemetryCommonAttributes: type: "object" id: "schema:kubling:dbvirt:config:app:instrumentation:OpenTelemetryCommonAttributesProperties" properties: serviceName: type: "string" description: "Logical name of the service emitting telemetry. This value\ \ identifies the service across metrics, traces, and logs. Example:\ \ 'kubling'." serviceNamespace: type: "string" description: "Namespace of the service, used to logically group related\ \ services. Commonly corresponds to an application or project namespace.\ \ Example: 'kai-mad-1', 'switches', 'data-platform' or 'sensors'." serviceInstance: type: "string" description: "Unique identifier for this specific service instance. Typically\ \ corresponds to a pod ID, container ID, or host name. Example: 'pod-12345'\ \ or 'instance-a1b2c3'. Or if you are federating examples are: 'kai-mad-1',\ \ 'mad1-hall1-device123." environment: type: "string" description: "Logical deployment environment of the service. Common values\ \ include 'dev', 'staging', 'prod', or any custom environment name.\ \ Example: 'prod' or 'qa'." performanceTracer: type: "object" id: "schema:kubling:dbvirt:config:app:perftracer:PerformanceTracerProperties" properties: enabled: type: "boolean" printToLogger: type: "boolean" jsonFile: type: "object" id: "schema:kubling:dbvirt:config:app:perftracer:PerformanceTracerJsonFileProperties" properties: enabled: type: "boolean" description: "Enables or disables the JSON file-based performance tracing\ \ collector.\n\nWhen enabled, performance events (query lifecycle, source\ \ executions, buffer activity, etc.)\nwill be persisted to disk as JSON\ \ files according to the configured flushing strategy.\n\nWhen disabled,\ \ no JSON files will be generated.\n" directoryPath: type: "string" description: "Directory path where performance tracing JSON files will\ \ be written.\n\nDefaults to a 'perftracer' directory under the application's\ \ working directory.\nThe directory will be created if it does not exist.\n\ \nThis location should be writable by the application process and may\ \ require sufficient\ndisk space depending on the volume of traced events.\n" flushOnAppTermination: type: "boolean" description: "Controls when buffered performance events are flushed to\ \ disk.\n\nIf set to true, all collected events are retained in memory\ \ and written to disk only\nonce, during application shutdown. This\ \ mode minimizes I/O overhead but increases\nmemory usage and risks\ \ losing data on unexpected termination.\n\nIf set to false, events\ \ are flushed incrementally (e.g. on query completion),\nproducing smaller,\ \ per-query JSON files and enabling near real-time inspection.\n" database: type: "object" id: "schema:kubling:dbvirt:config:app:perftracer:PerformanceTracerDatabaseProperties" properties: enabled: type: "boolean" description: "Enables or disables the database-backed performance tracing\ \ collector.\n\nWhen enabled, Kubling will automatically create and\ \ register a dedicated Virtual Database (VDB)\ncontaining performance\ \ tracing data. This allows querying execution metrics (queries, source\n\ executions, buffer activity, etc.) using standard SQL.\n\nWhen disabled,\ \ no tracing VDB will be created and no performance data will be exposed\ \ via the engine.\n" vdbName: type: "string" description: "Name of the Virtual Database (VDB) that will be created\ \ to expose performance tracing data.\n\nThe VDB is dynamically initialized\ \ when performance tracing is enabled and contains a predefined\nschema\ \ with tables representing query lifecycle events, source executions,\ \ and other internal metrics.\n\nThis name must be unique within the\ \ engine. If a VDB with the same name already exists, it may be\noverridden\ \ or cause initialization conflicts depending on the runtime configuration.\n" schemaName: type: "string" description: "Name of the schema (logical model) within the performance\ \ tracing VDB.\n\nThis schema contains the predefined tables that expose\ \ performance tracing data,\nsuch as query executions, source executions,\ \ and buffer events.\n\nIt is used as the logical namespace for querying\ \ tracing data via SQL, for example:\nSELECT * FROM <vdbName>.<schemaName>.query_execution.\n\ \nThe name should be unique within the VDB and follow standard identifier\ \ conventions.\n" directoryPath: type: "string" description: "Path to directory where to store the database." weights: type: "object" id: "schema:kubling:dbvirt:config:app:perftracer:PerformanceTracerWeightsProperties" properties: latency: type: "number" description: "Weight assigned to end-to-end query latency when computing\ \ the composite performance score.\n\nThis represents user-perceived\ \ performance and is typically the most critical dimension.\nHigher\ \ values prioritize faster query completion time over resource efficiency.\n\ \nUnit: applied to duration in nanoseconds (ts_end - ts_start).\n\ \nRecommended baseline: 0.6\n" io: type: "number" description: "Weight assigned to data access cost, approximated by\ \ the total number of rows read from sources.\n\nThis reflects pushdown\ \ efficiency and overall I/O pressure. Higher values penalize\n\ plans that over-fetch data or rely on full scans instead of indexed\ \ access.\n\nUnit: applied to rows_read aggregated across all source\ \ executions.\n\nRecommended baseline: 0.3\n" buffer: type: "number" description: "Weight assigned to intermediate data processing overhead,\ \ measured via buffer usage.\n\nThis captures memory pressure and\ \ internal materialization cost (e.g., joins, sorts,\naggregations).\ \ Higher values penalize plans that require large intermediate datasets.\n\ \nUnit: applied to total buffer bytes used during query execution.\n\ \nRecommended baseline: 0.1\n" compressQueries: type: "boolean" description: "Enables compression of captured query text before persistence\ \ using Kubling's built-in \"compress\" function.\nStored queries can\ \ be restored using the \"decompress\" function.\nRecommended for high-volume\ \ tracing or long-running scenarios.\n" scriptingEngine: type: "object" id: "schema:kubling:dbvirt:config:app:ScriptingEngineProperties" properties: vectorLevel: type: "string" description: "Defines the CPU vectorization level used to tune the scripting\ \ engine execution strategy. This setting determines how aggressively the\ \ engine enables runtime optimizations. Higher levels allow better performance\ \ but may rely on advanced CPU instructions (e.g. AVX, AVX2, AVX-512), while\ \ lower levels prioritize compatibility and stability across a wider range\ \ of hardware. If not explicitly set, Kubling may determine an appropriate\ \ level automatically based on the runtime environment." enum: - "BASIC" - "ADVANCED" - "EXTREME"

Bundles

Descriptor bundle information file (bundle-info.yaml)

--- type: "object" id: "schema:kubling:dbvirt:model:vdb:BundleInfo" properties: virtualDatabases: type: "array" description: "List of Virtual Database location, relative to this bundle info\ \ location inside the module." items: type: "string" authentication: type: "object" id: "schema:kubling:dbvirt:model:vdb:Authentication" properties: scriptFilePath: type: "string" description: "Path to the authenticator script, relative to this bundle info\ \ location inside the module." module: type: "object" id: "schema:kubling:dbvirt:translation:scripting:base:model:Module" properties: name: type: "string" zipFilePath: type: "string" description: "URI of the module bundle." scheduledScripts: type: "array" items: type: "object" id: "schema:kubling:dbvirt:model:vdb:DescriptorScheduledScript" properties: cron: type: "string" description: "CRON expression." scriptFilePath: type: "string" description: "Path to the script, relative to this bundle info location\ \ inside the module." module: type: "object" $ref: "schema:kubling:dbvirt:translation:scripting:base:model:Module" initScriptFilePath: type: "string" description: "Bundle-level initialization Script. It runs after all Data Sources\ \ are loaded and their metadata processed and available." actionsDirectory: type: "string" description: "Directory with action descriptor files, relative to this bundle\ \ info location inside the module." queryEndpointsDirectory: type: "string" description: "Directory with query descriptor files, relative to this bundle info\ \ location inside the module." actionTemplatesFunctionModules: type: "array" items: type: "object" $ref: "schema:kubling:dbvirt:translation:scripting:base:model:Module" sqlFunctionModules: type: "array" items: type: "object" $ref: "schema:kubling:dbvirt:translation:scripting:base:model:Module" endpointScripts: type: "object" id: "schema:kubling:dbvirt:model:endpoint:script:EndpointScripts" properties: maxContexts: type: "integer" description: "Maximum Script contexts to be added to the pool per partition.\ \ Once reached, subsequent function execution requests will be enqueued.\ \ The overall total Maximum Script contexts must be calculated per partition,\ \ that is: partitions * maxContexts. Default: 50" maxWaitMilliseconds: type: "integer" description: "Maximum wait time in milliseconds the thread will wait in the\ \ queue for a Script context from the pool. Once reached, an error is thrown\ \ if no available context.Default: 10000ms (10s)" endpoints: type: "array" items: type: "object" id: "schema:kubling:dbvirt:model:endpoint:script:EndpointScript" properties: endpointVersion: type: "string" description: "Endpoint version." endpointName: type: "string" description: "Name of the HTTP endpoint." scriptFilePath: type: "string" description: "Relative path to the function script, based on the location\ \ of this bundle information within the module." httpMethod: type: "string" enum: - "DELETE" - "GET" - "PATCH" - "POST" - "PUT" requiresAuthentication: type: "boolean" description: "If true, the endpoint requires an authenticated HTTP request\ \ before execution. Authentication is resolved through the configured\ \ Kubling Authentication Script Delegate. When enabled, the authenticated\ \ identity and its roles are propagated to the endpoint execution\ \ context and used for RBAC enforcement during DBEngine operations.\ \ Default: false"

Sample

virtualDatabases: - 'vdb/AppModelVDB.yaml' actionsDirectory: 'endpoint/actions' queryEndpointsDirectory: 'endpoint/queries' actionTemplatesFunctionModule: zipFilePath: "{{ FUNCTIONS_BUNDLE }}"

Script Module bundle information file (bundle-script-info.yaml)

--- type: "object" id: "schema:kubling:dbvirt:translation:scripting:base:model:ScriptingBundleInfo" properties: initScript: type: "object" id: "schema:kubling:dbvirt:translation:scripting:base:model:ScriptMetadata" properties: submodule: type: "string" description: "DEPRECATED" scriptFilePath: type: "string" description: "Relative path to the script, based on the location of this bundle\ \ info within the module." resultSetScript: type: "object" $ref: "schema:kubling:dbvirt:translation:scripting:base:model:ScriptMetadata" insertScript: type: "object" $ref: "schema:kubling:dbvirt:translation:scripting:base:model:ScriptMetadata" updateScript: type: "object" $ref: "schema:kubling:dbvirt:translation:scripting:base:model:ScriptMetadata" deleteScript: type: "object" $ref: "schema:kubling:dbvirt:translation:scripting:base:model:ScriptMetadata" handlersAutoDiscoveryPath: type: "string" description: "Directory path used for automatic discovery of table handler scripts.\ \ Kubling scans all JavaScript modules in this folder and registers them as\ \ handlers based on their file name." scheduledScripts: type: "array" items: type: "object" id: "schema:kubling:dbvirt:translation:scripting:base:model:ScheduledScript" properties: cron: type: "string" description: "CRON expression." submodule: type: "string" description: "DEPRECATED" scriptFilePath: type: "string" description: "Relative path to the script, based on the location of this\ \ bundle info within the module." contextVariables: type: "array" description: "List of variables used by the module." items: type: "object" id: "schema:kubling:dbvirt:translation:scripting:base:model:BundleContextVariable" properties: name: type: "string" sensitive: type: "boolean" failIfMissing: type: "boolean" description: "Indicates whether the module load must fail in case of the\ \ variable value is not present." defaultIfMissing: type: "object" id: "schema:kubling:InnerObject" description: "Default value in case of the variable is not present." name: type: "string" description: "Name of the module, as it will be published in the repository." version: type: "string" description: "Version of the module, as it will be published in the repository." description: type: "string" innerDDLFilePath: type: "string" description: "Relative path to the DDL file, based on the location of this bundle\ \ info within the module." innerTranslatorConfigFilePath: type: "string" description: "Relative path to the translator configuration file, based on the\ \ location of this bundle info within the module."

Sample

name: github version: 0.0.1 description: | This module provides access to various GitHub API endpoints. innerDDLFilePath: "github.ddl" innerTranslatorConfigFilePath: "translator-config.yaml" resultSetScript: scriptFilePath: "GitHubResultSetDelegate.js" contextVariables: - name: "GITHUB_PAT" sensitive: true failIfMissing: true - name: "GITHUB_ORG" failIfMissing: true

Virtual Database information file (located inside the descriptor bundle)

--- type: "object" id: "schema:kubling:dbvirt:model:vdb:VirtualDatabase" properties: name: type: "string" description: "VDB name that will be exposed by the engine. Note that this is the\ \ name must be used when generating the connection URL." version: type: "string" description: "VDB version." description: type: "string" dataSources: type: "array" description: "List of VDB Data Sources." items: type: "object" id: "schema:kubling:dbvirt:model:vdb:DataSource" properties: name: type: "string" description: "Name is also used as schema name if no schema.name is provided." description: type: "string" description: "Provides a description of the schema. Defining a clear and\ \ concise description is crucial for enabling AI Agents/Copilots to accurately\ \ understand the schema's purpose and intended use." dataSourceType: type: "string" description: "Supported source types." enum: - "SCRIPT_JS" - "SCRIPT_DOCUMENT_JS" - "EMBEDDED_INMEM" - "PORTABLE_LOCAL" - "PROVIDER_GRPC" - "CASSANDRA" - "H2" - "MYSQL" - "POSTGRESQL" - "REDIS" - "KUBLING" - "KUBERNETES" - "COMPOSITE" - "ROUTING" - "ROUTING_JS" - "SNMP" - "MODBUS" properties: type: "object" description: "Additional properties injected to template contexts." additionalProperties: type: "string" config: type: "string" description: "Location path of the Data Source configuration file, whose\ \ schema depends on the type.In case the file is located inside the bundle,\ \ path must start with 'bundle:'" configObject: type: "any" description: "Data Source configuration parsed as a YAML object, whose schema\ \ depends on the type.It is only checked when 'config' is not present\ \ or null." translatorConfig: type: "string" description: "Location path of the Translator configuration file.In case\ \ the file is located inside the bundle, path must start with 'bundle:',\ \ in case of the source type is a module, and this configuration file\ \ is located inside the module, path must start with 'module:'." schema: type: "object" id: "schema:kubling:dbvirt:model:vdb:DataSourceSchema" description: "Schema configuration." properties: name: type: "string" type: type: "string" description: "Schema type. By default it is 'PHYSICAL', which is the\ \ right one in almost all cases." enum: - "PHYSICAL" - "VIRTUAL" - "FUNCTION" - "OTHER" properties: type: "object" description: "Additional properties injected to template contexts." additionalProperties: type: "string" cacheDefaultStrategy: type: "string" description: "Defines the default caching strategy for the schema. When\ \ set to CACHE, all tables are cached except those explicitly marked\ \ otherwise. When set to NO_CACHE, all tables are skipped from caching\ \ except those explicitly marked for caching. Default CACHE." enum: - "CACHE" - "NO_CACHE" addColumns: type: "array" description: "Defines additional columns to include in tables when operating\ \ in 'passthrough' mode. This enables extending the table structure\ \ dynamically." items: type: "object" id: "schema:kubling:dbvirt:translation:model:ColumnDefinition" properties: tableNamePattern: type: "string" name: type: "string" type: type: "string" nullable: type: "boolean" directives: type: "object" additionalProperties: type: "string" ddl: type: "string" description: "Content of the DDL used to generate the schema's tables." ddlfilePaths: type: "array" items: type: "string" ddlFilePaths: type: "array" description: "List of location paths of the DDL files.In case the file\ \ is located inside the bundle, path must start with 'bundle:', in\ \ case of the source type is a module, and this configuration file\ \ is located inside the module, path must start with 'module:'." items: type: "string" aggregatorSchemaModels: type: "array" description: "List of schema aggregators." items: type: "object" id: "schema:kubling:dbvirt:model:vdb:AggregatorSchemaModel" properties: name: type: "string" description: "Schema name." schemas: type: "array" description: "List of previously defined schemas that must be aggregated." items: type: "string" tables: type: "array" description: "List of tables of the schemas to be aggregated." items: type: "object" id: "schema:kubling:dbvirt:model:vdb:AggregatorSchemaTable" properties: name: type: "string" description: "Table name." options: type: "object" description: "List of Table options. Supported options are the same\ \ as supported when defining a table in a DDL." additionalProperties: type: "object" id: "schema:kubling:InnerObject" rbacDataRoles: type: "array" description: "List of RBAC data roles." items: type: "object" id: "schema:kubling:dbvirt:model:vdb:rbac:RBACDataRole" properties: name: type: "string" description: "Internal Engine Role name." description: type: "string" description: "Role description." roleNameMappings: type: "array" description: "External role names that are mapped to this internal Engine\ \ role." items: type: "string" allowCreateTemporaryTables: type: "boolean" description: "Indicates whether this Role has permissions to create temp\ \ tables." permissions: type: "array" description: "List of granted/denied permissions." items: type: "object" id: "schema:kubling:dbvirt:model:vdb:rbac:RBACPermission" properties: resource: type: "string" description: "Resource where to apply the permission to. Must be the\ \ fully qualified name, that is [schema].[tables]." resourceType: type: "string" description: "Indicates the type of Resource." enum: - "DATABASE" - "SCHEMA" - "PROCEDURE" - "TABLE" - "FUNCTION" - "COLUMN" - "LANGUAGE" allowCreate: type: "boolean" description: "Indicates whether the Role can CREATE resources." allowRead: type: "boolean" description: "Indicates whether the Role can READ tuples from tables." allowUpdate: type: "boolean" description: "Indicates whether the Role can UPDATE tuples from tables." allowDelete: type: "boolean" description: "Indicates whether the Role can DELETE tuples from tables." allowAlter: type: "boolean" description: "Indicates whether the Role can UPDATE tuples from tables." allowExecute: type: "boolean" description: "Indicates whether the Role can EXECUTE procedures." schemas: type: "array" description: "List of specific schemas where to apply Role's permissions." items: type: "string" superuserRole: type: "object" id: "schema:kubling:dbvirt:model:vdb:rbac:RBACSuperuserRole" description: "Defines an optional RBAC superuser role. When the authentication\ \ delegate returns an external role that matches any of the configured roleNameMappings,\ \ the session is granted a data policy with full privileges on all VDB and System\ \ resources." properties: name: type: "string" description: "Internal Engine Role name." description: type: "string" description: "Role description." roleNameMappings: type: "array" description: "External role names that are mapped to this internal Engine\ \ role." items: type: "string"

Functions

SQL Function Module bundle information file (bundle-sql-function-info.yaml)

--- type: "object" id: "schema:kubling:dbvirt:model:sql:function:SQLFunctionBundleInfo" properties: partitions: type: "integer" description: "Internal Script contexts pool partitions. Default: 2. This is deprecated\ \ and marked for removal." minContexts: type: "integer" description: "Minimum available Script contexts in the pool per partition. The\ \ overall total Minimum Script contexts must be calculated per partition, that\ \ is: partitions * minContexts. Default: 3. This is deprecated and marked for\ \ removal." maxContexts: type: "integer" description: "Maximum Script contexts to be added to the pool per partition. Once\ \ reached, subsequent function execution requests will be enqueued. The overall\ \ total Maximum Script contexts must be calculated per partition, that is: partitions\ \ * maxContexts. Default: 50" maxWaitMilliseconds: type: "integer" description: "Maximum wait time in milliseconds the thread will wait in the queue\ \ for a Script context from the pool. Once reached, an error is thrown if no\ \ available context.Default: 5000ms (5s)" queryFunctions: type: "array" items: type: "object" id: "schema:kubling:dbvirt:model:sql:function:SQLQueryFunctionDefinition" properties: name: type: "string" description: "Function name." description: type: "string" description: "Function description." scriptFilePath: type: "string" description: "Relative path to the function script, based on the location\ \ of this bundle info within the module." parameters: type: "object" description: "A list of function parameters represented as a key-value,\ \ where each entry consists of a parameter name and its corresponding\ \ type." additionalProperties: type: "string" returnType: type: "string" description: "Specifies the Kubling data type returned by the function.\ \ The engine will attempt to convert the script function's return type\ \ into a valid Kubling data type. Note that this conversion might fail\ \ if the types are incompatible." aggregationFunction: type: "boolean" description: "Indicates whether the function is an aggregation function,\ \ which receives an array of values and returns a single summarized value." isDeterministic: type: "boolean" description: "Indicates whether the function returns the same value for\ \ the same parameter values. Deterministic functions are eligible for\ \ caching, which can significantly improve performance." ddlfunctions: type: "array" items: type: "object" id: "schema:kubling:dbvirt:model:sql:function:SQLDDLFunctionDefinition" properties: name: type: "string" description: "Function name." description: type: "string" description: "Function description." scriptFilePath: type: "string" description: "Relative path to the function script, based on the location\ \ of this bundle information within the module." DDLFunctions: type: "array" items: type: "object" $ref: "schema:kubling:dbvirt:model:sql:function:SQLDDLFunctionDefinition"

Sample

minContexts: 5 maxContexts: 10 DDLFunctions: - name: "az_ddl_get_rg" description: "Extracts the resource group name from a given Azure resource ID." scriptFilePath: "fn/azure/ddl/az_ddl_get_rg.js" queryFunctions: - name: "az_get_rg" description: "Extracts the resource group name from a given Azure resource ID." scriptFilePath: "fn/azure/query/sql_get_rg.js" parameters: id: string returnType: string isDeterministic: true - name: "az_simple_agg" description: "Some simple aggregation function." scriptFilePath: "fn/azure/query/az_simple_agg.js" parameters: aggIt: string returnType: integer aggregationFunction: true

Template Function Module bundle information file (bundle-function-info.yaml)

--- type: "object" id: "schema:kubling:dbvirt:model:template:function:TemplateFunctionDefinition" properties: name: type: "string" description: "Function name." params: type: "array" description: "List of function parameter names." items: type: "string" scriptFilePath: type: "string" description: "Relative path to the function script, based on the location of this\ \ bundle info within the module." partitions: type: "integer" description: "Internal Script contexts pool partitions. Default: 2" parallelContexts: type: "integer" description: "Maximum Script contexts to be added to the pool per partition. Once\ \ reached, subsequent function execution requests will be enqueued. The overall\ \ total Maximum Script contexts must be calculated per partition, that is: partitions\ \ * parallelContexts. Default: 5" maxWaitMilliseconds: type: "integer" description: "Maximum wait time in milliseconds the thread will wait in the queue\ \ for a Script context from the pool. Once reached, an error is thrown if no\ \ available context.Default: 10000ms (10s)"

Sample

functions: - name: "get_k8s_component_info" params: - vdb - componentId scriptFilePath: "k8s/get_k8s_component_info.js" parallelContexts: 3 - name: "find_best_cluster_for_deploy" params: - vdb - componentId - env scriptFilePath: "k8s/find_best_cluster_for_deploy.js" - name: "ns_exists" params: - vdb - cluster - namespace scriptFilePath: "k8s/ns_exists.js"

Endpoints

Query endpoint

--- type: "object" id: "schema:kubling:dbvirt:model:query:QueryEndpointBase" properties: type: type: "string" description: "Query type." enum: - "sqlDirect" virtualDatabase: type: "string" description: "Virtual Database the query must be routed to." neededFields: type: "array" description: "Required fields that must be present, in the form of variables,\ \ in the template context." items: type: "string"

Sample

{% set vdb = "k8s" %} {% set tables = getTablesByTags(vdb=_context.vdb, schema="all", tags="kubernetes;deployment") %} --- type: sqlDirect virtualDatabase: {{ vdb }} neededFields: - namespace query: | {% set first = true %} {% for table in tables %} {{ "UNION ALL" | filterValWhenVarFalse(var="first", flip=true) }} SELECT * FROM {{ table }} WHERE metadata__namespace = '{{ namespace }}' {% endfor %} ORDER BY clusterName

Action endpoint

--- type: "object" id: "schema:kubling:dbvirt:model:action:Action" properties: asserters: type: "array" description: "List of simple boolean checks run before action is performed, useful\ \ for testing template variables values." items: type: "object" id: "schema:kubling:dbvirt:model:action:BeforeCheck" properties: name: type: "string" checkValue: type: "boolean" description: "Check result." message: type: "string" description: "Message returned by the endpoint in case of failure." before: type: "array" description: "Verifications performed before the actual operation chain." items: type: "object" id: "schema:kubling:dbvirt:model:action:BeforeOperation" properties: name: type: "string" virtualDatabase: type: "string" description: "Virtual Database the query must be routed to." entity: type: "string" description: "Table (entity) name." filters: type: "array" description: "List of query filters." items: type: "object" id: "schema:kubling:dbvirt:translation:scripting:base:member:filter:FilterValue" properties: field: type: "string" description: "Name of the field to be evaluated." dataType: type: "string" description: "Engine data type of the field." value: type: "object" id: "schema:kubling:InnerObject" description: "Value used by the comparison operation." operation: type: "object" id: "schema:kubling:dbvirt:translation:scripting:base:member:proxy:EnumObject<com:kubling:dbvirt:translation:scripting:base:member:filter:FilterValue:Operation>" properties: value: type: "string" enum: - "EQUAL" - "NOT_EQUAL" - "GREATER_THAN" - "GREATER_THAN_OR_EQUAL" - "LESS_THAN" - "LESS_THAN_OR_EQUAL" assertThat: type: "string" description: "Assertion to be test." enum: - "does_not_exist" - "exists" message: type: "string" description: "Message returned by the endpoint in case of failure." operations: type: "array" description: "The list of operations." items: type: "object" id: "schema:kubling:dbvirt:model:action:Operation" properties: name: type: "string" description: "Operation name." type: type: "string" description: "Operation type." enum: - "insert" - "update" - "delete" virtualDatabase: type: "string" description: "Virtual Database the operation must be routed to." entity: type: "string" description: "Table (entity) name." filters: type: "array" description: "Filter used in case of the operation is an UPDATE or DELETE." items: type: "object" $ref: "schema:kubling:dbvirt:translation:scripting:base:member:filter:FilterValue" valueAssignments: type: "array" description: "List of value assignments." items: type: "object" id: "schema:kubling:dbvirt:model:action:OperationValueAssignment" properties: field: type: "string" description: "Field name." dataType: type: "string" description: "Field data type." value: type: "object" $ref: "schema:kubling:InnerObject" description: "Value to be assigned to the field." jsonValue: type: "object" description: "A Key-Value list transformed to a JSON value. It is\ \ only used when value is not present." additionalProperties: type: "object" $ref: "schema:kubling:InnerObject" specialConversion: type: "string" description: "Useful to compute checksums." enum: - "base64" - "base62" rollback: type: "object" id: "schema:kubling:dbvirt:model:action:OperationRollback" description: "A sub-operation to be triggered in case of failure, in those\ \ situations in which rollback is not automatic." properties: type: type: "string" enum: - "insert" - "update" - "delete" filters: type: "array" items: type: "object" id: "schema:kubling:dbvirt:model:FilterValue" properties: field: type: "string" dataType: type: "string" enum: - "STRING" - "LONG" - "INTEGER" - "DOUBLE" - "BOOLEAN" value: type: "object" $ref: "schema:kubling:InnerObject" operation: type: "string" enum: - "EQUAL" - "NOT_EQUAL" - "GREATER_THAN" - "GREATER_THAN_OR_EQUAL" - "LESS_THAN" - "LESS_THAN_OR_EQUAL" valueAssignments: type: "array" items: type: "object" $ref: "schema:kubling:dbvirt:model:action:OperationValueAssignment" waitUntilEffective: type: "object" id: "schema:kubling:dbvirt:model:action:WaitUntilEffective" description: "A wait loop that verifies a condition. Useful when operation\ \ chain continuity depends on a value fetched from a data source." properties: maxSeconds: type: "integer" description: "Maximum number of seconds to wait in the loop." checkEverySeconds: type: "integer" description: "Seconds to wait before next iteration." byGetting: type: "object" id: "schema:kubling:dbvirt:model:action:ByGetting" properties: fields: type: "array" description: "List of field to get (SELECT)." items: type: "string" usingFilterFields: type: "array" description: "List of field names used in filter (WHERE). Values\ \ used for comparison are taken from the valueAssignments." items: type: "string" usingFilterFieldValuePairs: type: "object" description: "List of field names used in filter (WHERE) along with\ \ the values used for comparison." additionalProperties: type: "object" $ref: "schema:kubling:InnerObject" putInContextVar: type: "string" description: "Name of the Template context variable where to write\ \ the result of the SELECT." skipWhenTrue: type: "boolean" description: "A boolean flag that prevents the operation to be performed\ \ when its value is true." needed: type: "object" id: "schema:kubling:dbvirt:model:action:BeforeNeeded" properties: fields: type: "array" description: "List of field names." items: type: "string"

Sample

{% set vdb = "App" %} {% set componentName = get_k8s_component_info(_context.vdb, _context.component_id) %} {% set clusterSchema = find_best_cluster_for_deploy(_context.vdb, _context.component_id, _context.env) %} {% set selectorUUID = uuid() %} --- needed: fields: - component_id - env - containers before: - name: "Component must exist" virtualDatabase: {{ vdb }} entity: "app_db.COMPONENT" filters: - field: "ID" value: {{ component_id }} operation: EQUAL assertThat: exists message: "Component {{ component_id }} does no exist." - name: "Deployment does not yet exist" virtualDatabase: {{ vdb }} entity: "app_db.COMPONENT_DEPLOYMENT_JOIN" filters: - field: "component_id" value: {{ component_id }} operation: EQUAL - field: "environment" value: {{ env }} operation: "EQUAL" assertThat: does_not_exist message: "Deployment {{ componentName }} of Application {{ app_id }} environment {{ env }} already exists." # ********* OPERATIONS ********* operations: - name: "namespace_insert" type: "insert" virtualDatabase: {{ vdb }} entity: "{{ clusterSchema }}.NAMESPACE" skipWhenTrue: {{ ns_exists(_context.vdb, _context.clusterSchema, _context.component_id) }} valueAssignments: - field: "metadata__name" value: "{{ component_id }}" waitUntilEffective: maxSeconds: 15 checkEverySeconds: 5 byGetting: fields: - "metadata__name" usingFilterFieldValuePairs: metadata__name: "{{ component_id }}" status__phase: "Active" - name: "deployment_insert" type: "insert" virtualDatabase: {{ vdb }} entity: "{{ clusterSchema }}.DEPLOYMENT" valueAssignments: - field: "identifier" value: "xxx" - field: "metadata__namespace" value: "{{ component_id }}" - field: "metadata__name" value: "{{ componentName }}" - field: "spec__template__metadata__labels" dataType: "json" value: mgmt.kubling.com/managed: "appmodel" mgmt.kubling.com/uid: {{ selectorUUID }} - field: "spec__selector__matchLabels" dataType: "json" value: mgmt.kubling.com/managed: "appmodel" mgmt.kubling.com/uid: {{ selectorUUID }} - field: "spec__template__spec__containers" dataType: "json" value: {% for container in fromYamlArrayToIterable(containers) %} - name: {{ container.name }} image: {{ container.image }} imagePullPolicy: IfNotPresent {% for envEntry in fromYamlArrayToIterable(container.env) %} env: - name: {{ envEntry.name }} value: {{ envEntry.value }} {% endfor %} resources: requests: cpu: {{ container.cpuRequest }} memory: {{ container.memRequest }} {% for port in fromYamlArrayToIterable(container.ports) %} ports: - containerPort: {{ port.portNumber }} {% endfor %} {% endfor %} waitUntilEffective: maxSeconds: 60 checkEverySeconds: 5 byGetting: fields: - "identifier" usingFilterFields: - "metadata__namespace" - "metadata__name" putInContextVar: newAppliedDeployment - name: "join_insert" type: "insert" virtualDatabase: {{ vdb }} entity: "app_db.COMPONENT_DEPLOYMENT_JOIN" valueAssignments: - field: "component_id" value: "{{ component_id }}" - field: "environment" value: "{{ env }}" - field: "deployment_identifier" value: "{{ deferValueProcessing(contextVar='newAppliedDeployment.identifier') }}"

Data Sources

Standard DB Data Source Configuration

Applies to the following Data Source types:

  • KUBLING
  • EMBEDDED_INMEM
  • MYSQL
  • POSTGRESQL
--- type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:BaseDatabaseSourceConfig" properties: dataSourceName: type: "string" description: "Internal Engine data source name." serverAddress: type: "string" description: "Address of the remote data source." serverPort: type: "integer" description: "Port where the remote data source is listening for connections." databaseName: type: "string" description: "Remote Data Base name." userName: type: "string" description: "Username used to establish the connection." token: type: "string" description: "Token or password used to establish the connection." maxConnectionPoolSize: type: "integer" description: "Maximum number of connections the Engine will open. Default: 5" minConnectionPoolSize: type: "integer" description: "Minimum number of connections the Engine will keep open. Default:\ \ 1" maxConnectionIdleMilliseconds: type: "integer" description: "Maximum time in milliseconds a connection can live in the pool without\ \ being used. Once reached, the connection is closed and removed from the pool.Default:\ \ 7200000ms (2 hours)" maxConnectionLifeTimeMilliseconds: type: "integer" description: "Maximum time in milliseconds a connection can live in the pool.\ \ Once reached, the connection is closed and removed from the pool. In case\ \ of pool size is less than minConnectionPoolSize after the removal, a new fresh\ \ connection is created.Default: 14400000ms (4 hours)" cache: type: "object" id: "schema:kubling:dbvirt:translation:model:CacheDataSourceConfig" properties: enabled: type: "boolean" description: "Specifies whether the cache is enabled for this Data Source.\ \ Default is false." ttlSeconds: type: "integer" description: "The time-to-live (TTL) for cache entries, in seconds. Default\ \ is 43,200 seconds (12 hours)." allowBruteForceOperations: type: "boolean" description: "Allows the engine to perform Update and Delete operations using\ \ all fields as a fallback when no other way to identify rows is available.\ \ It is only useful when Kubling's side generated fields are present in the\ \ condition clause of the operation, otherwise the operations are pushed as-is." softTransactions: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:SoftTransactionsSourceGeneralConfig" properties: enabled: type: "boolean" description: "Enables soft-transaction processing. When enabled, write operations\ \ are captured and applied at transaction boundaries (prepare/commit), without\ \ requiring the underlying system to provide transactional guarantees. Defaults\ \ to false." strategy: type: "string" description: "Defines how soft transactions should be handled for this data\ \ source. DEFER_OPERATION: write operations are staged and executed only\ \ at commit time. IMMEDIATE_OPERATION: write operations are executed immediately\ \ but also recorded in the transaction log for potential rollback. Exact\ \ semantics vary by data source type. See source type-specific documentation.Defaults\ \ to DEFER_OPERATION." enum: - "IMMEDIATE_OPERATION" - "DEFER_OPERATION" mvcc: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:MVCCSimConfig" description: "Enables the simulated MVCC engine for the data source. Defaults\ \ to disabled." properties: enabled: type: "boolean" description: "Enables the MVCC simulation layer. When enabled, Kubling\ \ maintains transaction-local visibility using versioned records. Rows\ \ inserted, deleted or updated inside the transaction will override\ \ values returned by the remote data source. Defaults to false." dbBasePath: type: "string" description: "Optional path to the RocksDB directory used to store MVCC\ \ state locally. If not provided, Kubling will allocate an isolated\ \ temporary directory." contributesToHealth: type: "boolean" description: "Indicates whether this data source contributes to the engine's overall\ \ health status. When set to true, if this data source is not healthy, the engine\ \ will be marked as unhealthy. Otherwise, the health status of this data source\ \ is ignored in the overall assessment." dataSourceProperties: type: "object" additionalProperties: type: "string" ddl: type: "string" description: "Allows to run a DDL in the REMOTE data source once the connection\ \ is established." ddlfilePaths: type: "array" items: type: "string"

Script Document Data Source Configuration

Applies to the following Data Source types:

  • SCRIPT_DOCUMENT_JS
--- type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:script:ScriptingSourceConfig" properties: contextVariables: type: "object" description: "Additional variables to add to the Script context." additionalProperties: type: "object" id: "schema:kubling:InnerObject" contextOptions: type: "object" description: "Additional options to add to the Script context." additionalProperties: type: "string" module: type: "object" id: "schema:kubling:dbvirt:translation:scripting:base:model:Module" properties: name: type: "string" zipFilePath: type: "string" description: "URI of the module bundle." cache: type: "object" id: "schema:kubling:dbvirt:translation:model:CacheDataSourceConfig" properties: enabled: type: "boolean" description: "Specifies whether the cache is enabled for this Data Source.\ \ Default is false." ttlSeconds: type: "integer" description: "The time-to-live (TTL) for cache entries, in seconds. Default\ \ is 43,200 seconds (12 hours)." supportsPreCommit: type: "boolean" softTransactions: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:SoftTransactionsMvccSupportConfig" properties: enabled: type: "boolean" description: "Enables soft-transaction processing. When enabled, write operations\ \ are captured and applied at transaction boundaries (prepare/commit), without\ \ requiring the underlying system to provide transactional guarantees. Defaults\ \ to false." strategy: type: "string" description: "Defines how soft transactions should be handled for this data\ \ source. DEFER_OPERATION: write operations are staged and executed only\ \ at commit time. IMMEDIATE_OPERATION: write operations are executed immediately\ \ but also recorded in the transaction log for potential rollback. Exact\ \ semantics vary by data source type. See source type-specific documentation.Defaults\ \ to DEFER_OPERATION." enum: - "IMMEDIATE_OPERATION" - "DEFER_OPERATION" mvcc: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:MVCCSimConfig" description: "Enables the simulated MVCC engine for the data source. When\ \ enabled, Kubling maintains per-transaction visibility using an internal\ \ RocksDB-backed MVCC store. This allows DELETE/UPDATE/INSERT operations\ \ within a transaction to override rows returned by your scripts. Defaults\ \ to disabled." properties: enabled: type: "boolean" description: "Enables the MVCC simulation layer. When enabled, Kubling\ \ maintains transaction-local visibility using versioned records. Rows\ \ inserted, deleted or updated inside the transaction will override\ \ values returned by the remote data source. Defaults to false." dbBasePath: type: "string" description: "Optional path to the RocksDB directory used to store MVCC\ \ state locally. If not provided, Kubling will allocate an isolated\ \ temporary directory." contributesToHealth: type: "boolean" description: "Indicates whether this data source contributes to the engine's overall\ \ health status. When set to true, if this data source is not healthy, the engine\ \ will be marked as unhealthy. Otherwise, the health status of this data source\ \ is ignored in the overall assessment."

Portable Local Data Source Configuration

Applies to the following Data Source types:

  • PORTABLE_LOCAL
--- type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:PortableLocalSourceConfig" properties: dataSourceName: type: "string" description: "Internal Engine data source name." serverAddress: type: "string" description: "Address of the remote data source." serverPort: type: "integer" description: "Port where the remote data source is listening for connections." databaseName: type: "string" description: "Remote Data Base name." userName: type: "string" description: "Username used to establish the connection." token: type: "string" description: "Token or password used to establish the connection." maxConnectionPoolSize: type: "integer" description: "Maximum number of connections the Engine will open. Default: 5" minConnectionPoolSize: type: "integer" description: "Minimum number of connections the Engine will keep open. Default:\ \ 1" maxConnectionIdleMilliseconds: type: "integer" description: "Maximum time in milliseconds a connection can live in the pool without\ \ being used. Once reached, the connection is closed and removed from the pool.Default:\ \ 7200000ms (2 hours)" maxConnectionLifeTimeMilliseconds: type: "integer" description: "Maximum time in milliseconds a connection can live in the pool.\ \ Once reached, the connection is closed and removed from the pool. In case\ \ of pool size is less than minConnectionPoolSize after the removal, a new fresh\ \ connection is created.Default: 14400000ms (4 hours)" cache: type: "object" id: "schema:kubling:dbvirt:translation:model:CacheDataSourceConfig" properties: enabled: type: "boolean" description: "Specifies whether the cache is enabled for this Data Source.\ \ Default is false." ttlSeconds: type: "integer" description: "The time-to-live (TTL) for cache entries, in seconds. Default\ \ is 43,200 seconds (12 hours)." allowBruteForceOperations: type: "boolean" description: "Allows the engine to perform Update and Delete operations using\ \ all fields as a fallback when no other way to identify rows is available.\ \ It is only useful when Kubling's side generated fields are present in the\ \ condition clause of the operation, otherwise the operations are pushed as-is." softTransactions: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:SoftTransactionsSourceGeneralConfig" properties: enabled: type: "boolean" description: "Enables soft-transaction processing. When enabled, write operations\ \ are captured and applied at transaction boundaries (prepare/commit), without\ \ requiring the underlying system to provide transactional guarantees. Defaults\ \ to false." strategy: type: "string" description: "Defines how soft transactions should be handled for this data\ \ source. DEFER_OPERATION: write operations are staged and executed only\ \ at commit time. IMMEDIATE_OPERATION: write operations are executed immediately\ \ but also recorded in the transaction log for potential rollback. Exact\ \ semantics vary by data source type. See source type-specific documentation.Defaults\ \ to DEFER_OPERATION." enum: - "IMMEDIATE_OPERATION" - "DEFER_OPERATION" mvcc: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:MVCCSimConfig" description: "Enables the simulated MVCC engine for the data source. Defaults\ \ to disabled." properties: enabled: type: "boolean" description: "Enables the MVCC simulation layer. When enabled, Kubling\ \ maintains transaction-local visibility using versioned records. Rows\ \ inserted, deleted or updated inside the transaction will override\ \ values returned by the remote data source. Defaults to false." dbBasePath: type: "string" description: "Optional path to the RocksDB directory used to store MVCC\ \ state locally. If not provided, Kubling will allocate an isolated\ \ temporary directory." contributesToHealth: type: "boolean" description: "Indicates whether this data source contributes to the engine's overall\ \ health status. When set to true, if this data source is not healthy, the engine\ \ will be marked as unhealthy. Otherwise, the health status of this data source\ \ is ignored in the overall assessment." dataSourceProperties: type: "object" additionalProperties: type: "string" filePath: type: "string" description: "Path to file where to store the database." filePassword: type: "string" useKublingDDL: type: "boolean" description: "Indicates that the provided DDL should be interpreted using the\ \ Kubling DDL syntax instead of native H2. When enabled, Kubling will translate\ \ the schema definition into H2-compatible DDL before execution. This mode is\ \ mutually exclusive with migration scripts: when this option is true, the migrationDir\ \ configuration must not be set." ddl: type: "string" description: "Allows to run a DDL in the REMOTE data source once the connection\ \ is established." ddlfilePaths: type: "array" items: type: "string" migrationDir: type: "string" description: "Specifies a directory containing migration scripts. When set, the\ \ ddlFilePaths configuration option is ignored."

Composite Data Source Configuration

Applies to the following Data Source types:

  • COMPOSITE
--- type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:CompositeSourceConfig" properties: dataSourceName: type: "string" description: "Internal Engine data source name." connectionPool: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:ConnectionPool" properties: partitions: type: "integer" description: "Internal connections pool partitions. Default: 2" minConnections: type: "integer" description: "Minimum available connections in the pool per partition. The\ \ overall total Minimum connections must be calculated per partition, that\ \ is: partitions * minConnections. Default: 3" maxConnections: type: "integer" description: "Maximum connections to be added to the pool per partition. Once\ \ reached, subsequent connection requests will be enqueued. The overall\ \ total Maximum connections must be calculated per partition, that is: partitions\ \ * maxConnections. Default: 10" maxWaitMilliseconds: type: "integer" description: "Maximum wait time in milliseconds the thread will wait in the\ \ queue for a connection from the pool. Once reached, an error is thrown\ \ if no available connection.Default: 10000ms (10s)" imports: type: "array" items: type: "object" id: "schema:kubling:dbvirt:translation:model:routing:ImportElement" properties: dataSource: type: "string" tableNamePattern: type: "string" softTransactions: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:SoftTransactionsSourceGeneralConfig" properties: enabled: type: "boolean" description: "Enables soft-transaction processing. When enabled, write operations\ \ are captured and applied at transaction boundaries (prepare/commit), without\ \ requiring the underlying system to provide transactional guarantees. Defaults\ \ to false." strategy: type: "string" description: "Defines how soft transactions should be handled for this data\ \ source. DEFER_OPERATION: write operations are staged and executed only\ \ at commit time. IMMEDIATE_OPERATION: write operations are executed immediately\ \ but also recorded in the transaction log for potential rollback. Exact\ \ semantics vary by data source type. See source type-specific documentation.Defaults\ \ to DEFER_OPERATION." enum: - "IMMEDIATE_OPERATION" - "DEFER_OPERATION" mvcc: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:MVCCSimConfig" description: "Enables the simulated MVCC engine for the data source. Defaults\ \ to disabled." properties: enabled: type: "boolean" description: "Enables the MVCC simulation layer. When enabled, Kubling\ \ maintains transaction-local visibility using versioned records. Rows\ \ inserted, deleted or updated inside the transaction will override\ \ values returned by the remote data source. Defaults to false." dbBasePath: type: "string" description: "Optional path to the RocksDB directory used to store MVCC\ \ state locally. If not provided, Kubling will allocate an isolated\ \ temporary directory."

SNMP Data Source Configuration

Applies to the following Data Source types:

  • SNMP
--- type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:SnmpSourceConfig" properties: version: type: "string" enum: - "V2" - "V3" transport: type: "string" enum: - "UDP" - "TCP" address: type: "string" port: type: "integer" localBindingAddress: type: "string" localBindingPorts: type: "string" description: "A comma-separated list of local UDP ports to bind SNMP requests\ \ to. Supports individual ports (e.g., \"1162\") and port ranges (e.g., \"1162-1164\"\ ). You can mix both formats: \"1162,1164-1166,1170\". All port numbers must\ \ be in the range 1–65535, and ranges must be ordered (start <= end). Kubling\ \ will attempt to bind to these ports in order until one is available." community: type: "string" connectionTimeout: type: "integer" connectionRetries: type: "integer" softTransactions: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:SoftTransactionsMvccSupportConfig" properties: enabled: type: "boolean" description: "Enables soft-transaction processing. When enabled, write operations\ \ are captured and applied at transaction boundaries (prepare/commit), without\ \ requiring the underlying system to provide transactional guarantees. Defaults\ \ to false." strategy: type: "string" description: "Defines how soft transactions should be handled for this data\ \ source. DEFER_OPERATION: write operations are staged and executed only\ \ at commit time. IMMEDIATE_OPERATION: write operations are executed immediately\ \ but also recorded in the transaction log for potential rollback. Exact\ \ semantics vary by data source type. See source type-specific documentation.Defaults\ \ to DEFER_OPERATION." enum: - "IMMEDIATE_OPERATION" - "DEFER_OPERATION" mvcc: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:MVCCSimConfig" description: "Enables the simulated MVCC engine for the data source. When\ \ enabled, Kubling maintains per-transaction visibility using an internal\ \ RocksDB-backed MVCC store. This allows DELETE/UPDATE/INSERT operations\ \ within a transaction to override rows returned by your scripts. Defaults\ \ to disabled." properties: enabled: type: "boolean" description: "Enables the MVCC simulation layer. When enabled, Kubling\ \ maintains transaction-local visibility using versioned records. Rows\ \ inserted, deleted or updated inside the transaction will override\ \ values returned by the remote data source. Defaults to false." dbBasePath: type: "string" description: "Optional path to the RocksDB directory used to store MVCC\ \ state locally. If not provided, Kubling will allocate an isolated\ \ temporary directory." cache: type: "object" id: "schema:kubling:dbvirt:translation:model:CacheDataSourceConfig" properties: enabled: type: "boolean" description: "Specifies whether the cache is enabled for this Data Source.\ \ Default is false." ttlSeconds: type: "integer" description: "The time-to-live (TTL) for cache entries, in seconds. Default\ \ is 43,200 seconds (12 hours)." contributesToHealth: type: "boolean" description: "Indicates whether this data source contributes to the engine's overall\ \ health status. When set to true, if this data source is not healthy, the engine\ \ will be marked as unhealthy. Otherwise, the health status of this data source\ \ is ignored in the overall assessment." oidForHealthCheck: type: "string" description: "The SNMP OID to be used for health checks. Kubling periodically\ \ polls this OID to verify that the target device is reachable and responding.\ \ By default, it uses '1.3.6.1.2.1.1.1.0' (sysDescr.0), which returns the device\ \ description. You can override this with any scalar OID that is known to exist\ \ and respond reliably on the target device." connectionPool: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:ConnectionPool" properties: partitions: type: "integer" description: "Internal connections pool partitions. Default: 2" minConnections: type: "integer" description: "Minimum available connections in the pool per partition. The\ \ overall total Minimum connections must be calculated per partition, that\ \ is: partitions * minConnections. Default: 3" maxConnections: type: "integer" description: "Maximum connections to be added to the pool per partition. Once\ \ reached, subsequent connection requests will be enqueued. The overall\ \ total Maximum connections must be calculated per partition, that is: partitions\ \ * maxConnections. Default: 10" maxWaitMilliseconds: type: "integer" description: "Maximum wait time in milliseconds the thread will wait in the\ \ queue for a connection from the pool. Once reached, an error is thrown\ \ if no available connection.Default: 10000ms (10s)" oidPrefix: type: "string" mibJsonFilePath: type: "string" description: "Absolute path to the JSON file generated by gosmi-json-exporter.\ \ For details, see: https://github.com/kubling-community/gosmi-json-exporter" v3Config: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:SnmpV3Config" properties: username: type: "string" description: "The SNMPv3 username used to authenticate with the target device.\ \ Must match a valid user configured on the SNMP agent." localEngineId: type: "string" description: "The local SNMP engine ID, in hexadecimal string format. If not\ \ set, the engine ID is derived automatically. Only needed in advanced SNMPv3\ \ setups involving Engine ID synchronization." enterpriseId: type: "integer" description: "Enterprise ID used for constructing a local engine ID when it\ \ is autogenerated. This is optional and typically only needed when setting\ \ up a custom SNMP engine identity." engineBoots: type: "integer" description: "Boot counter value for SNMPv3 engine restarts. Used to prevent\ \ replay attacks. Usually left at 0 unless explicitly managing engine state\ \ across restarts." authProtocol: type: "string" description: "Authentication protocol used for SNMPv3 message integrity and\ \ sender verification. Supported values include MD5, SHA, and extended HMAC-based\ \ algorithms." enum: - "MD5" - "SHA" - "HMAC128SHA224" - "HMAC192SHA256" - "HMAC256SHA384" - "HMAC384SHA512" privacyProtocol: type: "string" description: "Privacy (encryption) protocol used to secure SNMPv3 message\ \ contents." enum: - "DES" - "v3DES" - "AES128" - "AES192" - "AES256" authenticationPassphrase: type: "string" description: "The passphrase used for SNMPv3 authentication. Required when\ \ using an authProtocol." privacyPassphrase: type: "string" description: "The passphrase used for SNMPv3 encryption. Required when using\ \ a privacyProtocol." singleEventErrorToleration: type: "boolean" description: "Controls how Kubling handles individual SNMP response errors. When\ \ set to false (default), any response event with an error causes the entire\ \ operation to fail. When set to true, Kubling tolerates single event errors\ \ by skipping the failed OID and continuing to process the remaining ones. Useful\ \ for dealing with partially implemented or unstable SNMP agents."

Modbus Data Source Configuration

Applies to the following Data Source types:

  • Modbus
--- type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:ModbusSourceConfig" properties: address: type: "string" port: type: "integer" transport: type: "string" enum: - "SERIAL" - "TCP" deviceId: type: "integer" timeoutMillis: type: "integer" byteOrder: type: "string" description: "Byte order for multi-register values. BIG_ENDIAN = MSB first (default),\ \ LITTLE_ENDIAN = LSB first." enum: - "BIG_ENDIAN" - "LITTLE_ENDIAN" tlsConfig: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:ModbusTLSConfig" properties: certificates: type: "string" description: "The PEM-encoded certificate chain as a string. This should include\ \ the full client certificate (e.g., content of client.crt). If provided,\ \ it overrides 'certificatesFilePath'." certificatesFilePath: type: "string" description: "Path to a PEM-encoded certificate chain file (e.g., /etc/kubling/client.crt).\ \ This is used only if 'certificates' is not provided." privateKey: type: "string" description: "The PEM-encoded private key as a string. This should match the\ \ client certificate and typically comes from client.key. If provided, it\ \ overrides 'privateKeyFilePath'." privateKeyFilePath: type: "string" description: "Path to a PEM-encoded private key file (e.g., /etc/kubling/client.key).\ \ This is used only if 'privateKey' is not provided." softTransactions: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:SoftTransactionsMvccSupportConfig" properties: enabled: type: "boolean" description: "Enables soft-transaction processing. When enabled, write operations\ \ are captured and applied at transaction boundaries (prepare/commit), without\ \ requiring the underlying system to provide transactional guarantees. Defaults\ \ to false." strategy: type: "string" description: "Defines how soft transactions should be handled for this data\ \ source. DEFER_OPERATION: write operations are staged and executed only\ \ at commit time. IMMEDIATE_OPERATION: write operations are executed immediately\ \ but also recorded in the transaction log for potential rollback. Exact\ \ semantics vary by data source type. See source type-specific documentation.Defaults\ \ to DEFER_OPERATION." enum: - "IMMEDIATE_OPERATION" - "DEFER_OPERATION" mvcc: type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:MVCCSimConfig" description: "Enables the simulated MVCC engine for the data source. When\ \ enabled, Kubling maintains per-transaction visibility using an internal\ \ RocksDB-backed MVCC store. This allows DELETE/UPDATE/INSERT operations\ \ within a transaction to override rows returned by your scripts. Defaults\ \ to disabled." properties: enabled: type: "boolean" description: "Enables the MVCC simulation layer. When enabled, Kubling\ \ maintains transaction-local visibility using versioned records. Rows\ \ inserted, deleted or updated inside the transaction will override\ \ values returned by the remote data source. Defaults to false." dbBasePath: type: "string" description: "Optional path to the RocksDB directory used to store MVCC\ \ state locally. If not provided, Kubling will allocate an isolated\ \ temporary directory." contributesToHealth: type: "boolean" description: "Indicates whether this data source contributes to the engine's overall\ \ health status. When set to true, if this data source is not healthy, the engine\ \ will be marked as unhealthy. Otherwise, the health status of this data source\ \ is ignored in the overall assessment." healthcheckAddress: type: "integer" cache: type: "object" id: "schema:kubling:dbvirt:translation:model:CacheDataSourceConfig" properties: enabled: type: "boolean" description: "Specifies whether the cache is enabled for this Data Source.\ \ Default is false." ttlSeconds: type: "integer" description: "The time-to-live (TTL) for cache entries, in seconds. Default\ \ is 43,200 seconds (12 hours)."

Routing Data Source Configuration

Applies to the following Data Source types:

  • ROUTING
--- type: "object" id: "schema:kubling:dbvirt:model:vdb:sources:SimpleRoutingSourceConfig" properties: strict: type: "boolean" description: "Specifies whether the engine should return an error if no rule matches\ \ the command. When set to false, the engine will use the default routing behavior." defaultTo: type: "string" description: "Specifies the schema to which the command should be routed if no\ \ rule matches, when in non-strict mode. If this value is not provided, the\ \ engine defaults to routing the command to the first schema in the import list." limitEnforcement: type: "string" description: "Controls how LIMIT clauses are enforced across routed branches.\n\ - PER_ROUTE_ONLY: The LIMIT is applied independently to each matching route.\n\ - POST_UNION_ONLY: The LIMIT is applied globally after combining results.\n\ - PER_ROUTE_AND_UNION: The LIMIT is applied both per route and globally (useful\ \ for pagination with fairness)." enum: - "PER_ROUTE_ONLY" - "POST_UNION_ONLY" - "PER_ROUTE_AND_UNION" orderEnforcement: type: "string" description: "Controls how ORDER BY clauses are enforced across routed branches.\n\ - PER_ROUTE: Each route applies its own sorting; global ordering is not guaranteed.\n\ - POST_UNION: Sorting is applied only after merging results from all routes\ \ (ensures global ordering)." enum: - "PER_ROUTE" - "POST_UNION" imports: type: "array" items: type: "object" id: "schema:kubling:dbvirt:translation:model:routing:ImportElement" properties: dataSource: type: "string" tableNamePattern: type: "string" rules: type: "array" items: type: "object" id: "schema:kubling:dbvirt:translation:model:routing:SimpleRoutingRule" properties: tableNamePattern: type: "string" toDataSource: type: "string" field: type: "string" comparison: type: "string" enum: - "EQUAL" - "NOT_EQUAL" - "GREATER_THAN" - "GREATER_THAN_OR_EQUAL" - "LESS_THAN" - "LESS_THAN_OR_EQUAL" value: type: "string"
Last updated on