These are chat archives for getredash/redash

19th
Dec 2016
Neil Shah
@shahneil88
Dec 19 2016 03:03
@arikfr - I am having some issues trying to connect to Google Spreadsheet. I am trying to follow this example
https://redash.io/help/queries/query-google-spreadsheets.html
1) I have got a json key file after creating a service account.
2) I selected a new data source in redash and added json file to it.
3) Ran a new query selecting Google Spreadsheet as the option. I ran query like 1BFaT5s7CSl0qFLI8tu2xyRhgQitOaqjtx-1234fcvd|0
4)I picked up 1BFaT5s7CSl0qFLI8tu2xyRhgQitOaqjtx-1234fvcd from the URL of my spreadsheet. Let me know if this is what is expected when you say UUID
5) I ran the query, but it does not work. It does not give me any error on screen, neither do I see any error in logs
sunand chakradhar
@sunandchakradhar
Dec 19 2016 07:29
@arikfr i am using redash to query redshift and when a query runs a prolonged time than 10 min. its seems to loose connection and never return data back to ui. Is there a connection time out set ? i see this happening a lot since last update
Arik Fraimovich
@arikfr
Dec 19 2016 07:48
@joeinnes I'm not familiar enough with MongoDB, but if you can rename output columns then add the ::filter or __filter suffix to them.
@agamrafaeli you can use the google spreadsheet connector.
@shahneil88 which logs are you checking?
Neil Shah
@shahneil88
Dec 19 2016 07:51
@arikfr I checked api_error and celery_error
Arik Fraimovich
@arikfr
Dec 19 2016 07:52
and totally nothing in celery_error?
Neil Shah
@shahneil88
Dec 19 2016 07:52
No
Arik Fraimovich
@arikfr
Dec 19 2016 07:53
strange. and your data is in the first worksheet?
Neil Shah
@shahneil88
Dec 19 2016 07:54
Yes. It is. Wait... I think there is some time difference on my server. I can see the logs, but 5 minutes back
it is raising an exception
raised unexpected: SpreadsheetNotFound()
Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 240, in trace_task R = retval = fun(*args, **kwargs) File "/opt/redash/redash.0.11.1.b2095/redash/tasks/base.py", line 13, in __call__ return super(BaseTask, self).__call__(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 437, in __protected_call__ return self.run(*args, **kwargs) File "/opt/redash/redash.0.11.1.b2095/redash/tasks/queries.py", line 440, in execute_query return QueryExecutor(self, query, data_source_id, metadata).run() File "/opt/redash/redash.0.11.1.b2095/redash/tasks/queries.py", line 390, in run data, error = query_runner.run_query(annotated_query) File "/opt/redash/redash.0.11.1.b2095/redash/query_runner/google_spreadsheets.py", line 129, in run_query spreadsheet = spreadsheet_service.open_by_key(key) File "/usr/local/lib/python2.7/dist-packages/gspread/client.py", line 178, in open_by_key raise SpreadsheetNotFound
Arik Fraimovich
@arikfr
Dec 19 2016 07:56
It's either the wrong key or it doesn't have permission to access it.
did you share the spreadsheet with the service account's email address?
Neil Shah
@shahneil88
Dec 19 2016 07:56
To test it, I actually made it public
Arik Fraimovich
@arikfr
Dec 19 2016 07:56
I hope it doesn't have anything private, as you shared the id here...
Neil Shah
@shahneil88
Dec 19 2016 07:57
No. I edited the id
Arik Fraimovich
@arikfr
Dec 19 2016 07:57
:+1:
Neil Shah
@shahneil88
Dec 19 2016 07:58
Let me fiddle around and spend some more time figuring it out. Keys seems ok. Let me try with different permissions
Neil Shah
@shahneil88
Dec 19 2016 08:04
@arikfr - In the example you mentioned that email address should be something like 43242343247-fjdfakljr3r2@developer.gserviceaccount.com in json file, but what I have is myprojectname@somename-c2314.iam.gserviceaccount.com . Not sure if developer / iam user is the issue
Arik Fraimovich
@arikfr
Dec 19 2016 08:04
When they rolled out the IAM service, the emails changed. You need to use whatever you got in the file/from google.
Neil Shah
@shahneil88
Dec 19 2016 08:05
Ok
Jordan Halterman
@kuujo
Dec 19 2016 08:24
For some reason when I execute queries the results are properly returned to the client, but they’re not displayed in the Table below the columns. When I download a CSV file I can see the results, and I can see them in the response data. Is that expected? What might I be missing?
actually not seeing results in any of the visualizations
Arik Fraimovich
@arikfr
Dec 19 2016 08:25
Can you share the CSV with me?
Jordan Halterman
@kuujo
Dec 19 2016 08:26
It’s just a query of the queries table:
id,updated_at,created_at,version,org_id,data_source_id,latest_query_data_id,name,description,query,query_hash,api_key,user_id,last_modified_by_id,is_archived,schedule,options
1,1482134120825,1482134120825,1,1,1,1,New Query,,SELECT COUNT(*) FROM queries,d8e705e7f906885725433bf94a57e7d3,823be2e5f89afb0ea76351520b78505c69aedd04,1,1,False,,"{""parameters"": []}"
2,1482135764431,1482135669478,2,1,2,2,New Query,,"data = LOAD 'public.queries';
DUMP data;",a31f4bf8c0450c6485960631450e273c,37710d55bfcaed60176f7be37d18fafde7977fae,1,1,False,,"{""parameters"": []}"
Arik Fraimovich
@arikfr
Dec 19 2016 08:27
and it shows completly nothing? what version are you using?
Jordan Halterman
@kuujo
Dec 19 2016 08:27
0.12.0.b2449
Arik Fraimovich
@arikfr
Dec 19 2016 08:28
it doesn't even show the headers?
zhanxin
@luozhanxin
Dec 19 2016 08:28
hi,Has anyone looked into SAML Authentication?
Jordan Halterman
@kuujo
Dec 19 2016 08:28
yeah it shows the headers
great project BTW!
Arik Fraimovich
@arikfr
Dec 19 2016 08:28
thanks :)
Jordan Halterman
@kuujo
Dec 19 2016 08:28
so yeah, table headers but no data
Arik Fraimovich
@arikfr
Dec 19 2016 08:28
I think there is something in the result set that "breaks" the table. If you query for just id and name, do you see the results?
Jordan Halterman
@kuujo
Dec 19 2016 08:29
ahh yep
I’ll play around with it thanks!
sunand chakradhar
@sunandchakradhar
Dec 19 2016 08:40
@arikfr looking at celery_error.log shows Task redash.tasks.execute_query[4f541cd8-2323-46ab-81fb-6808395fed87] raised unexpected: WorkerLostError('Worker exited prematurely: signal 15 (SIGTERM).',)
sunand chakradhar
@sunandchakradhar
Dec 19 2016 08:47
what could be the reason ? how can we debug this ?
Arik Fraimovich
@arikfr
Dec 19 2016 08:48
Does it happen all the time?
Neil Shah
@shahneil88
Dec 19 2016 08:50
@arikfr - I managed to resolve the Google Spreadsheet issue. It seems sharing publicly doesn't help. You have to explicitly share it with the email id specified in json file.
sunand chakradhar
@sunandchakradhar
Dec 19 2016 08:53
@arikfr happens mostly when the query is taking longer than 9-10 min
Arik Fraimovich
@arikfr
Dec 19 2016 08:53
check if the OOM (out of memory) killer didn't kill the worker.
@shahneil88 :+1:
sunand chakradhar
@sunandchakradhar
Dec 19 2016 08:54
and when that happens all the requests stop returning response
i will have to restart celery to make any of them work again
Arik Fraimovich
@arikfr
Dec 19 2016 08:59
it might be that the oom killer kills supervisord as well. check your server logs.
sunand chakradhar
@sunandchakradhar
Dec 19 2016 09:17
okay. will try
Joe Innes
@joeinnes
Dec 19 2016 09:51
@arikfr thanks for your help! for any future redashers looking for this info, I was trying to add the '::filter' in the '$match' stage of the aggregation query. In order to fix it, I added another stage at the end like this: "$project": { "categoryToFilterOn::filter": "$categoryToFilterOn"} and it works beautifully
Arik Fraimovich
@arikfr
Dec 19 2016 09:58
:+1:
Joe Innes
@joeinnes
Dec 19 2016 10:43
@arikfr done :)
Arik Fraimovich
@arikfr
Dec 19 2016 10:44
@joeinnes even with a working example! you're awesome :100: :)
Alex
@afoonalex
Dec 19 2016 10:51
:+1: