swecooo opened a new issue #10311:
URL: https://github.com/apache/incubator-superset/issues/10311


   I was trying to create a Superset [Terraform 
provider](https://www.terraform.io/docs/extend/writing-custom-providers.html) 
for managing datasets (and also charts) using Terraform. I wanted to create the 
resources in Superset using the [FAB Model REST 
API](https://flask-appbuilder.readthedocs.io/en/latest/rest_api.html#model-rest-api).
 However I found out that there is no possibility to create an SQL Lab View 
using the `/dataset` REST API since the POST request only supports 4 
parameters: `database`, `schema`, `table_name` and `owners`.
   
   It would be great if we could also provide the `is_sql_lab_view` and `sql` 
parameters to the `/dataset` POST request and create an SQL Lab View directly 
using this endpoint.
   
   As a very limited workaround I used POST request to create a dataset linking 
to a table and then updated the record with `/dataset` PUT request where I 
could already provide all the parameters needed (`is_sql_lab_view` and `sql`). 
However one does need to manually change the dataset columns after updating the 
record.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to