Alation / Allie-SDK

A Python library for the Alation REST APIs.
https://alation.github.io/Allie-SDK/
Apache License 2.0
9 stars 2 forks source link

view_sql param passed validation but is not visible on Alation's related item #17

Closed laskmat closed 3 months ago

laskmat commented 4 months ago

hi, I am wonder if that's issue with REST API or something connected. Tested on my trial account and my developer instance. Example for trial acc:

`ss = AlationVirtualDataSource( access_token='', session=requests.session(), host='https://.alationcloud.com' )

vds_id = 1 view = VirtualDataSourceView() view.key = '1.DEMO_SAMPLE_DATA.STRM_ANLYTCS_DM.CUSTOMER_VW' view.table_comment = 'Testing View-Table' view.view_sql = 'select * from TestTable1' items = [view] async_result = ss.post_metadata(ds_id=vds_id, vds_objects=items) `

so the result is partially as expected: image

CUSTOMER_VW was updated with new table_comment but SQL has gone! I mean - trial has sql DDLs added for views but for some reason when I'm trying to update this field with API (even with normal POST outside this lib), something breaks without any detailed info why. But maybe I've missed something?

marioaburto-alation commented 4 months ago

Hi @laskmat, thank you for bringing this up to us. We are going to test this internally and will get back to you shortly with our findings.

ignaszewskir commented 4 months ago

Hi @laskmat I am not able to reproduce this in-house using your code. My view gets updated with the correct Source Comments as well as the SQL portion. Are you updating a Virtual Data Source View or a RDBMS Data Source View?

laskmat commented 4 months ago

@ignaszewskir hey, seems that's Virtual Data Source View.

laskmat commented 4 months ago

hey @ignaszewskir @marioaburto-alation seems that methods related to RDBMS works for updating VirtualDataSourceView. But is it right way to use that this way? Could you please add some examples to SDK?

ignaszewskir commented 4 months ago

Hi @laskmat. The RDBMS API is meant for RMDBS data sources, and the Virtual Data Source API for Virtual data sources only.

laskmat commented 3 months ago

@ignaszewskir I guess we can close this issue for now - seems that each case should be checked with picking the best solution (and API's object). Thanks