Skip to content

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.

  1. Access the API Explorer: Open a web browser and go to [HOST]:8080/api-explorer/ to access the API Explorer.

  2. Navigate to the Database Tag: Find and click on the database tag within the API Explorer to view available configuration and operation endpoints.

  3. Save a Connection Pool: Use the POST /esbapi/databases endpoint to configure and save a connection pool.

    Example 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.

Info

By default, the saveDatabase endpoint utilizes its latest version. Therefore, the Version field may be left empty for simplicity. However, if compatibility becomes an issue. You can populate this field with the required version.


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:

  1. Locate the Configuration File: Navigate to the /<martini-home>/conf/db-pool/ directory and find the <name>.dbxml file corresponding to your database connection.

  2. 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.

  3. 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.


Via Martini Designer

Martini Designer provides a graphical interface to easily set up and manage Database Connections.

  1. Open Martini Designer: Launch Martini Designer and navigate to the Database section in the Navigator view.

  2. Add a New Connection: Right-click on Connections and select Add New Connection.

  3. 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.
  4. Test the Connection: Click the Test Connection button to verify that the configuration is correct.

  5. 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.