A resource file is a file that contains the resources that you use in the Python code. If you use a pre-trained model, you specify the pre-trained model as a resource file in the Python transformation.
In the Python transformation, list the resource file path on the Data Integration Service machine. Separate multiple resource file paths using a comma.
When you access a resource file in the Python code, you reference the array
. To access a specific resource file, you specify an index to locate the resource file according to the order that the resource file appears in the list of resource file paths.
For example, you specify several resource files. To reference the first resource file in the Python code, use
The following image shows how you can specify a resource file in the Python transformation and access the resource file in the Python code:
The resource files
are listed using the resource file paths on the Data Integration Service machine. The Python code accesses the resource files to reconstruct the respective Python objects. To access the first resource file, the Python code references the resource file using
. To access the second resource file
, the Python code references the resource file using