Configuring an ADF Linked Service Connection for MariaDB
For information on how to enable a connection for use with linked services, see Configuring a Linked Service Connection.
Field labels in this walkthrough follow the BimlFlex Connection Editor, with the connection column that carries each value and the Azure Data Factory property it maps to named alongside.
After selecting MariaDB from the Linked Service Type dropdown, the form required for creating a MariaDB Linked Service will appear.
The MariaDB option is offered on connections that use the MariaDB System Type.
BimlFlex authors the MariaDB linked service at connector version 2.0, with the driver version v2.
Source Only Connector
A MariaDB connection is used as a source. It is not available as a target.
Each object is read through a dataset that carries the table name alone, from its TargetObjectName parameter, and maps it to the ADF tableName property.
The copy source carries the query that BimlFlex composes from the object's columns and source filters, written to the ADF query property, and passes the TargetSchemaName and TargetObjectName parameters.
BimlFlex quotes each identifier in the query with backticks, for example `OrderId`.
Choosing an Authentication Method
| Method | Credentials |
|---|---|
| Basic | User Name and Password, with the Password as text or from an Azure Key Vault secret |
The MariaDB linked service signs in with the User Name and Password. BimlFlex reads no authentication type column for this connector.
Recommendation: Store the Password in Azure Key Vault rather than entering it as plaintext.
Complete Example: Basic Authentication with Azure Key Vault
The values below are made up for illustration.
| Field or Column | Example Value |
|---|---|
| Connect via Integration Runtime | AutoResolveIntegrationRuntime |
LS_Server | mariadb.example.invalid |
LS_Port | 3306 |
LS_Db | orders |
LS_Username | bfx_reader |
LS_PasswordKVS_StoreName | bfx-kv |
LS_PasswordKVS_SecretName | BFX-MariaDbPassword |
From these values the build writes a linked service with version set to 2.0, driverVersion set to v2, the server, port, database and username, a password that references the secret in Azure Key Vault, and no sslMode, so the service default applies.
Required Fields
These values are required for every MariaDB Linked Service connection:
The build reports an error when the Server or the Database Name has no value, and Azure Data Factory requires the User Name and Password.
Optional values are:
Connect via Integration Runtime
Connect via Integration Runtime names the integration runtime for a MariaDB Linked Service connection.
The default value is AutoResolveIntegrationRuntime.
To use another runtime, select it from the dropdown or choose + New to add one.
The custom values that appear in this dropdown can be maintained in Settings under Azure, in the AzureIntegrationRuntime setting.
The value is stored in the connection's LS_ConnectVia_IntegrationRuntime column and maps to the ADF connectVia property.
When the value is AutoResolveIntegrationRuntime, no connectVia property is written and the default Azure integration runtime is used.
When the MariaDB database is located inside an on-premises network, an Azure virtual network, or an Amazon Virtual Private Cloud, Azure Data Factory connects to it through a self-hosted integration runtime.
Server
The Server is the host name or IP address of the MariaDB server (for example, mariadb.example.invalid).
It is stored in the connection's LS_Server column and maps to the ADF server property.
The build reports an error when the Server has no value.
The MariaDB linked service form has no Server field. A value stored in the column is kept when the connection is saved in the form.
Port
The Port is the port number for the connection to the MariaDB server.
It is stored in the connection's LS_Port column and maps to the ADF port property.
When Port is empty and the connection string carries no port key, the linked service carries no port member and the service default applies.
The MariaDB linked service form has no Port field. A value stored in the column is kept when the connection is saved in the form.
Database Name
The Database Name is the name of the MariaDB database.
It is stored in the connection's LS_Db column and maps to the ADF database property.
The build reports an error when the Database Name has no value.
The MariaDB linked service form has no Database Name field. A value stored in the column is kept when the connection is saved in the form.
User Name
The User Name is the name of the user that signs in to the MariaDB database.
It is stored in the connection's LS_Username column and maps to the ADF username property.
When the User Name has no value, no username property is written.
The MariaDB linked service form has no User Name field. A value stored in the column is kept when the connection is saved in the form.
Password
The Password is stored as text in the connection's LS_Password column, or as an Azure Key Vault reference that resolves to the password at runtime.
The Azure Key Vault reference is stored in the LS_PasswordKVS_ fields: AKV Linked Service, Secret Name, and an optional Secret Version.
It is written when both the AKV Linked Service and the Secret Name are filled.
The text password is written as a secure string only when no AKV Linked Service is named, so a connection that carries both forms writes the Azure Key Vault reference alone.
Either form maps to the ADF password property.
The MariaDB linked service form has no Password field. The stored form is kept when the connection is saved in the form: an Azure Key Vault reference keeps its fields and clears the LS_Password column, and a text password with no Azure Key Vault reference beside it is kept.
It is suggested that Azure Key Vault be used in place of manually entering the Password.
Use System Trust Store
Use System Trust Store sets whether the driver uses a CA certificate from the system trust store or from a specified PEM file.
It is stored in the connection's LS_UseSystemTrustStore column.
When the column reads Y or true, the ADF useSystemTrustStore property is written as 1.
Otherwise no useSystemTrustStore property is written, and the service default, Disabled, applies.
The MariaDB linked service form has no Use System Trust Store field. A value stored in the column is kept when the connection is saved in the form.
Driver Version
The Driver Version is stored in the connection's LS_DriverVersion column and maps to the ADF driverVersion property.
When the column is empty, BimlFlex writes v2.
A stored value is written as it stands, except that v1 is written as v2, because version 2.0 of the connector takes the v2 driver alone.
The MariaDB linked service form has no Driver Version field. A value stored in the column is kept when the connection is saved in the form.
SSL Mode
BimlFlex writes no sslMode property to the MariaDB linked service, so the service default applies.
Microsoft states that default as VERIFY_IDENTITY, the highest TLS encryption and verification.
Encrypted Credential
When the connection's LS_EncryptedCredential column holds an Encrypted Credential value, it is also written to the linked service as the ADF encryptedCredential property.
The MariaDB linked service form has no Encrypted Credential field. A value stored in the column is kept when the connection is saved in the form.
Values Read from a Connection String
When the connection's LS_ConnectionString column holds a connection string and the LS_Server, LS_Port, LS_Db or LS_Username column is empty, the build reads that value from the string's server, port, database or uid key.
The key is matched without regard to case, and its value runs to the next semicolon, so the key needs a value followed by a semicolon, for example Server=mariadb.example.invalid;.
No other key is read from the string.
The connection string itself is not written to the MariaDB linked service, and neither is a connection string stored as an Azure Key Vault secret in the LS_ConnectionStringKVS_ fields.
The Connection String tab of the form has no fields of its own.
The Azure Key Vault tab beside it stores a secret reference in the LS_ConnectionStringKVS_ fields, which the build does not write.
With the Connection String tab selected, the form shows an Additional Connection String Properties field, which the form does not save for a MariaDB connection.
When the connection is saved with the Azure Key Vault tab selected, the form clears the LS_ConnectionString column. When it is saved with the Connection String tab selected, the form clears the LS_ConnectionStringKVS_ fields.
Azure Data Factory Linked Service Additional Information
For additional information on ADF MariaDB Linked Service and its connection requirements see the Azure Data Factory MariaDB Connector documentation.