Forum Discussion
Import USDA PSD DATA BASE
- 1 year ago
Hi MirkoBotello,
Thank you for reaching out to the Microsoft fabric community forum.
After reviewing the details you provided, I have identified few workarounds that may help resolve the issue. Please follow these steps:
Thank you for reaching out. I understand that you're trying to retrieve Production, Supply, and Distribution (PSD) data from the FAS-USDA API without manually downloading the large datasets each time. Let's review some potential issues and solutions to help you obtain the data successfully.Possible Reasons for an Empty Folder:
Missing Required Parameters - The API may need specific commodity codes (e.g., Oilseeds and Grains), a market year, or a report type to return results.
API Pagination – If the API returns data in pages, you may need to loop through multiple pages to get the full dataset.
Invalid API Key or Request Format – Ensure your API key is correct and properly included in the request headers.
Incorrect Endpoint Usage – The GetAllData endpoint might not return all records unless proper filters are applied.If you are still getting empty response, print "response.text" to check for the cause of the error.
I hope this could resolve your issue, if you need any further assistance, feel free to reach out. If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Here i am leaving the links i think may help to create the code
https://apps.fas.usda.gov/psdonline/app/index.html#/app/downloads