Hello @Karishma Khubchandani and welcome to Microsoft Q&A.
I'm glad to see you are excited about the ability of Data Factory to support select *
on Salesforce source.
The reason you can use select *
here is because Data Factory supports use of either SOQL, or SQL-92. These two query languages look very similar, but there are important differences and limitations between them. These differences include how datetimes are used in the where
clause.
From your examples, it appears YESTERDAY
is part of SOQL, but not part of SQL. Since you are already using a concat
expression, try replacing YESTERDAY
with the actual date.
I am not sure exactly what should be returned by YESTERDAY
, but I do have something you can try.
@formatdatetime(adddays(startOfDay(utcnow()),-1),'yyyy-MM-dd HH:mm:ss')
I used the above expression to get yesterday's date in a Set Variable activity. It gets the current UTC datetime, then sets the time to start of day, then subtracts one day, and finally formats it for the SQL.
Let me know if this helps.