[ 
https://issues.apache.org/jira/browse/RANGER-4937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ramesh Mani updated RANGER-4937:
--------------------------------
    Description: 
Add a new GDS resource API for adding new resources to a new or existing 
DataShare and add it to the DataSet
 * add a resource to a dataset using existing API "POST service/gds/resource", 
with following enhancements:

Testing done with local vm:
  - Create a DataSet with "POST service/gds/dataset".
  - Call the enhanced API  "/dataset/\{id}/resources/\{serviceName}" as 
following.

curl  -ikv -u admin:Admin123 -X POST  -H "Content-Type: application/json" 
'[http://localhost:6080/service/gds/dataset/30/resources/cm_hive]' -d '[ \{ 
"createdBy": "Admin", "isEnabled": "true", "version": 1, "dataShareId":"-1", 
"resource":{ "database":{ "values":["test_db"] }, "table":\{ 
"values":["sal1","sal2","sal4"] }, "column": \{ "values": [ "id" ], 
"isExcludes": false, "isRecursive": false } }, "name":"test-resource-17", 
"accessTypes":["all"] }, \{ "createdBy": "Admin", "isEnabled": "true", 
"version": 1, "dataShareId":"-1", "resource":{ "database":{ 
"values":["default"] }, "table":\{ 
"values":["sal2","emp","tb_1","sal1","sal3","tb_2"] }, "column": \{ "values": [ 
"*" ], "isExcludes": false, "isRecursive": false } }, 
"name":"test-resource-18", "accessTypes":["all"] }]'

curl  -ikv -u admin:Admin123 -X POST  -H "Content-Type: application/json" 
'[http://localhost:6080/service/gds/dataset/30/resources/cm_hive]' -d '[ \{ 
"createdBy": "Admin", "isEnabled": "true", "version": 1, "dataShareId":"-1", 
"resource":{ "database":{ "values":["test_db3"] }, "table":\{ 
"values":["sal12","sal22","sal42"] }, "column": \{ "values": [ "id" ], 
"isExcludes": false, "isRecursive": false } }, "name":"test-resource-172", 
"accessTypes":["all"] }]'

  was:
Add a new GDS resource API for adding new resources to a new or existing 
DataShare and add it to the DataSet
 * add a resource to a dataset using existing API "POST service/gds/resource", 
with following enhancements:

Testing done with local vm:
  - Create a DataSet with "POST service/gds/dataset".
  - Call the enhanced API  "/dataset/\{id}/resources/\{serviceName}" as 
following.

curl  -ikv -u admin:Admin123 -X POST  -H "Content-Type: application/json" 
'[http://localhost:6080/service/gds/dataset/30/resources/cm_hive]' -d '[ \{ 
"createdBy": "Admin", "isEnabled": "true", "version": 1, "dataShareId":"-1", 
"resource":{ "database":{ "values":["test_db"] }, "table":\{ 
"values":["sal1","sal2","sal4"] }, "column": \{ "values": [ "id" ], 
"isExcludes": false, "isRecursive": false } }, "name":"test-resource-17", 
"accessTypes":["all"] }, \{ "createdBy": "Admin", "isEnabled": "true", 
"version": 1, "dataShareId":"-1", "resource":{ "database":{ 
"values":["default"] }, "table":\{ 
"values":["sal2","emp","tb_1","sal1","sal3","tb_2"] }, "column": \{ "values": [ 
"*" ], "isExcludes": false, "isRecursive": false } }, 
"name":"test-resource-18", "accessTypes":["all"] }]'

curl  -ikv -u admin:Admin123 -X POST  -H "Content-Type: application/json" 
'[http://localhost:6080/service/gds/dataset/30/resources/cm_hive]' -d '[ \{ 
"createdBy": "Admin", "isEnabled": "true", "version": 1, "dataShareId":"-1", 
"resource":{ "database":{ "values":["test_db3"] }, "table":\{ 
"values":["sal12","sal22","sal42"] }, "column": \{ "values": [ "id" ], 
"isExcludes": false, "isRecursive": false } }, "name":"test-resource-172", 
"accessTypes":["all"] }]'
 


> Add a new GDS resource API for adding new resources to a new or existing 
> DataShare and add it to the DataSet
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: RANGER-4937
>                 URL: https://issues.apache.org/jira/browse/RANGER-4937
>             Project: Ranger
>          Issue Type: Improvement
>          Components: Ranger
>    Affects Versions: 3.0.0
>            Reporter: Ramesh Mani
>            Assignee: Ramesh Mani
>            Priority: Major
>             Fix For: 3.0.0
>
>
> Add a new GDS resource API for adding new resources to a new or existing 
> DataShare and add it to the DataSet
>  * add a resource to a dataset using existing API "POST 
> service/gds/resource", with following enhancements:
> Testing done with local vm:
>   - Create a DataSet with "POST service/gds/dataset".
>   - Call the enhanced API  "/dataset/\{id}/resources/\{serviceName}" as 
> following.
> curl  -ikv -u admin:Admin123 -X POST  -H "Content-Type: application/json" 
> '[http://localhost:6080/service/gds/dataset/30/resources/cm_hive]' -d '[ \{ 
> "createdBy": "Admin", "isEnabled": "true", "version": 1, "dataShareId":"-1", 
> "resource":{ "database":{ "values":["test_db"] }, "table":\{ 
> "values":["sal1","sal2","sal4"] }, "column": \{ "values": [ "id" ], 
> "isExcludes": false, "isRecursive": false } }, "name":"test-resource-17", 
> "accessTypes":["all"] }, \{ "createdBy": "Admin", "isEnabled": "true", 
> "version": 1, "dataShareId":"-1", "resource":{ "database":{ 
> "values":["default"] }, "table":\{ 
> "values":["sal2","emp","tb_1","sal1","sal3","tb_2"] }, "column": \{ "values": 
> [ "*" ], "isExcludes": false, "isRecursive": false } }, 
> "name":"test-resource-18", "accessTypes":["all"] }]'
> curl  -ikv -u admin:Admin123 -X POST  -H "Content-Type: application/json" 
> '[http://localhost:6080/service/gds/dataset/30/resources/cm_hive]' -d '[ \{ 
> "createdBy": "Admin", "isEnabled": "true", "version": 1, "dataShareId":"-1", 
> "resource":{ "database":{ "values":["test_db3"] }, "table":\{ 
> "values":["sal12","sal22","sal42"] }, "column": \{ "values": [ "id" ], 
> "isExcludes": false, "isRecursive": false } }, "name":"test-resource-172", 
> "accessTypes":["all"] }]'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to