cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Datasphere dynamic source filter

andrewbarlow1
Participant
0 Kudos
774

Hi,

I am trying to put a source filter on a Salesforce source (derived via open connectors), to give me a delta.

On the source and target table I have a LastModifiedDate  as a timestamp.

The source filter I am applying is LastModifiedDate Greater Than $MAX_VALUE_LastModifiedDate.

In theory this should return the MAX LastModifiedDate from the target and apply it to the source so we only ask for the delta.

For some reason when it runs its complaining about the format.

HTTP 400: {"requestId":"6866753ce4b04a35c8c7f206","providerErrorCode":400,"message":"Bad Request","providerMessage":"[{\"message\":\"\\nWHERE LastModifiedDate > 2025-07-02 03:08:49.000000000 ORDER BY Id\\n ^\\nERROR at Row:1:Column:3466\\nunexpected token: '03'\",\"errorCode\":\"MALFORMED_QUERY\"}]"}

If I hard code a filter like this..... LastModifiedDate Greater Than 2025-07-03T14:00:00.000Z it works as expected.

I can't see a way of adding a modifier around this so I can't force a format unfortunately. 

Any help with this or a work  around would be great

 

 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

murllimaraati
Participant
0 Kudos

Are you using replication flow ? 

Try the below conversion.

TO_NVARCHAR(TO_TIMESTAMP(LASTMODIFIEDDATE), 'YYYY-MM-DD"T"HH24:MI:SS')

andrewbarlow1
Participant
0 Kudos

Hi - it's a Dataflow. I tried this  TO_NVARCHAR(TO_TIMESTAMP($MAX_VALUE_LastModifiedDate), 'YYYY-MM-DDTHH24:MI:SS'), however I get this....

Invalid column name "TO_NVARCHAR(TO_TIMESTAMP(LastModifiedDate), 'YYYY-MM-DDTHH24:MI:SS')" entered in the filter expression.

I don't think Open Connectors sources are allowed for Replication flows.

The $MAX_VALUE_LastModifiedDate works as expected but I cant use a modifier around this unfortunately. Thanks for the suggestion though.