Removing a datasource

214 views
Skip to first unread message

Frank Harris

unread,
May 8, 2015, 8:33:09 AM5/8/15
to redash...@googlegroups.com
All-

How do I remove a datasource from the list?

Best,
Frank

Arik Fraimovich

unread,
May 8, 2015, 10:12:33 AM5/8/15
to Frank Harris, redash...@googlegroups.com
I'm not sure what version you have, but if it's recent enough than you can do it with the CLI:

1. ssh to your instance.
2. cd to /opt/redash/current
3. Run: "sudo -u redash bin/run ./manage.py ds --help" to get the list of possible data source commands. If the version is recent enough, then you should have delete option.

If you upgrade to the latest version (see instructions) you get a web interface to edit datasources (http://redash.yourdomain.com/admin/datasource).

If the CLI command isn't available or you can't upgrade, let me know and I'll send instructions on how to do it manually.

-- 
Arik Fraimovich

--
You received this message because you are subscribed to the Google Groups "re:dash users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redash-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Frank Harris

unread,
May 8, 2015, 10:28:14 AM5/8/15
to Arik Fraimovich, redash...@googlegroups.com
Thanks Arik. I installed from the Google Image last night -- how do I know if I'm on the latest version? (Is the version displayed in the UI anywhere?)

Frank Harris

unread,
May 8, 2015, 10:29:52 AM5/8/15
to Arik Fraimovich, redash...@googlegroups.com
I don't see a delete option:

usage: manage.py ds [-h] {new,import_from_settings,list} ...

positional arguments:
  {new,import_from_settings,list}
    new                 Create new data source
    import_from_settings
                        Import data source from settings (env variables).
    list                List currently configured data sources

optional arguments:
  -h, --help            show this help message and exit

Arik Fraimovich

unread,
May 8, 2015, 10:55:48 AM5/8/15
to Frank Harris, redash...@googlegroups.com
"sudo sudo -u redash bin/run ./manage.py version" (the double sudo is not by mistake)
But the Google image is somewhat outdated, so I assume you on version 0.5.0, hence no remove option.

If you didn't create any queries with this data source, you can just delete it from the database. Actually, currently, the other options won't work either if you created any queries with it...

To delete it from the DB:
1. sudo sudo -u redash psql redash
2. delete from data_sources where name = '...';


-- 
Arik Fraimovich

Frank Harris

unread,
May 8, 2015, 11:00:27 AM5/8/15
to Arik Fraimovich, redash...@googlegroups.com
My version is 0.4.0+b589. When I try and run the update script it keeps prompting me for my user password -- yet doesn't accept whatever I type in. I'm connecting the instance via gcloud CLI. Is there some other quirk I should be aware of? (Or maybe a modification to the fabric script?)

Thanks for your help.

Best,
Frank

PS. I'm new to GCE much more familiar with AWS. I assumed if I wanted to Google Auth it would be necessary/easier to GCE. Maybe that isn't the case. Are the AWS images more up to date?

Arik Fraimovich

unread,
May 8, 2015, 11:18:21 AM5/8/15
to Frank Harris, redash...@googlegroups.com

GCE had an advantage only if you want to use it with BigQuery or your database hosted there.

To make it work you need to pass to the fab command the certificate gcutil uses (I think it's in ~./ssh folder). Also fabric supposed to be run from your machine and not the redash instance.

Frank Harris

unread,
May 8, 2015, 11:43:02 AM5/8/15
to Arik Fraimovich, redash...@googlegroups.com
Got it. Thanks.

FWIW, this is the fab command to run:
fab -i KEY_FULE -H HOST -u USER deploy_latest_release

-Frank

Arik Fraimovich

unread,
May 8, 2015, 3:27:40 PM5/8/15
to Frank Harris, redash...@googlegroups.com
Great, don't hesitate if you have further questions.

-- 
Arik Fraimovich
Reply all
Reply to author
Forward
0 new messages