tAzureStorageContainerCreate
a given Azure storage account.
tAzureStorageContainerCreate Standard properties
These properties are used to configure
tAzureStorageContainerCreate running in the
Standard Job framework.
The Standard
tAzureStorageContainerCreate component belongs to the
Cloud family.
The component in this framework is generally available.
Basic settings
Property Type |
Select the way the connection details
This property is not available when other connection component is selected |
Connection Component |
Select the component whose connection details will be |
Account Name |
Enter the name of the storage account you need to access. A storage account |
Account Key |
Enter the key associated with the storage account you need to access. Two |
Protocol |
Select the protocol for this connection to be created. |
Use Azure Shared Access Signature |
Select this check box to use a shared access signature (SAS) to access the In the Azure Shared Access Signature field displayed, Note that the SAS has valid period, you can set the start time at which the |
Container name |
Enter the name of the blob container you need to create. |
Access control |
Select the access restriction level you need to apply on the |
Die on error |
Select the check box to stop the execution of the Job when an error Clear the check box to skip any rows on error and complete the process for |
Advanced settings
tStatCatcher Statistics |
Select this check box to gather the Job processing metadata at the Job level |
Global Variables
CONTAINER |
The name of the blob container. This is an After variable and it |
ERROR_MESSAGE |
The error message generated by the component when an error occurs. This |
Usage
Usage rule |
This component can be used as a standalone component of a Job or Subjob. |
Prerequisites |
Knowledge about Microsoft Azure Storage is required. |
Scenario: Creating a container in Azure Storage
In this scenario, a four-component Job uses Azure Storage components to create a
container in a given Azure Storage system and check whether this container is
successfully created.
Before replicating this scenario, you must have appropriate rights and permissions to
read and write files in the Azure storage account to be used. For further information,
see Microsoft’s documentation for Azure Storage: http://azure.microsoft.com/en-us/documentation/services/storage/.
Linking the components
-
In the
Integration
perspective of the Studio, create an empty Job, named
azureTalend for example, from the Job Designs node in the Repository tree view. - Drop tAzureStorageConnection, tAzureStorageContainerCreate, tAzureStorageContainerExist and tJava onto the workspace.
- Connect them using the Trigger > OnSubjobOk link.
Connecting to an Azure storage account
-
Double-click tAzureStorageConnection to open its Component view.
-
In the Account name
field, enter the name of the storage account to be connected to. In this
example, it is
talendstorage,
an account that has been created for demonstration purposes. -
In the Account key field, paste the
primary or the secondary key associated with the storage account to be used.
These keys can be found in the Manage Access Key dashboard in the Azure
Storage system to be connected to. -
From the Protocol list,
select the protocol for the endpoint of the storage account to be used. In this
example, it is
HTTPS.
Creating a container
-
Double-click tAzureStorageContainerCreate to open its Component view.
-
Select
the component
whose
connection
details will be used to set up the Azure storage connection.
In
this example, it is
tAzureStorageConnection_1. -
In the Container name field, enter the
name of the container you need to create. If a container using the same name
exists, that container will be overwritten at runtime. -
From the Access control list, select the
access restriction level for the container to be created. In this example,
select Private.
Verifying the creation
-
Double-click tAzureStorageContainerExist to open its Component view.
-
Select
the component whose connection details will be used to set up the Azure storage
connection. In this example, it is
tAzureStorageConnection_1. -
In the Container name field, enter the
name of the container you need to check whether it exists. -
Double-click tJava to
open its Component view. -
In the Code field, enter
System.out.println();
-
In the Outline panel,
which, by default, is found to the left side of the Component view, expand the tAzureStorageContainerExist node. -
From the Outline panel, drop the
CONTAINER_EXSIT global variable into
the parentheses in the code in the Component view in order to make the code read:
System.out.println(((Boolean)globalMap.get("tAzureStorageContainerExist_1_CONTAINER_EXIST")));
Executing the Job
-
Press F6 to run this
Job. -
Check the execution result on the Run console.
You can read that the Job returns true
as the verification result, that is to say, the
talendcontainer container has been created in the
storage account being used. -
Double-check the result in the web console of the Azure storage account.
You can read as well that the talendcontainer
container has been created.