-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Queries CLI - Fork query with visualizations #1253
Feature: Queries CLI - Fork query with visualizations #1253
Conversation
Is this still needed assuming #1256 is merged? |
I find quite useful have a CLI for query. Specifically this method because we are planning to use different orgs here. |
Maybe would be better if you merge #1256 first, then I make some changes to use the fork method from the |
I agree. I'll let you know once #1256 is merged. |
@WesleyBatista - I added the modified code to my redash and tried replicating queries using CLI. I receive below error. `[2016-09-20 11:14:33,274][PID:4376][ERROR][peewee] SELECT "t1"."id", "t1"."updated_at", "t1"."created_at", "t1"."name", "t1"."slug", "t1"."settings" FROM "organizations" AS t1 WHERE ("t1"."slug" = %s) LIMIT 1 [u'default'] Traceback (most recent call last): ProgrammingError: relation "organizations" does not exist |
I resolved it with arik's help. |
@WesleyBatista #1256 was merged. |
@WesleyBatista are you planning to update this or we can close it? |
Let's close it for now. When I have the time I will try to add more functionality to our CLI :) |
Nowadays, our 'fork' button do not copy the query's visualizations.
While it would be good to have this behavior 'fixed' on the button, I noticed that we do not have a CLI for queries. Also, I thought that would be easier to add a command line interface than make changes on the API, UI...
Example:
1. Create a query;
2. Create visualizations to the query created;
3. Execute
python manage.py queries fork 1
where 1 is the query id;> You need to navigate to the new query page created and run the query to get 'query_results'
Run
python manage.py queries fork --help
to get additional help for optional parameters.