GithubHelp home page GithubHelp logo

Comments (6)

wardi avatar wardi commented on July 26, 2024

It's possible (and more efficient) to dump all datasets with package_search, but you have to be careful about duplicate or missing records that may appear in the results if datasets are being modified while you're dumping them.

Are you interested in helping to implement this? It shouldn't be too difficult.

from ckanapi.

ekzhu avatar ekzhu commented on July 26, 2024

I looked at the code in dump.py. It seems that it doesn't support making multiple paginated requests. catalog.data.gov has 193483 metadata so a single ckan.call_action with package_search is probably not going to return the complete result.

http://catalog.data.gov/api/action/package_search?rows=200&start=0

Does the current code support paginated requests somewhere?

from ckanapi.

wardi avatar wardi commented on July 26, 2024

No, using package_search is very different than the *_list, *_show that dump.py uses, so it won't be much help. getting dataset results from package_search should be very fast though, so you don't need dump.py's multiple-worker support. How about just writing it as a separate sub-command?

Also note that older versions of CKAN don't return the same data from package_search that they do from package_show, so it's useful to keep the current dump datasets implementation around for a little while.

from ckanapi.

ekzhu avatar ekzhu commented on July 26, 2024

Okay. Since it's convenient I will ask another question here. How do I know which version of the API am I calling. Is this

http://catalog.data.gov/api/action/package_search?rows=200&start=0

the newest API or do I have to explicitly add /3/:

http://catalog.data.gov/api/3/action/package_search?rows=200&start=0

Using /3/ may not work for some endpoints which don't have version 3.

from ckanapi.

wardi avatar wardi commented on July 26, 2024

in ckanapi so far I've omitted the api version when calling ckan because I've always wanted the latest version of the API.

from ckanapi.

wardi avatar wardi commented on July 26, 2024

note that we now have ckanapi search datasets for getting packages with package_search, closing this issue

from ckanapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.