Skip to main content
Question

CKANConnector - Reorder resources within a dataset - Place new resource at the top of the listing

  • November 18, 2022
  • 2 replies
  • 17 views

jpbarnes
Participant
Forum|alt.badge.img

Using the CKANConnector to Create Resource on OpenGov, works great the issue I'm having is how do you reorder the resources ( or place the new resource at the top of the ordering) by default the sequence number is Max + 1 placing the new resource at the bottom of the listing. In this case we have a few hundred Resources under that one dataset.

2 replies

debbiatsafe
Safer
Forum|alt.badge.img+20
  • Safer
  • November 19, 2022

Hello @jpbarnes​ 

Reordering of resources is not currently supported in the CKANConnector.

However, you should be able to use the HTTPCaller transformer to call CKAN's package_patch REST API endpoint to do this. Note that you must be authorized to edit the dataset and the groups that it belongs to in order to be able to successfully call this endpoint.

I have attached a workspace demonstrating this approach and I hope it helps.


jpbarnes
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • November 30, 2022

Thank you, I have been on a much needed Vacation, sorry for the delayed response. This looks much easier than what I was thinking.

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings