delta-io / delta-sharing

An open protocol for secure data sharing
https://delta.io/sharing
Apache License 2.0
753 stars 168 forks source link

access views in delta share #453

Open lramkris1204 opened 8 months ago

lramkris1204 commented 8 months ago

I created a view in the delta share and tried to access but I get a response from server stating 'INVALID_PARAMETER_VALUE, 'message ': could not retrieve from share because table with type VIEW is currently unsupported in Delta Sharing protocol. Could you please let me know if there are any alternate ways in which the underlying query of the view itself can be embedded in the url that is being sent to the delta share. Appreciate your help and support on this context with an example code.

mk-hasan commented 7 months ago

I created a view in the delta share and tried to access but I get a response from server stating 'INVALID_PARAMETER_VALUE, 'message ': could not retrieve from share because table with type VIEW is currently unsupported in Delta Sharing protocol. Could you please let me know if there are any alternate ways in which the underlying query of the view itself can be embedded in the url that is being sent to the delta share. Appreciate your help and support on this context with an example code.

Hi, I had the same issue. Apparently, the VIEW only works with Databricks to Databricks but if you want to access view from different environment then it is not supported right now with Delta Sharing Protocol. You can only access table from non Databricks environment.

linzhou-db commented 6 months ago

cc @andyl-db @chakankardb

john-grassroots commented 4 months ago

Curious, did you try materialized views or just plain vanilla views? We were considering a solution with views.

john-grassroots commented 4 months ago

To answer my own question...

You're not yet currently able to add Materialized Views to a share (Receive error "Sharing materialized views is not supported yet" in AWS Databricks).

When attempting to read a normal view which you are able to add to a share in the current version of Databricks you receive the error below indicating Views are unsupported.

I'm running the following...

AWS Databricks where the share originated from

and Python program on local machine as client with the following...

Name: delta-sharing Version: 1.0.5 (latest)

Name: databricks-spark Version: 3.2.0 (latest)

Name: databricks-connect Version: 14.3.2 (latest)

400 Client Error: Bad Request 
 { 'details': [ { '@type': 'type.googleapis.com/google.rpc.ErrorInfo',
                 'domain': 'data-sharing.databricks.com',
                 'metadata': { 'dsError': 'DS_UNSUPPORTED_TABLE_TYPE',
                               'schema': 'data_tst,
                               'share': 'delta-sharing-poc',
                               'table': 'product_vw',
                               'tableType': 'VIEW'},
                 'reason': 'DS_UNSUPPORTED_TABLE_TYPE'},
               { '@type': 'type.googleapis.com/google.rpc.RequestInfo',
                 'request_id': '911440fa-50c8-4284-991e-917fb45c5ba5',
                 'serving_data': ''}],
  'error_code': 'INVALID_PARAMETER_VALUE',
  'message': 'DS_UNSUPPORTED_TABLE_TYPE: Could not retrieve '
             'because '
             'table with type [VIEW] is currently unsupported in Delta Sharing '
             'protocol.'}
tblatrille commented 1 week ago

by any chance, does anyone know if it this is on the roadmap?