Deploy a Python program to MaxCompute by uploading it as a resource and registering it as a user-defined function (UDF) in a single step using MaxCompute Studio. This is the recommended method for performing these operations.
Prerequisites
Before you begin, ensure that you have:
A Python program developed and debugged. For more information, see Develop a Python UDF
Deploy and register
MaxCompute Studio combines the upload and registration steps into a single dialog, so your Python program becomes a callable UDF in one operation.
In the left-side navigation pane of IntelliJ IDEA, click Project, right-click the Python program in the scripts folder, and then select Deploy to server....
In the Submit resource and register function dialog box, configure the following parameters.

Parameter Description MaxCompute Project The MaxCompute project to deploy to. Automatically populated — no selection required. Resource file The local path where the resource file is stored after upload. Resource name The name used to identify the resource in your MaxCompute project. Resource comment An optional description of the resource. Extra resources Additional resource files the UDF depends on. To select multiple files, hold Ctrl and click each file in the resource list. Main class The UDF class to register, in the format <script_name>.<ClassName>— for example,my_udf.MyUDF.Function name The name used to call the UDF in SQL statements. Force update if already exists Overwrites the existing UDF or resource if a name conflict exists. Click OK.
After you complete the preceding operations, you can call the MaxCompute UDF in SQL statements.
What's next
To create or manage UDFs separately without using MaxCompute Studio, see Create a function.