EMCP commented on issue #16003:
URL: https://github.com/apache/superset/issues/16003#issuecomment-890594596


   just want to confirm, I got it to work finally after a bit of your help.  
thank you @nytai !
   
   For others
   
   ```
       sqlalchemy_url = "postgresql://" + db_user + ":" + db_pass + "@" + db_ip 
+ ":" + str(db_port)+"/" + db_name
   
       data_out = {
         "allow_csv_upload": True,
         "allow_ctas": True,
         "allow_cvas": True,
         "allow_dml": True,
         "allow_multi_schema_metadata_fetch": True,
         "allow_run_async": True,
         "cache_timeout": 0,
         "database_name": db_name,
         "expose_in_sqllab": True,
         "impersonate_user": True,
         "sqlalchemy_uri": sqlalchemy_url
       }
   
       head = {
           "Authorization": "Bearer " + bearer_token,
           "X-CSRFToken": csrf_token
       }
   
       response = session.post(url=url, headers=head, json=data_out)
       response.raise_for_status()
   
       return response
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

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