Create a .txt file in Azure Data Lake Store Container from webMethods Integration Server
Tags: azure, integration, tutorial
Published: 2021-10-18 14:50:07

---
title: Create a .txt file in Azure Data Lake Store Container from webMethods Integration Server
published: true
date: 2021-06-04 06:21:59 UTC
tags: #azure, #integration, #tutorial
canonical_url: https://tech.forums.softwareag.com/t/create-a-txt-file-in-azure-data-lake-store-container-from-webmethods-integration-server/241905/1
---


This article elaborates **creation of a .txt file** in Azure Data Lake store from webMethods Integration Server.

You will need access to the below services of Azure,

```
          Azure Storage Account
          Azure Active Directory
```

Below are the high-level steps involved:

**Step 1:** Install CloudStreams Provider for Azure Data Lake Store on webMethods Integration Server  
**Step 2:** Configure Storage Account on Microsoft Azure  
**Step 3:** Integration between webMethods Integration Server to cloud Azure Data Lake Store to create a .txt file

We will now go over each of these in detail.

### STEP1: Install CloudStreams Provider for Azure Data Lake on webMethods Integration Server

Download and install webMethods CloudStreams Provider for Microsoft Azure Data Lake Store from the below link,

[Microsoft Azure Data Lake - webMethods CloudStreams Connectors / M - Software AG Tech Community & Forums](https://tech.forums.softwareag.com/t/microsoft-azure-data-lake/238632)

Also, ensure that you have CloudStreams Development installed on your Integration Server (IS).

Once the installation is done, you should be able to see the CloudStreams related package on your IS,

[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/b/1/b181b313b505fe35f2c29f77cebac0057565bb20_2_517x500.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/b/1/b181b313b505fe35f2c29f77cebac0057565bb20.png "image")

Now your webMethods Integration Server installation is ready.  
Next step will be to configure the Azure Data lake store.

### STEP 2: Configure Storage Account on Microsoft Azure

Create a storage account as below,

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/4/a/4a4affc22f1912348d7c563aac9d8c487a441f52.png)

Enable hierarchical namespace and leave all other default parameters as-is. Review and Create.

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/8/f/8f3534284b3787402e55dc4042fe03ce3d7dcdd0.png)

Now the Storage Account is created.  
Next, create a container in the storage account. We will fetch the container details from IS to validate connectivity in later part of the POC.

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/4/2/427d3970e26072deb4a33efd7365e8862ccc7542.png)

The next step is to grant API permissions so this can be accessed from outside of Azure.  
Navigate to Active Directory and register the application as below. Configure the redirect URI. This will later be used to generate auth code.

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/3/9/3974dff75b5426a12b6823463ed729fcb9dd664f.png)

Grant appropriate permissions to the newly created application as below. Also Grant Admin Consent for Default Directory.

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/8/b/8b2768b408f188bf7515e6c8be486291ad7cf752.png)

Create a client secret in the application and note down the secret value. This secret will be used to authorize the incoming requests.

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/a/f/af4446f48ba099e473bf97bf7f6cff0587d38c75.png)

Now configuration on Azure is complete. The next requirement is to create access token and refresh token, which along with client secret and other parameters will be used to authorize the request from IS or any third-party app.

Generate authorization code using the below:  
[https://login.microsoftonline.com/](https://login.microsoftonline.com/)(tenant id)/oauth2/authorize?response\_type=code&prompt=login&redirect\_uri=(redirect uri)&client\_id=(client id)  
 ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/1/7/175088734cdc85b3abbabbfbe3a1c1d78e1b055c.png)

To generate an access token and refresh token set up a POST request to the URL [https://login.microsoftonline.com/](https://login.microsoftonline.com/)(tenant id)/oauth2/token through postman  
Note down the resulting access\_token and refresh\_token

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/2/0/207c4dc3ad8544553be41a9f28b74615c58c09df.png)

We now have all the required inputs to configure a Microsoft Azure Data Lake Store connection on webMethods Integration Server.

### STEP3: Integration between webMethods Integration Server to cloud Azure Data Lake Store to create a .txt file

Navigate to IS administrator in your browser as below. This will open a new tab,  
 ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/2/9/29dbe5cef711a8a215b520e8342e6444fb207595.png)

In the new tab navigate to Providers>Microsoft>Microsoft Azure Data Lake Store  
Ensure the version is 2.  
 ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/9/3/9398a558fc5e4c94a95c28aaccc51d465623e187.png)

Create a new connection with all the required parameters,  
 ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/7/b/7ba8232ca7beed37ede28569f92ded69886737b8.png)

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/e/9/e99bd03903419441a501d7c1ae80e2dbf985b87a.png)

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/b/d/bdb7996a7e875532e7e5e1b3c517e946e206c327.png)

Save the newly created connection and enable it.  
 ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/d/6/d67f551dd4fa6e754d0d251639d59765b1c1d599.png)

Now the connection is successfully configured.  
Next step is to create a .txt file from Designer. Open designer and create a new Cloud Connector Service.

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/6/f/6f2509babfef88bba9dd6b30f15b532d8e02ed93.png)

We will create the below services,  
 ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/7/7/77b54bd662a3ace5ac4838665b66313066dc6743.png)

1. createFilePath - this connector service will create a .txt file in Azure. Configuration is as below,  
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/e/e/ee20b4877217bd1f6a7b828ef6cb30d0a04ce14f.png)
2. appendToFile - this connector service will add data to newly created .txt file. Configuration is as below,  
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/e/e/ee5cbecf0225b7cbddc357f547397f9729332df5.png)
Under Parameters, ensure that the below are selected,
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/e/b/eb882b6e33f8e9255520f99ec80b0954120df57d.png)
3. flush - create and configure a flush connector service, this will commit the data to the .txt file created. Configuration is as below,
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/e/5/e5e3a0bfa8ad0f14cda141dd5764b68165788fe5.png)
4. writeToAzureFile - this is the flow service where we will use the connector services and create and write to file in Azure Data Lake Store,
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/6/b/6bfd21c6f44e4b429d5ee05c3ab094c6ae6baed7.png)
Below is the elaborate pipeline for the above steps:
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/6/6/667fac78281dd81d0be4aaeea1eabe8282f28df7.png)
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/a/9/a9e1e036b98bdad8a81c0391a2bb8bf41e3cbc36.png)
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/5/5/5505d65bda28bf3b75f9d3d29309d5a8dc3e06e9.png)
Save and run the service:
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/f/f/ff0514e7ba55779cb8f9da4c090e18e6e2735991_2_690x372.png)
Go back to Azure and verify file creation:
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/7/d/7dc9df6a554ddd815f9285dd5df3e81395062f6a_2_690x201.png)

[Read full topic](https://tech.forums.softwareag.com/t/create-a-txt-file-in-azure-data-lake-store-container-from-webmethods-integration-server/241905/1)