Skip to content

Commit c80365c

Browse files
Merge branch 'kk-snow-dataingestion' of https://github.com/mendix/docs into kk-snow-dataingestion
2 parents 71a0c65 + 4c89711 commit c80365c

1 file changed

Lines changed: 26 additions & 20 deletions

File tree

content/en/docs/appstore/use-content/platform-supported-content/modules/snowflake/mendix-data-loader.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ Once the Mendix Data Loader is deployed, follow these steps to configure and use
4949
6. To view the configuration status, click the **Authentication Configuration** tab.
5050
7. To set up authentication, click **Edit**, and then provide the required information based on the selected authentication type:
5151

52-
[//]: # (<!-- markdownlint-disable no-space-in-emphasis -->)
53-
5452
* For basic authentication, enter the following information:
5553
* **Username** – A username for basic authentication into the OData resource in your Mendix application
5654
* **Password** – A password for basic authentication into the OData resource in your Mendix application
@@ -61,8 +59,6 @@ Once the Mendix Data Loader is deployed, follow these steps to configure and use
6159
* **Allowed Scopes** – Allowed and custom scopes configured on the client from your OAuth provider
6260
* **Access Token Validity** – Duration (in seconds) for which the access token is valid
6361

64-
[//]: # (<!-- markdownlint-enable no-space-in-emphasis -->)
65-
6662
8. Click **Generate Script**.
6763
9. Click **Back** to return to the **Details** page.
6864
10. Click the **Ingestion Configuration** tab to set up your ingestion destination table.
@@ -102,33 +98,43 @@ To view all ingestion jobs associated with a specific data source in Snowflake,
10298
SELECT * FROM core.ingestion_job WHERE DATASOURCE_ID = '1234abcd' ORDER BY CREATED_DATE_TIME DESC;
10399
```
104100

105-
## Programmatically Trigger an Ingestion From a Mendix App
101+
## Programmatically Triggering an Ingestion Job From a Mendix App {#trigering-jobs}
106102

107-
Programmatically triggering an ingestion job can meet data ingestion requirements where a scheduled task may not. This includes cases such as waiting for a last submission to be submitted to a Mendix app before data ingestion occurs. Another example case is to start data ingestion when the load on the Mendix app is the lowest.
103+
Programmatically triggering an ingestion job can meet data ingestion requirements where a scheduled task may not, for example in the following use cases:
104+
105+
* Waiting for a last submission to be submitted to a Mendix app before data ingestion occurs.
106+
* Starting data ingestion when the load on the Mendix app is the lowest.
108107

109108
### Prerequisites
110-
- A fully configured data source in the Mendix Data Loader
111-
- A Mendix app equipped with the Snowflake REST SQL connector
112-
- An authenticated user that is allowed to trigger stored procedures
113109

114-
To trigger an ingestion job programmatically, use the `ExecuteStatement` operation available in the Snowflake REST SQL connector. The statement to be executed has the following syntax.
110+
* A fully configured data source in the Mendix Data Loader
111+
* A Mendix app equipped with the Snowflake REST SQL connector
112+
* An authenticated user that is allowed to trigger stored procedures
113+
114+
### Triggering the Ingestion
115+
116+
To trigger an ingestion job programmatically, use the `ExecuteStatement` operation available in the Snowflake REST SQL connector.
117+
118+
1. Obtain the Snowflake data source ID by performing the following steps:
119+
120+
1. In the Snowflake environment, open the Mendix Data Loader by clicking **Data Products** > **Apps** > **Mendix Data Loader**.
121+
2. Open the application by clicking the `MENDIX_DATA_LOADER` tab.
122+
3. Click **View** by the configured data source.
123+
4. Copy the value for the `ID` key.
124+
125+
2. In the Snowflake REST SQL connector, use the `ExecuteStatement` operation to execute the following statement:
115126

116127
```sql
117128
CALL {NAME_OF_THE_MENDIX_DATA_LOADER}.MX_FUNCTIONS.RUN_INGESTION_JOB('{DATASOURCE_ID}','{TASK_ID}');
118129
```
119130

120-
- The default name for the Mendix Data Loader is `MENDIX_DATA_LOADER`
121-
- Data source ID is a required parameter
122-
- Task ID is an optional parameter
131+
where you must specify the following variables:
123132

124-
To find the data source ID for a given data source:
125-
1. Navigate to the Snowflake environment
126-
2. Open the Mendix Data Loader; Data Products -> Apps -> Mendix Data Loader
127-
3. Open the application by clicking the `MENDIX_DATA_LOADER` tab
128-
4. Click *View* on the configured data source
129-
5. Copy the value for the `ID` key
133+
* `{NAME_OF_THE_MENDIX_DATA_LOADER}` - The default name for the Mendix Data Loader is `MENDIX_DATA_LOADER`
134+
* `{DATASOURCE_ID}` - Required; the data source ID that you obtained in step 1
135+
* `{TASK_ID}` - Optional
130136

131-
For a data source with the ID *40FJYP9D*, the resulting statement will be.
137+
For example, for a data source with the ID *40FJYP9D*, the resulting statement would be:
132138

133139
```sql
134140
CALL MENDIX_DATA_LOADER.MX_FUNCTIONS.RUN_INGESTION_JOB('40FJYP9D','');

0 commit comments

Comments
 (0)