diff --git a/content/en/docs/marketplace/platform-supported-content/modules/external-database-connector.md b/content/en/docs/marketplace/platform-supported-content/modules/external-database-connector.md index be11ae87c90..59291f2fbab 100644 --- a/content/en/docs/marketplace/platform-supported-content/modules/external-database-connector.md +++ b/content/en/docs/marketplace/platform-supported-content/modules/external-database-connector.md @@ -91,6 +91,9 @@ Constants are an environment variable whose values can differ per environment, W For free apps, make sure to add the default values to the constant in Studio Pro. For more information, see the [Deploying a Free App](https://docs.mendix.com/developerportal/deploy/mendix-cloud-deploy/deploying-an-app/#deploy-free-app) section below. {{% /alert %}} +{{% alert color="info" %}} +From Studio Pro 11.1, you can provide dynamic values to connection properties using connection parameters in the Query External Database activity. {{% /alert %}} + ### Exploring Schemas of a Connected Database When the connection is successful and saved, you can search the **Browse database** tab for Tables, Views, Procedures, and Functions. @@ -165,12 +168,13 @@ Use the [Query External Database](/refguide/query-external-database/) activity t 2. Double-click the activity and in the **Database** field, click **Select** to choose the database you want to query. 3. Select the **Query** you want to include in the activity (that you saved while [querying the database](#query-database)). 4. Include any [parameters](#parameters). -5. In the **Output** field, choose if you want to **Use return value**. +5. Modify values for connection parameters, if you want to use a different set of connection details during runtime. +6. In the **Output** field, choose if you want to **Use return value**. {{< figure src="/attachments/appstore/platform-supported-content/modules/external-database-connector/return-type.png" class="no-border" >}} -6. Click **OK**. -7. Configure the end event (such as displaying a list, if you are selecting data to appear in a list). +7. Click **OK**. +8. Configure the end event (such as displaying a list, if you are selecting data to appear in a list). You can now use the microflow in your app. Below is an example of a configured microflow: diff --git a/content/en/docs/refguide/modeling/application-logic/microflows-and-nanoflows/activities/integration-activities/query-external-database.md b/content/en/docs/refguide/modeling/application-logic/microflows-and-nanoflows/activities/integration-activities/query-external-database.md index fe9468f54a8..f9d659bf930 100644 --- a/content/en/docs/refguide/modeling/application-logic/microflows-and-nanoflows/activities/integration-activities/query-external-database.md +++ b/content/en/docs/refguide/modeling/application-logic/microflows-and-nanoflows/activities/integration-activities/query-external-database.md @@ -21,12 +21,27 @@ To learn how to use this activity in a microflow and configure other aspects of Double-click the **Query External Database** activity to view its properties. -In the **Query** section are the following properties: +The **Query** section contains the following properties: * **Database** – the name of the database you want to query * **Query** – the saved SQL query from your configuration of the Database connector * **Parameters** – the saved parameters from your configuration of the Database connector +The **Connection** section contains the following properties, which are used to provide dynamic connection parameter values: + +* **DBSource** – Enter the JDBC URL you want to use for connection during runtime +* **DBUsername** – Enter the username you want to use for connection during runtime +* **DBPassword** – Enter the password you want to use for connection during runtime + +If you are using SSL based authentication for Postgres, provide the value for + +* **ClientCertificateIdentifier** + +If you are using key-pair authentication for Snowflake, provide the value for: + +* **PrivateKey** +* **Passphrase** + In the **Output** section are the following properties: * **Return type** – the return type once the microflow is completed diff --git a/content/en/docs/refguide/modeling/integration/use-platform-supported-content/external-database-connector/query-and-integrate-external-data.md b/content/en/docs/refguide/modeling/integration/use-platform-supported-content/external-database-connector/query-and-integrate-external-data.md index 4fbf788ec48..712940fecf3 100644 --- a/content/en/docs/refguide/modeling/integration/use-platform-supported-content/external-database-connector/query-and-integrate-external-data.md +++ b/content/en/docs/refguide/modeling/integration/use-platform-supported-content/external-database-connector/query-and-integrate-external-data.md @@ -44,13 +44,13 @@ For example, the query below retrieves a list of RequestedProductRequirement whe `Select requestedProductRequirement from productlines where productLine = {productLine}` ``` -{{< figure src="http://attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/4.png" width="700" >}} +{{< figure src="/attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/4.png" width="700" >}} ### Typecast Parameter Data Type You can typecast `String` into UUID, as shown below: -{{< figure src="http://attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/13.png" width="700" >}} +{{< figure src="/attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/13.png" width="700" >}} ## Save Query @@ -62,11 +62,11 @@ You can typecast `String` into UUID, as shown below: a. If **New Entity** is selected, you can view the entity in the **Response structure** tab. Click **Save Query & Create Entity** to save the query and the newly created entity in the domain model. - {{< figure src="http://attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/5.png" width="600" >}} + {{< figure src="/attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/5.png" width="600" >}} b. If **Reuse Entity** is selected, all entities mapped to other queries of same document are listed in the drop-down list. Select the entity you want to reuse and click **Save Query**. - {{< figure src="http://attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/5a.png" width="600" >}} + {{< figure src="/attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/5a.png" width="600" >}} ### Save DML Query @@ -76,7 +76,7 @@ You can typecast `String` into UUID, as shown below: 2. Click **Save Query**. - {{< figure src="http://attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/6.png" width="600" >}} + {{< figure src="/attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/6.png" width="600" >}} {{% alert color="info" %}} For all DML Queries, changes made to database in the Mendix Design phase are automatically rolled back. {{% /alert %}} @@ -102,7 +102,7 @@ Do the following: b. If **Update Entity** is selected, you can see changes that will be made to the existing entity. Click **Update Entity** to save the query and the changes made to the entity in the domain model. - {{< figure src="http://attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/5b.png" width="600" >}} + {{< figure src="/attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/5b.png" width="600" >}} ## Call Stored Procedure @@ -112,19 +112,19 @@ To call a stored procedure, do the following: 2. Enter the query to call a stored procedure. Add a schema name with the stored procedure name. For example, use the following syntax, where `latest_schema` is the schema name, and `InsertDataIntoTable1` is the stored procedure: `Call latest_schema.InsertDataIntoTable1({1},{2})`. - {{< figure src="http://attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/9.png" width="600" >}} + {{< figure src="/attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/9.png" width="600" >}} 3. Create **IN**, **OUT**, and **INOUT** parameters for all parameters present in the stored procedure. Make sure the **Name in DB** is the same as the name of parameter in the stored procedure. - {{< figure src="http://attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/10.png" width="600" >}} + {{< figure src="/attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/10.png" width="600" >}} 4. Click **Run Query**. This returns an entity with the number of affected rows and all INOUT and OUT parameters. If the stored procedure returns a **Result set**, an associated entity is created. - {{< figure src="http://attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/11.png" width="600" >}} + {{< figure src="/attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/11.png" width="600" >}} 5. Click **Use Response** > **Save Query & Create Entity** to save the query and the newly-created entities in the domain model. - {{< figure src="http://attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/12.png" width="600" >}} + {{< figure src="/attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/12.png" width="600" >}} {{% alert color="info" %}}DML commands within a stored procedure are rolled back if they are not committed by a stored procedure, but DDL commands are not.{{% /alert %}} @@ -160,11 +160,13 @@ For MSSQL, for **INOUT** and **OUT** parameters of type Decimal, test values (in 3. In the **Query** field, select the required query from the drop-down. -4. Assign values to the parameters using the **Expression editor**. +4. Assign values to the query parameters using the Expression editor. -5. Output details for the selected query auto-populate. +5. Assign values to the connection parameters that will be used to make a connection during runtime using the Expression editor. + +6. Output details for the selected query auto-populate. - {{< figure src="http://attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/7.png" width="600" >}} + {{< figure src="/attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/8.png" width="600" >}} You are now ready to use data from an external database in your Mendix App. diff --git a/static/attachments/appstore/platform-supported-content/modules/external-database-connector/return-type.png b/static/attachments/appstore/platform-supported-content/modules/external-database-connector/return-type.png index 3f49d027d04..d2c5b642fc2 100644 Binary files a/static/attachments/appstore/platform-supported-content/modules/external-database-connector/return-type.png and b/static/attachments/appstore/platform-supported-content/modules/external-database-connector/return-type.png differ diff --git a/static/attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/8.png b/static/attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/8.png index 3c2d4ad8c9a..e25722a9bb1 100644 Binary files a/static/attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/8.png and b/static/attachments/refguide/modeling/integration/use-platform-supported-content/use-the-external-database-connector/8.png differ