These are chat archives for getredash/redash

5th
Jul 2016
Neil Shah
@shahneil88
Jul 05 2016 02:11
@mdwongca - You can login to your local redash psql instance. Type in sudo -u redash psql
flonpro
@flonpro
Jul 05 2016 06:45
HI
I NEED A REPORT WITH Filter ,but the redash only supports which without any filter .
is there any soluntion?
flonpro
@flonpro
Jul 05 2016 06:47
thanks a lot @arikfr
Alessandro Cosentino
@cosenal
Jul 05 2016 07:23
good morning
I love the fact that you can parametrize dashboards and queries on Redash. It would be nice if the View Query action from the dashboard would carry over the parameters
instead, if I click on it now from a parametrized dashboard, I get a Ā«Missing value for parametersĀ» error
contractor05
@contractor05
Jul 05 2016 09:38

hi, I need to convert a varchar column to datetime. the existing date format is like '06/15/2016 10:12:17'
I tired select to_date('06/15/2016 10:12:17','yyyy-MM-dd HH:MI:SS.SSSSS');
But it gives me 07/09/12, which is not right
can anybody help me on this please ?
select convert(datetime,'06/15/2016 10:12:17',102) --- this works in sql server but not in redash
I believe some other conversion needs to be done

Can anybody please assist me ?

Arik Fraimovich
@arikfr
Jul 05 2016 13:49
@cosenal I agree and actually it's a bug, that I will fix. Meanwhile if you click on the widget title it will take you the query with the parameters.

@contractor05 What database are you using?

Btw, this is a general SQL question and not Redash specific. You might have better luck with something like StackOverflow.

contractor05
@contractor05
Jul 05 2016 14:36
@arikfr I am using sql server 2014. My question is is there any different conversion criteria for redash, because when I try select convert(datetime,'06/15/2016 10:12:17',102) in sql server management studio it is working fine. But this is working in redash database
Arik Fraimovich
@arikfr
Jul 05 2016 14:37
@contractor05 Redash passes the query as is to SQL Server.
contractor05
@contractor05
Jul 05 2016 14:38

@arikfr when I run the query select convert(datetime,'06/15/2016 10:12:17',102) in redash I am getting below error

Error running query: syntax error at or near "," LINE 1: ...74ab7 */ select convert(datetime,'06/15/2016 10:12:17',102); ^

Arik Fraimovich
@arikfr
Jul 05 2016 14:39
is this the full error?
contractor05
@contractor05
Jul 05 2016 14:40
yes
I believe there is some other conversion syntax used in redash
I tired select to_date('06/15/2016 10:12:17','yyyy-MM-dd HH:MI:SS.SSSSS');
But it gives me 07/09/12, which is not right
Arik Fraimovich
@arikfr
Jul 05 2016 14:42
That's because you give it the wrong format.
don't you understand what the "yyyy-MM-dd..." means?
contractor05
@contractor05
Jul 05 2016 14:43

I need the dateformat like

2016-06-15 10:12:17

so to be more clear I need to convert 06/15/2016 10:12:17 to 2016-06-15 10:12:17
Arik Fraimovich
@arikfr
Jul 05 2016 14:43
ok, I see now
contractor05
@contractor05
Jul 05 2016 14:45
any help would be greatly appreciated
sivasankarmanuh
@sivasankarmanuh
Jul 05 2016 14:45

Hi Arik
Getting following error when I am trying to connect impala

Error running query: could not connect to server: Connection timed out Is the server running on host "192.168.3.164" and accepting TCP/IP connections on port 5432?

Arik Fraimovich
@arikfr
Jul 05 2016 15:03
@sivasankarmanuh are you sure you allowed access in your firewall from Redash to the Impala server?
contractor05
@contractor05
Jul 05 2016 15:09
@arikfr do we have any documentation for converting date formats in redash? seems it is different here
Arik Fraimovich
@arikfr
Jul 05 2016 15:10
There is no such thing as "converting date formats in redash". Redash has no SQL language of its own. It takes the query you write and send it to the database you use, hence you need documentation for the database you use.
Try changing your query to select convert(varchar(19),'06/15/2016 10:12:17',102)
^ @contractor05
contractor05
@contractor05
Jul 05 2016 15:13
@arikfr still not working
getting
Error running query: syntax error at or near "," LINE 1: ...9a */ select convert(varchar(19),'06/15/2016 10:12:17',102); ^
Arik Fraimovich
@arikfr
Jul 05 2016 15:14
Can you try this: select CONVERT(VARCHAR(10),GETDATE(),110)?
contractor05
@contractor05
Jul 05 2016 15:16
getting below error
Error running query: syntax error at or near "," LINE 1: ...9d72917c6f88bd */ select CONVERT(VARCHAR(10),GETDATE(),110); ^
Arik Fraimovich
@arikfr
Jul 05 2016 15:16
Are you sure you're using SQL ServeR? In the data sources did you pick the correct one??
sivasankarmanuh
@sivasankarmanuh
Jul 05 2016 16:22
Arik, checked iptables status and off the iptables. But getting same error.
Arik Fraimovich
@arikfr
Jul 05 2016 18:53
@sivasankarmanuh make sure you use the correct port (and IP).