You can use a resource in a Job by adding a context variable in the Contexts view of the Job.
Note: Using resources through repository context variables is not supported yet.
Create a resource by following the instructions in Creating a resource.
In this example, create a resource named AirportInfo to read airport information a local text file.
Open the Job in which you want to use the resource.
In this example, the Job has only two components -- tFileInputDelimited and tLogRow, connected by a connection.
In the Contexts view of the Job, add a context variable,
named resourceFile in this example, of type
- Click in the Value field of the context variable, click the button and select the resource in the Select a Resource dialog box.
- In the Component view of the tFileInputDelimited component, define the component schema according to the structure of the resource content.
In File name/Stream field, specify the resource context
In this example, enter context.resourceFile.
When executed, the Job will read and display the content of the input file defined in the resource. You can export the Job with the input file as a Job dependency, and deploy it to a different system without copying the file to the target machine.