-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import DataPackages #29
Comments
What to do with It sounds like the source, but we also have the
I'm not sure about that, though, because |
What about the datapackage The solution seems to involve |
There're a few issues with datapackage's |
Currently, it just creates a dataset, not its resources.
I've been trying to upload the datapackage's resources to CKAN but couldn't figure out yet. I've found a couple issues:
@amercader do you know a better way? https://github.com/ckan/ckanapi is able to upload datasets because it uses HTTP requests, which I'm trying to avoid because I think it would open another can of worms. |
We'll need the object itself to gather information on the local paths for local resources. It's also way better to pass classes around instead of using pure dicts.
The tests are currently failing because of an issue with CKAN solved in ckan/ckan#2801 |
If the inlined data is a string, upload it as is. If not, dump it as a json string and upload. This leaves a few important cases unhandled, like a list that represents a CSV.
CKAN's datasets can only have lowercase names
This code doesn't actually ensure the `name` uniqueness, as there can be a chance the random name exists as well. That change is slim, though, as it generates the name based both on its data package's name and a random number out of 10 billion possibilities.
For a better explanation about what is an unsafe datapackage, check frictionlessdata/datapackage-py#24
The format of the extras was wrong.
This is required for CKAN resources
Uploading inline resources work partially. The issue is described in #34. |
datapackage.json
with a resource like{ "path": "/etc/shadow" }
or other local file. The paths MUST be only relative to its zip file.The text was updated successfully, but these errors were encountered: