Comments (6)
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.
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.
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.
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.
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.
note that we now have ckanapi search datasets
for getting packages with package_search, closing this issue
from ckanapi.
Related Issues (20)
- An extra "-" is added to filenames when dumping datasets
- URL already in use, but cannot update
- Enhancement: Use CKAN_INI env variable like CKAN cli command HOT 1
- Provide example of how to use the new package_revise HOT 5
- Add expanded note/examples on ckanapi's ability to work with plugins that extend the CKAN Action API HOT 1
- Bug: Error message processing fails with package_revise HOT 7
- ckanapi dump dataset --all -D $PWD fails HOT 4
- Cannot run on Python 3.10 HOT 1
- Web Scaping in Python for Large data set from CKANAPI HOT 2
- setup.py version is 4.5, but the latest release is 4.6 HOT 1
- how to download resources via search HOT 2
- dataset dump does not have attachments HOT 1
- next release HOT 2
- dataset search: query with white space
- Where can i find the documentation on fq query parameters like res_url, res_name, ecc.? HOT 1
- Ckanapi hanging after load command HOT 5
- ssl error
- ckanapi error on html.entities
- Error handling problems
- Resource uploads fail on LocalCKAN HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ckanapi.