Adding external files in Talend Studio - Cloud

Talend Cloud API Services Platform Studio User Guide

author
Talend Documentation Team
EnrichVersion
Cloud
EnrichProdName
Talend Cloud
task
Design and Development
EnrichPlatform
Talend Management Console
Talend Studio
You can use a context parameter in Artifacts to allow web users to use external files during the Task execution.

Before you begin

  • The Artifact is open in the Studio and the Contexts tab below the design workspace is selected.

    If this tab does not show in the Studio, click Window > Show view > Talend , and select Contexts.

About this task

As an example, we are creating a Artifact that imports customer records from an xlsx file.

Procedure

  1. Click the [+] button at the bottom of the Contexts view to add a line in the table.
  2. In the Name field, define the context parameter following the pattern resource_file_<parameter_name>, all in lower case.
    Use resource_file_customers in this example as you want to get data from the customers file.
  3. Set the type of the parameter to String.
  4. In the Value field, set the path to the file which is stored locally on your system.
  5. Double-click the tFileInputExcel component to open its basic settings, define the schema, and define the file name as a context parameter, context.resource_file_customers.
  6. Run the Artifact in the Studio to test it.
    Set the path to the customers file when prompted.

    The customer records are imported from the xlsx file.

  7. Right-click the Artifact in the Repository tree view and select Publish to Cloud.