Use Serverless Spark to access MaxCompute Open Storage
When you develop and maintain Serverless Spark tasks in DataWorks, you can configure the identity used to access MaxCompute Open Storage. This topic describes the access identity parameter values and the identity rules for interactive runs. It also provides a Spark parameter example for reading MaxCompute data and writing to a Paimon table.
Usage notes
This feature applies to DataWorks serverless resource groups. For information about how to create and use resource groups, see Use serverless resource groups.
The access identity parameter spark.hadoop.dataworks.odps.access.uid must be configured in DataWorks to take effect.
Configure the access identity
In DataWorks, configure the Spark parameter spark.hadoop.dataworks.odps.access.uid for the Serverless Spark compute resource. Select one of the following values based on the identity required to access MaxCompute. Configure the parameter for the modules that need this feature.
Parameter value | Access identity | Selection guidance |
UID of a specific account | Specified account | To specify an account for access, enter the UID of an Alibaba Cloud account or a RAM user. |
| Node owner | To access MaxCompute as the node owner, enter this string. |
| Compute resource default access identity | To use the default access identity configured for the current Serverless Spark compute resource, enter this string. |
When you run tasks in data development or data analysis, MaxCompute is always accessed as the current operator if the parameter is set to a specific UID or NODE_OWNER. If the parameter is set to DEFAULT_ACCESS_IDENTITY, the compute resource default access identity is used. See more at Configure global Spark parameters.
Parameter example
This example includes only Spark parameters, not code for table creation or read and write tasks. The values <endpoint>, <project_name>, and <uid> are placeholders. Replace them with actual values and remove the angle brackets.
Replace <endpoint> with the MaxCompute endpoint that matches the region of your project and your network connection type. For endpoint values, see Endpoints.
Spark parameter | Example value |
|
|
|
|
|
|
|
|
|
|
|
|
|
|