Hi,

I have a question regarding using Window Functions against the result set in redash querying against mongo db.

Below is my query, without the window function the query runs fine against the datasource. The Datasource result set is populated against the mongodb. Does redash support SQLite functions when we run query against the datasource result set?

SELECT label_workflowName,
       label_processId,
       label_instanceId,
       label_owner,
       label_activityName,
       label_assessmentType,
       label_activitiessubType,
       'Recommendations_Provided' AS KeyField,
       value_Recommendations_provided AS ValuePair,
       lead(value_Recommendations_provided,1,0) Over(PARTITION BY label_instanceId Order BY label_processId,label_instanceId)  LeadRank
   FROM Query_41
   WHERE ValuePair IS NOT NULL
   Order by label_processId,label_instanceId

Thanks,
Vijay

Welcome to the forum! Prior to Redash V8, SQLite window functions were not available. Window Functions were added to SQLite in v3.25 (Sep. 2018). We upgraded Redash’s version of SQLite this summer as part of our V8 release. If you run Redash V7 or older then you need to upgrade to use window functions with the Query Results Data Source.

2 Likes

Thanks for your response. We will check and soon update to the later version. We are using Redash V7

Hello,

when I try to connect the result of my query in the data source, indeed the connection succeeds well but the problem the content is not displayed,
how to do please