edit-icon download-icon

Resources

Last Updated: May 07, 2018

Resources is a unique concept of MaxCompute. To use user-defined functions (for more information, see UDF), or MapReduce, you must use resources to accomplish tasks.

  • SQL UDF: After writing a UDF, you must compile it as a Jar package and upload the package to MaxCompute as a resource. Then, when you run this UDF, MaxCompute automatically downloads its corresponding JAR package to obtain the written code. The JAR package is one type of MaxCompute resource.

  • MapReduce: After writing a MapReduce program, you must compile it as a Jar package and upload the package to MaxCompute as a resource. Then, when running a MapReduce job, the MapReduce framework automatically downloads the corresponding JAR package and obtain the written code. You can upload text files and MaxCompute tables to MaxCompute as different types of resources. Then, you can read or use these resources when running UDF or MapReduce.

MaxCompute provides interfaces for you to read and use resources. For more information, see Use Resourse Example and UDTF Usage .

Note:

For more information about the limitations of resource reading by MaxCompute’s user-defined function (UDF) or MapReduce function, see Application Restriction.

Types of MaxCompute resources include:

  • File type

  • Table type, which are tables in MaxCompute

    Note:

    Currently, only BIGINT, DOUBLE, STRING, DATETIME, and BOOLEAN fields are supported in tables referenced by MapReduce.

  • Jar type, which is compiled Java JAR packages

  • Archive type, which is the compression type, and is determined by the resource name suffix. Supported compression types include: .zip/.tgz/.tar.gz/.tar/jar

For more information about resources, see Add Resource, Drop Resource, List Resources and Describe Resource.

Thank you! We've received your feedback.