Table of Contents

Search

  1. Preface
  2. Introduction to Informatica Data Engineering Integration
  3. Mappings
  4. Mapping Optimization
  5. Sources
  6. Targets
  7. Transformations
  8. Python Transformation
  9. Data Preview
  10. Cluster Workflows
  11. Profiles
  12. Monitoring
  13. Hierarchical Data Processing
  14. Hierarchical Data Processing Configuration
  15. Hierarchical Data Processing with Schema Changes
  16. Intelligent Structure Models
  17. Blockchain
  18. Stateful Computing
  19. Appendix A: Connections Reference
  20. Appendix B: Data Type Reference
  21. Appendix C: Function Reference

Resource File

Resource File

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
resourceFilesArray
. 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
resourceFilesArray[0]
.
The following image shows how you can specify a resource file in the Python transformation and access the resource file in the Python code:
This image shows the Python tab in the Python transformation. Two resource files are listed using the resource file paths. The Python code shows resourceFilesArray[0] and resourceFilesArray[1].
The resource files
foxgloveDataMLmodel.pkl
and
irisDataMLmodel.pkl
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
resourceFilesArray[0]
. To access the second resource file
irisDataMLmodel.pkl
, the Python code references the resource file using
resourceFilesArray[1]
.

0 COMMENTS

We’d like to hear from you!