Skip to main content

When I attempt to replicate ContentDocumentLink with CData Sync from Salesforce to SQL, I am getting this error.

 

>0] 500] Could not execute the specified command: sf:MALFORMED_QUERY] MALFORMED_QUERY: Implementation restriction: ContentDocumentLink requires a filter by a single Id on ContentDocumentId or LinkedEntityId using the equals operator or multiple Id's using the IN operator.

 

The tool that I am looking to replace with CData Sync can do it.  Is there a workaround to get this object to replicate?

 

Thanks

Hi, thanks for reaching out to us at the CData Community!

 

That error simply indicates that the query you’re currently using is invalid. Some tables for certain data sources requires a specific filter in order to retrieve data via the API. In this case, ContentDocumentLink requires an Id to be specified in a WHERE clause before it is able to retrieve data. I’d like to emphasize that this is a limitation of the API itself, which isn’t something we have direct control over.

For example, the query would need to look something like this using a WHERE clause:

SELECT * FROM ContentDocumentLink WHERE Id = '12345'

SELECT * FROM ContentDocumentLink WHERE Id IN (SELECT Id FROM ContentDocument)

In order to include this information, you’d need to edit the “Query” from the task itself. The end result should look like this:

 

I hope that this clears up the issue! If you continue encountering issues, then I’d recommending reaching out to our support team at [email protected] for more detailed assistance.


Reply