Azure Synapse
Azure Synapse Analytics is an integrated analytics service that combines big data and data warehousing capabilities, designed to analyze and process large volumes of data. With its comprehensive set of features, Synapse enables seamless integration of data across various sources, powerful analytics tools, and the ability to manage big data workloads. When paired with Martini Runtime, Azure Synapse becomes even more powerful, providing an optimized environment for processing complex data workflows, analyzing real-time data, and building scalable, high-performance data solutions.
Configuring Azure Synapse
To integrate Martini Runtime with Azure Synapse, you need to configure a JDBC connection string with the necessary connection details, such as the Synapse workspace address, authentication information, and more. This configuration ensures that Martini Runtime can communicate effectively with your Azure Synapse environment for streamlined data operations.
Here's a step-by-step guide for adding a new database connection:
Via API Explorer:
Database connections can be configured using the Martini API Explorer, an easy-to-use interface for interacting with system APIs. To properly configure, follow these steps.
-
Access the API Explorer: Open a web browser and go to
[HOST]:8080/api-explorer/
to access the API Explorer. -
Navigate to the Database Tag: Find and click on the
database
tag within the API Explorer to view available configuration and operation endpoints. -
Save a Connection Pool: Use the
POST /esbapi/databases
endpoint to configure and save a connection pool.-
In Martini, placeholders dynamically inject values into properties, databases, endpoints, and package files, resolving at runtime from sources like properties files, environment variables, or system properties. By default, the ESB Database Connection API uses Version 2, which supports placeholders and uses string data types for flexibility. Version 1, however, requires specific data types and doesn't support placeholders. To switch to Version 1, simply populate the Version Field.
-
Here is a minimum requirement for a JSON payload:
1 2 3 4 5 6 7 8
{ "name": "[name]", "type": "jdbc", "url": "jdbc:sqlserver://[synapseWorkspaceName].sql.azuresynapse.net:1433;database=[databaseName];", "driverClassName": "com.microsoft.sqlserver.jdbc.SQLServerDriver", "username": "[username]", "password": "[password]" }
-
Replace
[synapseWorkspaceName]
with your Azure Synapse workspace's name and[databaseName]
with the name of your Synapse database. -
driverClassName
is the JDBC driver for Microsoft SQL Server, as Azure Synapse uses SQL Server drivers.
-
-
Via File System:
Alternatively, you can configure database connections directly in the file system. This method is ideal when API access is restricted or for initial setup.
To modify the database connection directly through the file system, follow these steps:
-
Locate the Configuration File: Navigate to the
/<martini-home>/conf/db-pool/
directory and find the<name>.dbxml
file corresponding to your database connection. -
Edit the Database Connections: Open the
<name>.dbxml
file in a text editor and update the database connection properties.Here's an example of the dbXML configuration:
1 2 3 4 5 6 7 8
<database> <name>[name]</name> <type>jdbc</type> <url>jdbc:sqlserver://[synapseWorkspaceName].sql.azuresynapse.net:1433;database=[databaseName];</url> <driverClassName>com.microsoft.sqlserver.jdbc.SQLServerDriver</driverClassName> <username>[username]</username> <password>[encrypted_password]</password> </database>
-
Replace
[synapseWorkspaceName]
with your Azure Synapse workspace's name and[databaseName]
with the name of your Synapse database. -
driverClassName
is the JDBC driver for Microsoft SQL Server, as Azure Synapse uses SQL Server drivers.
-
-
Save and Restart: Save the changes and restart the Martini Runtime instance to apply the new settings. This ensures that all components of your application use the updated JDBC configuration.
Configuring Synapse via Martini Designerr
Martini Designer provides a graphical interface to easily set up and manage Database Connections.
-
Open Martini Designer: Launch Martini Designer and navigate to the Database section in the Navigator view.
-
Add a New Connection: Right-click on Connections and select Add New Connection.
-
Specify Connection Details:
- Type: JDBC
- Name: Enter a unique name for the connection (e.g.,
MyAzureSynapseConnection
). - URL: Populate the Azure Synapse URL (e.g.,
jdbc:sqlserver://[synapseWorkspaceName].sql.azuresynapse.net:1433;database=[databaseName]
). - Username: Enter your configured username.
- Password: Enter your configured password.
-
Test the Connection: Click the Test Connection button to verify that the configuration is correct.
-
Save the Connection: After a successful connection test, save the connection to finalize the setup.
Connection Properties
For more information on constructing a JDBC connection URL for Azure Synapse, refer to the official documentation: Building the Connection URL for SQL Server.
Database Properties
For a detailed explanation of the available properties and how to configure them, refer to the JDBC database properties documentation.