From d85b054fe50226a44c1e8fc32deeb1087fc82749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E4=BA=A6=E8=B6=85=28=E4=BD=95=E5=85=AE=29?= Date: Thu, 12 May 2016 14:11:20 +0800 Subject: [PATCH] odps-resource: add page Change-Id: I69552328ad7dbfb8117146bd6cb1cff088f1c5a1 --- pages/common/odps-resource.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 pages/common/odps-resource.md diff --git a/pages/common/odps-resource.md b/pages/common/odps-resource.md new file mode 100644 index 0000000000..58a341dda7 --- /dev/null +++ b/pages/common/odps-resource.md @@ -0,0 +1,26 @@ +# odps resource + +> Manage resources in odps. + +- Show resources in the current project: + +`list resources;` + +- Add local file as odps resource (overwrite if it already exists): + +`add file {{file}} as {{alias}} -f;` +`add archive {{file}} as {{alias}} -f;` +`add jar {{file.jar}} -f;` +`add py {{file.py}} -f;` + +- Add odps table as odps resource (overwrite if it already exists): + +`add table {{table_name}} partition ({{partition_spec}}) as {{as alias}} -f;` + +- Download odps resource to local file: + +`get resource {{project_name}}:{{resource_name}} {{file}};` + +- Delete resource: + +`drop resource {{resource_name}};`