Creating a Data Share
Learn how resource owners or Data Share administrators can share Iceberg tables in Cloudera by registering external clients in Cloudera Cloud and configuring Ranger policies.
Resource owners or Data Share administrators who want to share their Iceberg tables in Cloudera with external clients must first register the client in the Cloudera on cloud environment. After that, the resource owner needs to configure Ranger policies to allow access for the external client.
Registering external clients in Cloudera
Learn how to register external clients in Cloudera to
provision a CLIENT_ID
and CLIENT_SECRET
.
- Share Admin user and password
- Username and password of the Cloudera Administrator
- Knox hostname
- To get the Knox hostname, go to Knox Gateway role. , and copy the hostname for the
- Data Lake name
- Go to and copy and make a note of the Data Lake name.
The registration process results in provisioning a CLIENT_ID
and
CLIENT_SECRET
followed by creating Ranger ROLE
and adding CLIENT_ID
as a Group to the ROLE
and
then maintaining policy for the ROLE
to create the data share.
Managing Ranger policies
Learn how to provide authentication capabilities to your external users. Manage and govern your Ranger policies.
The Ranger Administrator must maintain policies for the set of databases and tables for the Ranger role and group.

In the Allow Conditions, a “SELECT
” permission has to be
maintained for the Databases or Tables to provide a READ-only access.

curl -k -u [***CDP_ADMIN_USER***]:[***PASSWORD***] -H "Accept: application/json" -H "Content-Type: application/json" -X POST "https://[***RANGER-HOST-NAME***]:8443/[***DATALAKE-NAME***]/cdp-share-management/ranger/service/public/v2/api/policy/" -d '{"service":"hive_service_name", "policyType": 0, "name": "Iceberg Table Policy", "description": "Policy for SELECT access to an CLIENT_ID", "isEnabled": true, "resources": { "database": { "values": "[***DATABASE_NAME***]" }, "table": { "values": "[***TABLE_NAME***]" } ,"column": { "values": ["*"] } } , "policyItems": [ { "accesses": [ { "type": "select" } ], "users": [], "groups":[], "roles": "[***CLIENT_ROLE***]", "conditions": [] } ] }'
curl -k -u [***CDP_ADMIN_USER***]:[***PASSWORD***] -H "Accept: application/json" -H "Content-Type: application/json" -X POST "https://dldanew-vxtt5w-master0.dldanew.svbr-nqvp.int.cldr.work:8443/dldanew-vxtt5w/cdp-share-management/ranger/service/public/v2/api/policy/" -d '{"service":"cm_hive", "policyType": 0, "name": "Hive Table Policy", "description": "Policy for SELECT access to an exteral user", "isEnabled": true, "resources": { "database": { "values": ["emp_data"] }, "table": { "values": ["employees"] } ,"column": { "values": ["*"] } } , "policyItems": [ { "accesses": [ { "type": "select" } ], "users": [], "groups":[], "roles": ["testrole13"], "conditions": [] } ] }'