Step 3. Add Integration Task

Druid provides you with two integration tasks:

To know which task to use, learn the difference between the blob and file storage.

What is the difference between Azure blob and file storage?

Azure Blob Storage is an object store used for storing vast amounts unstructured data, while Azure File Storage is a fully managed distributed file system based on the SMB protocol and looks like a typical hard drive once mounted.

The two integration tasks allow you to share specific resources (blob objects / files). The resource can be accessed from anywhere in the world using a URL that points to the resource and includes a shared access signature (SAS) token, or can be accessed directly in the browser via Direct Link.

Azure Storage Feature

Description

Integration task

When to use

Azure Blob

Allows unstructured data to be stored and accessed at a massive scale in block blobs.

Upload blob

  • To serve images and documents directly in the browser.

  • To store files for distributed access.

  • To streamline video and audio.

Azure Files

Offers fully managed cloud file shares that you can access from anywhere via the industry standard Server Message Block (SMB) protocol.

Upload file

To serve small files directly in the browser.

To store small files for distributed access

Upload Blob

All blobs must reside in a blob container, which is simply a logical grouping of blobs. An account can contain an unlimited number of containers, and each container can store an unlimited number of blobs.

To add an integration task for uploading a blob container, at the top-right corner of the Edit Connector Action page, ConnectorSteps tab, click on the Create Task button, and then click Upload blob.

Step 1. Set the task general parameters

After you click to create an Upload blob task, the Edit Connector Task page appears by default on the General tab.

Set the general parameters:

Parameter

Description

Description

Provide a brief relevant description of the task to be performed.

ConnectionCode

Select the Azure Storage app.

 

URL Type

Select the type of URL to be generated by Azure Blob Storage to access the resource you uploaded (in this case, a blob container). Two options are available:

  • Direct link. Azure Blob Storage will return an URL for directly downloading the file, but ONLY to users authenticated in the corresponding Azure AD (Active Directory) account.

    Example: storageexplorer://v=1&accountid=/subscriptions/the_subscription_id/resourceGroups/the_resource_group_name/providers/Microsoft.Storage/storageAccounts/the_storage_account_name&subscriptionid=the_subscription_id&resourcetype=Azure.BlobContainer&resourcename=the_blob_container_name

    Note: You need to have the necessary permissions to access the linked resource for a direct link to work. For more information, see Microsoft Azure Storage documentation.

  • Shared Access Policy. A shared access signature (SAS) provides delegated access to resources in your storage account. This means that you can grant a client limited permissions to objects in your storage account for a specific amount of time, without having to share your account access keys. The URL provided is NOT active directory dependent.

    Specify the policy lifetime and select the duration (Minutes, Hours, Days or Years).

Click the Save button. You can now set the request.

Step 2. Set the request

Click the Request tab. The Request entity field is automatically filled in with the request entity selected on the connector action.

Click the Get Containers button () to get the list of blob containers from your storage account.

From the Container Name field, select the blob container where you want to upload.

In the File field, enter the desired Druid file entity.

You can now set the response.

Step 3. Set the response

Click the Response tab. The response entity field is automatically filled in with the response entity set on the connector action.

In the File URL field, select the entity field that will store the share URL generated by Azure Blob Storage. Type “[[”, select the entity, type “.” and select the field.

Click the Save button. You can now test the integration task.

Step 4. Test the integration task

Click the Test tab.

Click the Choose file button and browse for the desired file and click the Test button ().

Upload File

All files must reside inside in a file share. They can be further organized in directories.

To add an integration task for uploading a blob container, at the top-right corner of the Edit Connector Action page, ConnectorSteps tab, click on the Create Task button, and then click Upload blob.

Step 1. Set the task general parameters

After you click to create an Upload file task, the Edit Connector Task page appears by default on the General tab.

Set the general parameters:

Parameter

Description

Description

Provide a brief relevant description of the task to be performed.

ConnectionCode

Select the Azure Storage app.

 

URL Type

Select the type of URL to be generated by Azure Blob Storage to access the resource you uploaded (in this case, a blob container). Two options are available:

  • Direct link. Storage Explorer uses the tree view to visualize resources in Azure. A direct link contains the hierarchical information for the linked resource node in the tree.

    Example: storageexplorer://v=1&accountid=/subscriptions/the_subscription_id/resourceGroups/the_resource_group_name/providers/Microsoft.Storage/storageAccounts/the_storage_account_name&subscriptionid=the_subscription_id&resourcetype=Azure.BlobContainer&resourcename=the_blob_container_name

    Note: You need to have the necessary permissions to access the linked resource for a direct link to work. For more information, see Microsoft Azure Storage documentation.

  • Shared Access Policy. A shared access signature (SAS) provides delegated access to resources in your storage account. This means that you can grant a client limited permissions to objects in your storage account for a specified period of time, without having to share your account access keys.

    Specify the policy lifetime and select the duration (Minutes, Hours, Days or Years).

Click the Save button. You can now set the request.

Step 2. Set the request

Click the Request tab. The Request entity field is automatically filled in with the request entity selected on the connector action.

Click the Get File Shares button () to get the list of file shares from your storage account.

From the File Share Name field, select the file share where you want to upload the file.

If you want to upload the file in a specific directory in the selected file share, in the Directory Name field, enter the name of the name of the directory. Leaving the filed empty, will upload the file to the file share root.

In the File field, enter the desired Druid file entity.

You can also specify the directory in the file share by using the Directory Path Parameters table.

You can now set the response.

Step 3. Set the response

Click the Response tab. The response entity field is automatically filled in with the response entity set on the connector action.

In the File URL field, select the entity field that will store the share URL generated by Azure Blob Storage. Type “[[”, select the entity, type “.” and select the field.

Click the Save button. You can now test the integration task.

Step 4. Test the integration task

Click the Test tab.

Click the Choose file button and browse for the desired file and click the Test button ().