Microsoft SQL Server destination plugin configuration reference
Latest: v4.3.12
Example Configuration
kind: destination
spec:
name: "mssql"
registry: "github"
path: "cloudquery/mssql"
version: "v4.3.12"
spec:
connection_string: "server=localhost;user id=SA;password=yourStrongP@ssword;port=1433;database=cloudquery;"
# Optional parameters:
# auth_mode: ms
# schema: dbo
# batch_size: 1000 # 1K entries
# batch_size_bytes: 5242880 # 5 MiB
# batch_timeout: 20s
Make sure you use environment variable expansion in production instead of committing the credentials to the configuration file directly.
The Microsoft SQL Server destination utilizes batching, and supports batch_size
and batch_size_bytes
.
Microsoft SQL Server spec
This is the (nested) spec used by the Microsoft SQL Server destination plugin.
-
connection_string
(string
) (required)Connection string to connect to the database. See SDK documentation (opens in a new tab) for more details.
-
auth_mode
(string
) (optional) (default:ms
)If you need to authenticate via Azure Active Directory ensure you specify
azure
value. See SDK documentation (opens in a new tab) for more information. Supported values:ms
connect to Microsoft SQL Server instanceazure
connect to Azure SQL Server instance
-
schema
(string
) (optional) (default:dbo
)Schema name to be used. By default, Microsoft SQL Server destination plugin will use the default (opens in a new tab) schema named
dbo
. -
batch_size
(integer
) (optional) (default:1000
)This parameter controls the maximum amount of items may be grouped together to be written as a single write.
-
batch_size_bytes
(integer
) (optional) (default:5242880
(= 5 MiB))This parameter controls the maximum size of items that may be grouped together to be written as a single write.
-
batch_timeout
(duration
) (optional) (default:20s
(= 20 seconds))This parameter controls the timeout for writing a single batch.
Verbose logging for debug
The Microsoft SQL Server destination can be run in debug mode.
To achieve this pass the log
option to connection_string
.
See SDK documentation (opens in a new tab) for more details.
Note: This will use SDK (opens in a new tab) built-in logging and might output data and sensitive information to logs. Make sure not to use it in production environment.
kind: destination
spec:
name: "mssql"
registry: "github"
path: "cloudquery/mssql"
version: "v4.3.12"
spec:
connection_string: "${MS_SQL_CONN_STRING};log=255"