Resouces

Last Updated: Oct 10, 2017

Resource is a particular concept of MaxCompute. If you want to use user-defined function UDF or MapReduce, resource is needed. For example:

  • MaxCompute SQL UDF: After you have prepared UDF, you must upload the compiled jar package to MaxCompute as resource. While running this UDF, MaxCompute automatically downloads the jar package and gets the user’s code. To upload the jar package is a course to create MaxCompute resource, so jar package is a kind of MaxCompute recource.

  • MaxCompute MapReduce: After you have prepared MapReduce program, you must upload the compiled jar package as a resource to MaxCompute. While running the MapReduce job, MapReduce framerwork automatically downloads the jar resource and gets the user’s code. You also can upload the text file and tables as different types of resources to MaxCompute. UDF or MapReduce program can read these resources in running worker. MaxCompute provides an interface to read and use the resource. For more information, see Use Resourse Example and UDTF Usage . Note that the user-defined function UDF of MaxCompute or MapReduce has certain application restrictions on the reading of resources. See Application Restriction.

Types of MaxCompute resources include:

  • File.
  • Table: Tables in MaxCompute.
  • Jar: Compiled Java jar package;
  • Archive: Recognize the compression type according to the postfix in the resource name. The supported compressed file types include: .zip/.tgz/.tar.gz/.tar/jar.

For more information of recource, see Add Resource, Drop Resource, List Resources and Describe Resource.

Thank you! We've received your feedback.