Warning
This component will be available in the Palette of
Talend Studio on the condition that you have subscribed to one of
the Talend
solutions with Big Data.
Component Family |
Cloud / Azure Storage |
|
Function |
tAzureStorageContainerCreate |
|
Purpose |
tAzureStorageContainerCreate |
|
Basic settings |
Use an existing connection |
Select this check box and in the Component List click the |
Account name |
Enter the name of the storage account you need to access. A storage account name can be found |
|
Account key |
Enter the key associated with the storage account you need to access. Two keys are |
|
Protocol |
Select the protocol for this connection to be created. |
|
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 this check box to stop the execution of the Job when an error occurs. Clear the check box to skip any rows on error and complete the process for error-free rows. |
|
Advanced settings |
tStatCatcher Statistics |
Select this check box to gather the Job processing metadata at the |
Usage |
This component is used as a standalone component. Knowledge about Microsoft Azure Storage is required. |
|
Log4j |
The activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html. |
|
Limitation |
n/a |
|
Global Variables |
ERROR_MESSAGE: the error message generated by the A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see Talend Studio |
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/.
-
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.For further information about how to create a Job, see Talend Studio User Guide.
-
Drop tAzureStorageConnection, tAzureStorageContainerCreate, tAzureStorageContainerExist and tJava onto the workspace.
-
Connect them using the Trigger >
OnSubjobOk link.
-
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.
-
Double-click tAzureStorageContainerCreate
to open its Component view. -
Select the Use an existing connection
check box and then select the connection you have configured earlier. 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.
-
Double-click tAzureStorageContainerExist
to open its Component view. -
Select the Use an existing connection
check box and then select the connection you have configured earlier. 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
1System.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:1System.out.println(((Boolean)globalMap.get("tAzureStorageContainerExist_1_CONTAINER_EXIST")));
-
Press F6 to run this Job.
Once done, the Run view is opened automatically,
where you can check the execution result.
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.
In the web console of the Azure storage account, you can read as well that the
talendcontainer container has been
created.