cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving only last weeks data using Custom SQL Query for Generic JDBC mongo connector

suchitsanghvi
7 - Data Storage
7 - Data Storage

I am using Generic JDBC connector to import data from our MongoDB.
For certain requirements, I want to only import data from the past 7 days wrt the current date using the timestamp field present in the data.

I have tried a bunch of regular SQL functions like 'DATEDIFF' and 'DATE_SUB' but it seems like Custom SQL does not support these functions.

Is there any workaround or solution? Any help would be really appreciated, thanks!

1 REPLY 1

Diane_Kostka
Community Team Member
Community Team Member

Hello!

You would need to use the mongo supported function in the import queries to achieve the equivalent of the SQL function.  Please refer to this list of MongoDB supported functions

Hope that helps!

- Diane

Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email community@sisense.com