Membuat atau mengunggah file resource di DataStudio. Fitur yang diimplementasikan dengan memanggil operasi ini sama dengan fitur pembuatan resource yang disediakan di lingkungan pengembangan terintegrasi (IDE).
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
create |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
Yes |
ID ruang kerja DataWorks. Anda dapat masuk ke Konsol DataWorks dan membuka halaman Workspace untuk mendapatkan ID tersebut. Anda harus mengonfigurasi parameter ini untuk menentukan ruang kerja DataWorks tempat operasi diterapkan. |
10111 |
| FileFolderPath |
string |
Yes |
Jalur file. |
Business_process/First_Business_Process/MaxCompute/Folder_1/Folder_2 |
| FileName |
string |
Yes |
Nama file. |
File name |
| FileType |
integer |
Yes |
Kode untuk tipe file. Kode bervariasi berdasarkan tipe file. Untuk informasi selengkapnya, lihat DataWorks nodes. Anda dapat memanggil operasi ListFileType untuk mengkueri kode tipe file. |
10 |
| FileDescription |
string |
No |
Deskripsi file. |
This is a description |
| Owner |
string |
No |
ID pengguna Alibaba Cloud dari Pemilik file. Jika parameter ini dikosongkan, ID pengguna Alibaba Cloud dari pemanggil akan digunakan secara default. |
1000000000001 |
| Content |
string |
No |
Kode untuk file. Format kode bervariasi berdasarkan tipe file. Untuk melihat format kode untuk tipe file tertentu, buka Pusat Operasi, klik kanan node tipe file tersebut, lalu pilih Tampilan Kode. |
SHOW TABLES; |
| ResourceFile |
string |
No |
URL Object Storage Service (OSS) untuk mengunggah file. URL disediakan oleh POP. |
http://bucketname1.oss-cn-shanghai.aliyuncs.com/example |
| OriginResourceName |
string |
Yes |
Nama file resource asli. |
origin_file_name.sql |
| UploadMode |
boolean |
No |
Mode unggah file resource. Parameter ini hanya berlaku untuk file dengan tipe MaxCompute. Nilai valid:
|
false |
| RegisterToCalcEngine |
boolean |
Yes |
Apakah akan mengunggah resource secara sinkron ke Mesin komputasi. |
false |
| StorageURL |
string |
No |
Jalur penyimpanan file resource pada Mesin komputasi. Hanya E-MapReduce (EMR) dan CDH yang mendukung bidang ini. Format untuk EMR adalah [oss | hdfs]://path/to/object. Untuk CDH, jalur harus /user/admin/lib secara default. |
oss://oss-cn-shanghai.aliyuncs.com/emr-test |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Data |
integer |
The ID of the file after it is created. |
1000001 |
| RequestId |
string |
The ID of the request. You can use the ID to locate logs and troubleshoot issues. |
0000-ABCD-EFG |
Contoh
Respons sukses
JSONformat
{
"Data": 1000001,
"RequestId": "0000-ABCD-EFG"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError.System | An internal system error occurred. Try again later. | |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | |
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | |
| 429 | Throttling.User | Your request is too frequent. Try again later. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.