These are chat archives for getredash/redash

15th
Mar 2018
Hyunjung Kang
@hjkang87
Mar 15 2018 01:59

Hi guys, I'm having trouble with exporting csv/excel file from unsaved query (/queries/new).
It works on saved queries, but when I tried exporting from new query, I got 500 error.
Among the error log, I found this part.

DataError: (psycopg2.DataError) invalid input syntax for integer: "undefined"
LINE 3: WHERE queries.id = 'undefined' AND 1 = queries.org_id
                           ^
 [SQL: 'SELECT queries.query AS queries_query, queries.updated_at AS queries_updated_at, queries.created_at AS queries_created_at, queries.id AS queries_id, queries.version AS queries_version, queries.org_id AS queries_org_id, queries.data_source_id AS queries_data_source_id, queries.latest_query_data_id AS queries_latest_query_data_id, queries.name AS queries_name, queries.description AS queries_description, queries.query_hash AS queries_query_hash, queries.api_key AS queries_api_key, queries.user_id AS queries_user_id, queries.last_modified_by_id AS queries_last_modified_by_id, queries.is_archived AS queries_is_archived, queries.is_draft AS queries_is_draft, queries.schedule AS queries_schedule, queries.schedule_failures AS queries_schedule_failures, queries.options AS queries_options \nFROM queries \nWHERE queries.id = %(id_1)s AND %(param_1)s = queries.org_id'] [parameters: {'id_1': u'undefined', 'param_1': 1}]
[2018-03-15 10:50:43,825][PID:16763][ERROR][redash] Exception on /api/queries/undefined/results/558883.xlsx [GET]

I'm using 3.0.0+b3134 (just updated last night..)
Do you have any idea on this? Thank you!

Tobias Macey
@blarghmatey
Mar 15 2018 18:05
I'm working on building an automated deployment and management for Redash and I'm wondering if there's any support for managing the data sources programmatically? Whether that's via the API, ENV variables, a settings file on disk, etc.
From looking through the code I'm starting to get the impression that my only option would be to script insertions into the Redash database for updating credentials...
Ryan Buchmeier
@mariomarine
Mar 15 2018 19:54
Hi all, I am trying to set up my own Redash instance. And I think the setup work, other than when I go to localhost:8080 it shows "Error occured while trying to proxy to: localhost:8080/login?next=/". Anyone else run into this?
George Tseres
@GiorgosTseres_twitter
Mar 15 2018 22:25
@hjkang87 did you try running this directly through the editor? It seems like a SQL issue to me. Isn't the queries.id column an integer column?
@blarghmatey redash database is a regular Postgres database. You could use psql to authenticate to the DB and insert a row to the appropriate table for a datasource to be added.