This topic describes how to create, upload, reference, and download resources.
If you want to use .jar, you need to upload the file to the project resource. You can upload text files, MaxCompute tables, and various compressed package formats, including .zip, .tgz, .tar.gz, .tar, and .jar as different types of resources to MaxCompute. Then, you can read or use these resources while running UDFs or MapReduce.
- Archive: The compression type is identified by the extension in the resource name. The following compressed file types are supported: .zip, .tgz, .tar.gz, .tar, and .jar.
- Jar: The compiled Java jar packages.
- Jar resource: You need to compile the Java code in the offline Java environment, compress the code into a jar package, and upload the package as the jar resource to ODPS.
- Small files: These resources are directly edited on DataWorks.
- File resource: Select a large file when you create file resources. You can also upload local resource files.
Create a resource instance
- Right-click Business Flow under Data Development, and select Create Business Flow.
- Right-click Resource, and select .
- The Create Resource dialog box is displayed. Enter the resource name according to the naming convention, and set the resource type to jar. Select a local jar package for upload, and click OK to submit the package in the development environment.
- If this Jar package has been uploaded to the MaxCompute client, you must deselect Uploadto MaxCompute . Otherwise, an error will occur during the upload process.
- The resource name is not always the same as the uploaded file.
- The naming convention for a resource name: A string can contain 1 to 128 characters, including letters, numbers, underscores (_), and periods (.). The name is case insensitive. If the resource is a JAR resource, the extension is .jar.
- Click OK to submit the resource to the development scheduling server.
- Release a node task.
For more information about operations, see Publish a task.