You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by Paweł Derecki <pa...@appliscale.io> on 2021/12/21 22:27:55 UTC

SQLAlchemy URI - automation

Hi, 

I want to edit existing database, especially change SQLAlchemy URI, but in an automated way. I didn’t find too much info about it on official docs: https://superset.apache.org/docs/rest-api <https://superset.apache.org/docs/rest-api>. Currently I’m working on mysql connection string. Does anyone know if we can automate this process? I work on AWS resources.

Thanks, 
Pawel

Re: SQLAlchemy URI - automation

Posted by Srinivasa Kadamati <sr...@preset.io>.
Pawel,

API is one way to programmatically modify Superset, but the Superset CLI is
another.

If you fire up a shell with the Python context running superset, you should
be able to just run *superset* to see a list of CLI options.

From there, you should see *set-database-uri *listed as a command: "
*set-database-uri
         Updates a database connection URI"*

 I've never run this command, but in theory this could let you accomplish
this task: *superset set-database-uri [input_stuff]*

Also -- you're welcome to ask questions to this mailing list, but it's
mostly core contributors / it's rarely used in general (minus for
announcements). I recommend joining the Superset Slack for these types of
tactical questions:
https://join.slack.com/t/apache-superset/shared_invite/zt-uxbh5g36-AISUtHbzOXcu0BIj7kgUaw
<https://join.slack.com/t/apache-superset/shared_invite/zt-uxbh5g36-AISUtHbzOXcu0BIj7kgUaw>

Srini

On Tue, Dec 21, 2021 at 6:42 PM Paweł Derecki <pa...@appliscale.io>
wrote:

> Hi,
>
> I want to edit existing database, especially change SQLAlchemy URI, but in
> an automated way. I didn’t find too much info about it on official docs:
> https://superset.apache.org/docs/rest-api <
> https://superset.apache.org/docs/rest-api>. Currently I’m working on
> mysql connection string. Does anyone know if we can automate this process?
> I work on AWS resources.
>
> Thanks,
> Pawel