Forum Discussion
Incremental refresh for MongoDB database
Will be happy if someone can help me π
i'm using MongoDB connected with PBI with BI connector to using ODBC DSN and every thing is working fine till now
recently i tried to setup incremental refresh by making Parameters <RangeStart> and <RangeEnd> then create filter for date/time columns filter-->betwwen and select in between dates. Once i close and Load the query the table gives error loading message "OLE DB or ODBC error: [DataSource.Error] ODBC: ERROR [HY000] [MySQL][ODBC 1.4(a) Driver][mysqld-5.7.12 mongosqld v2.14.5]This command is not supported in the prepared statement protocol yet."
Waiting my heroπ
25 Replies
- lbendlinSuper User
Are you running a custom query or are you applying the RangeStart/RangeEnd filter later in the Power Query transforms?
- KareemMostafa12Helper I
I'm just applying RangeStart/RangeEnd filter later in the power query
- lbendlinSuper User
May be that the query folding is not working properly for MongoDB. Apply the parameters directly in the ODBC call.
NOTE: one of the parameters must be inclusive and the other must be exclusive. Otherwise you end up with gaps or overlaps between partitions.
- lbendlinSuper User
You are supposed to replace your code, not append to it.
I used the [createdAt] field as an example - modify as needed.
- KareemMostafa12Helper I
Hi Ibendlin!
Yes my target column is also [CreatedAt] same as you mentioned in your code and i replaced with this code but when i click Done it gives this error message
ββ
- lbendlinSuper User
Good, making progress. What format does MongoDB expect for date or datetime fields? Is "2023-01-17" enough?