Organization Structure of the Code Archive Package
When your service scenario is complex and the UDF involves a significant amount of code, you are advised to register the function in the form of a compressed file package. All related code files dependent on the UDF should be uniformly archived into a compressed package, uploaded to OBS, and then the storage path of the compressed package should be specified during function creation. The code file structure within the compressed package must adhere to the following requirements:
- Must include the file {FUNCTION_NAME}_source.py, which is considered the main entry file of the function. Additionally, the file content must be serialized into hexadecimal using CLOUDPICKLE.
- The code files belonging to modules that the main function imports must be correctly organized.
- Only zip format is supported for the compressed package.
An example of the compressed package is as follows:
my_udf.zip/ ├── my_udf_source.py ├── my_helper.py └── other/ └── utils.py
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot