Skip to content
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

Add resource data to CKAN DataStore #9

Merged
merged 3 commits into from Oct 31, 2017
Merged

Add resource data to CKAN DataStore #9

merged 3 commits into from Oct 31, 2017

Conversation

brew
Copy link
Contributor

@brew brew commented Oct 30, 2017

If push_resources_to_datastore: true, add streaming resources to the CKAN DataStore.

Uses tableschema-ckan-datastore Storage plugin to create and write resource data to the CKAN Datastore.

Closes #2.

If `push_resources_to_datastore: true`, add streaming resources to the
CKAN DataStore.
@brew brew requested a review from amercader October 30, 2017 15:46
Copy link
Member

@amercader amercader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. The only thing to mention is the upsert / insert support that we discussed on Slack

self.dataset_id = None

base_path = "/api/3/action"
self.__base_url = parameters['ckan-host']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rtrim('/') to avoid duplicate slashes?

dump.to_ckan can now accept an optional
`push_resources_to_datastore_method` parameter that can accept the
following string values: 'insert', 'upsert', 'update'. These will be
used by the CKAN API call to datastore_upsert as the method parameter.
The default is 'insert'.
Copy link
Member

@amercader amercader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@brew brew merged commit cc98628 into master Oct 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants