Skip to content

Commit 4fcb415

Browse files
edits
1 parent fd1afe6 commit 4fcb415

2 files changed

Lines changed: 26 additions & 13 deletions

File tree

  • content/en/docs/appstore/use-content/platform-supported-content/modules
  • static/attachments/appstore/platform-supported-content/modules/databricks

content/en/docs/appstore/use-content/platform-supported-content/modules/databricks-edc.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,38 @@ This how-to describes the steps required to enable your app to use the External
1313

1414
## Prerequisites
1515

16-
As an additional resource on how to use bring your own JDBC driver with the external database connector, see [External Database Connector](https://docs.mendix.com/appstore/modules/external-database-connector/#byod) although this explanation is more generic than what will follow in this documentation.
16+
For some general information on how to use bring your own JDBC driver with the external database connector, read [External Database Connector: Configure for Any Database](https://docs.mendix.com/appstore/modules/external-database-connector/#byod).
1717

1818
## Configuring the Connection Between Your Mendix App and Databricks
1919

2020
To connect your Mendix application to Databricks with the External Database connector, follow these steps:
2121

2222
1. Install the [External Database connector](https://marketplace.mendix.com/link/component/219862) version 5.1.1 or higher.
23-
2. In the **Settings** of you module you can add a **Java Dependency** of the needed Databricks JDBC Driver, this way the dependency will be downloaded on running your project. To enable this you will need the following:
24-
* **Group ID** - set to **com.databricks**
25-
* **Artifact ID** - set to **databricks-jdbc**
26-
* **Version** - set to **2.7.1**
23+
2. Ensure that you have the required Databricks JDBC Driver by choosing one of the following options:
24+
25+
* To have the dependency downloaded automatically on running your project, add a **Java Dependency** in the **Settings** of you module and provide the following information:
26+
* **Group ID** - set to **com.databricks**
27+
* **Artifact ID** - set to **databricks-jdbc**
28+
* **Version** - set to **2.7.1**
2729

2830
{{< figure src="static/attachments/appstore/platform-supported-content/modules/databricks/JavaDependency.png" >}}
2931

30-
Or alternatively you can download version 2.7.1 of the [JDBC driver](https://www.databricks.com/spark/jdbc-drivers-archive) that Databricks provides and put the .jar file into the userlib of your Mendix project.
31-
3. Run you Mendix project and run the [Connect to Database wizard](/appstore/modules/external-database-connector/#configuration) and select **Other** as the database type.
32+
* To install the dependency manually, download version 2.7.1 of the [JDBC driver](https://www.databricks.com/spark/jdbc-drivers-archive) that Databricks provides and put the .jar file into the *userlib* of your Mendix project.
33+
34+
3. Run you Mendix project and run the [Connect to Database wizard](/appstore/modules/external-database-connector/#configuration), selecting **Other** as the database type.
3235

3336
{{< figure src="static/attachments/appstore/platform-supported-content/modules/databricks/DatabricksConfig.png" >}}
3437

3538
4. Provide a name for the database connection document.
36-
5. As a username use "token" and as your password use the personal access token (PAT) that you can generate via the user settings in Databricks:
39+
5. Enter the following connection details:
40+
41+
* **User name** - set to **token**
42+
* **Password** - set to the personal access token (PAT) that you can generate through the user settings in Databricks:
3743

3844
{{< figure src="static/attachments/appstore/platform-supported-content/modules/databricks/PAT.png" >}}
3945

40-
7. In your Databricks account find the JDBC URL related to the SQL Warehouse or Cluster you are using and copy it into the JDBC URL field and add UID=token;PWD=**PAT** where **PAT** should be replaced with your actual PAT.
46+
7. In your Databricks account find the JDBC URL related to the SQL warehouse or cluster which you are using.
47+
8. Copy the URL into the **JDBC URL** field and add *UID=token;PWD=`PAT`*, where `PAT` is your actual PAT.
4148

4249
{{< figure src="static/attachments/appstore/platform-supported-content/modules/databricks/JDBC_URL.png" >}}
4350

@@ -51,7 +58,11 @@ You can now configure the queries that you need to run on your Databricks databa
5158

5259
## Configuring a Basic Query
5360

54-
In this section we will show you a very basic example of how to use the database connector to execute a query on your Databricks data. To do this you can create some data in your Databricks workspace. Navigate to the SQL Editor in your workspace and run the folowing sql command:
61+
This section shows a basic example of how to use the database connector to execute a query on your Databricks data.
62+
63+
### Creating Data in your Databricks Workspace
64+
65+
If you do not have any test customer data in your Databricks workspace, you can create it by running the following SQL command in your workspace's SQL Editor:
5566

5667
```sql
5768
CREATE TABLE customerData (
@@ -73,10 +84,12 @@ INSERT INTO customerData (name, address, postal_code, gender) VALUES
7384
('Thomas Mulder', 'Sterrenhof 7, Hemelrijk', '9012RS', 'Male'),
7485
('Sophie Jansen', 'Kersenstraat 12, Fruitdorp', '0123TU', 'Female');
7586
```
76-
The following image shows where to find the SQL Editor in Databricks:
87+
7788
{{< figure src="static/attachments/appstore/platform-supported-content/modules/databricks/SQL_Editor.png" >}}
7889

79-
This should have created a table with some entries that can now be queried from your Mendix application.
90+
### Querying the Data
91+
92+
After you have created a table with some entries, you can now be query from your Mendix application.
8093

8194
1. In your Mendix app, in the **App Explorer**, find and open the external connection document that you created with the Connect to Database wizard.
8295
2. In the **Name** field, enter a name for your query, for example, *CustomerData_Get*.
@@ -107,4 +120,4 @@ This should have created a table with some entries that can now be queried from
107120

108121
{{< figure src="static/attachments/appstore/platform-supported-content/modules/databricks/JA_Query.png" >}}
109122

110-
7. Use the microflow behind a microflow button and use the debugger to test if the objects are properly returned (or build a quick interface).
123+
7. Link the microflow to a microflow button and use the Debugger to test if the objects are properly returned.
-79.1 KB
Loading

0 commit comments

Comments
 (0)