-1

In datafactory i try to make a rest api get request to only get results of the past few days so i want to filter on postingdate but datafactory is replacing the spaces of the parameter woth %20 and now the get request is not working.

enter image description here

printscreen of error

enter image description here

printscreen of parameter

What the api url is supposed to end up looking like

https://api.businesscentral.dynamics.com/v2.0/abc/abc/api/abc/extendedPowerBI/v2.0/companies(abc)/valueEntries?$select=entryNo,externalDocumentNo,varianceType,dimensionSetID,documentNo,orderLineNo,documentLineNo,no,postingDate,costPerUnit,type,invoicedQuantity,documentDate,locationCode,genProdPostingGroup,inventoryPostingGroup,salespersPurchCode,itemLedgerEntryType,itemLedgerEntryQuantity,itemLedgerEntryNo,itemNo,sourceNo,sourceCode,costAmountExpected,costAmountActual,salesAmountActual,documentType,itemChargeNo,costAmountNonInvtbl,entryType,discountAmount&$filter=postingDate gt 2024-11-10
4
  • Is it the dataset parameter? or pipeline parameter? and provide the expected sample URL? Commented Nov 11, 2024 at 9:23
  • i edited to show what the the expected sample url is supposed to look like. But i would like to make the filter that the posting date is equal to the last date that is currently in the sql table. So i can append only new records. @RakeshGovindula Commented Nov 11, 2024 at 9:32
  • Is it a dataset parameter right? Commented Nov 11, 2024 at 9:42
  • yes @RakeshGovindula Commented Nov 11, 2024 at 9:46

1 Answer 1

0

If the above values resulting the characters %20 in the place of spaces, you can try to achieve your expression by reversing the expression.

&$filter=postingDate%20gt%202024-11-10

Try the above value in the parameter.

enter image description here

If it does not work, you can try the below dynamic expression in the dataset parameter.

@concat('&$filter=postingDate',decodeUriComponent('%20'),'gt',decodeUriComponent('%20'),'2024-11-10')

This expression converts the above characters into spaces and concatenates with the URL properties.

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.