Scenario: Creating documents on an Alfresco server - 6.3

Talend Open Studio for Big Data Components Reference Guide

Talend Open Studio for Big Data
Data Governance
Data Quality and Preparation
Design and Development
Talend Studio

This Java scenario describes a two-component Job which aims at creating two document files with the related metadata in an Alfresco server, the java-based Enterprise Control Management system.

Setting up your Job

  1. Drop the tFileInputDelimited and tAlfrescoOutput components from the Palette onto the design workspace.

  2. Connect the two components together using a Main > Row connection.

Setting up the schema

  1. In the design workspace, double-click tFileInputDelimited to display its basic settings.

  2. Set the File Name path and all related properties. Note that if you have already stored your input schemas locally in the Repository, you can simply drop the relevant file item from the Metadata folder onto the design workspace and the delimited file settings will automatically display in the relevant fields in the component Basic settings view.


    For more information about metadata, see Setting up a File Delimited schema in Talend Studio User Guide.

In this scenario, the delimited file provides the metadata and path of two documents we want to create in the Alfresco server. The input schema for the documents consists of four columns: file_name, destination_folder name, source_path, and author.

And therefore the input schema of the delimited file will be as the following:

Setting up the connection to the Alfresco server

  1. In the design workspace, double-click tAlfrescoOutput to display its basic settings.

  2. In the Alfresco Server area, enter the Alfresco server URL and user authentication information in the corresponding fields.

  3. In the TargetLocation area, either type in the base name where to put the document in the server, or Select the Map... check box and then in the Column list, select the target location column, destination_folder_name in this scenario.


    When you type in the base name, make sure to use the double backslash (\\) escape character.

  4. In the Document Mode list, select the mode you want to use for the created documents.

  5. In the Container Mode list, select the mode you want to use for the destination folder in Alfresco.

Defining the document

  1. Click the Define Document Type three-dot button to open the tAlfrescoOutput editor.

  2. Click the Add button to browse and select the xml file that holds the metadata according to which you want to save the documents in Alfresco.

    All available aspects in the selected model file display in the Available Aspects list.


    You can browse for this model folder locally or on the network. After defining the aspects to use for the document to be created in Alfresco, this model folder is not needed any more.

  3. If needed, select in the Available Aspects list the aspect(s) to be included in the metadata to write in the Alfresco server. In this scenario we want the author name to be part of the metadata registered in Alfresco.

  4. Click the drop-down arrow at the top of the editor to select from the list the type to give to the created document in Alfresco, Content in this scenario.

    All the defined aspects used to select the metadata to write in the Alfresco server display in the Property Mapping list in the Basic Settings view of tAlfrescoOutput, three aspects in this scenario, two basic for the Content type (content and name) and an additional one (author).

Executing your Job

  1. Click Sync columns to auto propagate all the columns of the delimited file.

    If needed, click Edit schema to view the output data structure of tAlfrescoOutput.