In Azure data factory I want to retrieve all possible data there is in a salesforce table. Also, the archived and the deleted records. I try to do the following but it won't work:
SELECT * FROM test ALL ROWS
I also want the archived and the deleted rows of the test object in salesforce.

Failure happened on 'Source' side. ErrorCode=UserErrorOdbcOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=ERROR [HY000] [Microsoft][Salesforce] (120) SOQL_FIRST mode prepare failure:
SOQL error: [Microsoft][SQLEngine] (31480) syntax error near 'SELECT Id FROM test ALL ROWS<<< ??? >>>'.
SQL error: [Microsoft][SQLEngine] (31480) syntax error near 'SELECT Id FROM test ALL<<< ??? >>> ROWS'.,Source=Microsoft.DataTransfer.ClientLibrary.Odbc.OdbcConnector,''Type=System.Data.Odbc.OdbcException,Message=ERROR [HY000] [Microsoft][Salesforce] (120) SOQL_FIRST mode prepare failure:
SOQL error: [Microsoft][SQLEngine] (31480) syntax error near 'SELECT Id FROM Event ALL ROWS<<< ??? >>>'.
SQL error: [Microsoft][SQLEngine] (31480) syntax error near 'SELECT Id FROM test ALL<<< ??? >>> ROWS'.,Source=Microsoft Salesforce ODBC Driver,'
SELECT FIELDS(ALL) FROM Accountwill give you all columns you're allowed to see but will be capped at 2000 records. If you want to export more - you need to explicitly list the columns out, Salesforce doesn't support*.ALL ROWSis just for apex, Salesforce's server-side language. Over API it should be just thequeryAllcall which you're already using. Try queryAll withSELECT Id, Name FROM Account WHERE IsDeleted = trueand it should show you the records in the bin (if any)