-
Notifications
You must be signed in to change notification settings - Fork 83
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
Support for Data Management API #186
Comments
@ryan-hall thanks for the suggestion. Of course, it would be interesting to support as much of the Socrata API as possible. I've finally had a chance to review the documentation so now getting to a few questions to help understand current capabilities and what the Data Management API can provide. First, I want to make sure we understand the new capabilities with this data set. Overall flowIt seems there are two main verbs that are reused across all actions: creating revisions and applying revisions. For some functions, there are other steps in between, but these are universal. Depending on the action, creating revisions and applying revisions may need to have different arguments Questions
Creating a new data setIt appears the new API supports the creation of a few data set through the API (🙌). It appears creating a new data set requires several steps: creating a new revision, create a new source (i.e. If I understand this correctly, this gives us a few options. While there are multiple steps to create a file, we could create several functions to make the process easier:
Questions
Updating metadataAwesome there is support for updating metadata for both data sets and columns. It appears these are the valid metadata fields that can be updated for the entire data set:
For column metadata, it appears you can update the following metadata fields:
Questions
Updating Column Data TypesThis seems straight forward. Legacy support for write.socrata()The current function is
|
@tomschenkjr Hi Tom, I work for Fulton County Government in GA, I'd be very interested in contributing to this. We've been using the
I have very limited git/github experience, so I'm not sure what the best way to share that code would be, if you're interested in taking a look.
|
@matt-sandgren - thanks! That's terrific and happy that you'd be interested in helping. Certainly understand that you don't have a lot of GitHub experience, but perhaps we can do some preliminary sharing of the code to fit it within the RSocrata package. Not sure if you've done this before, but you can share code in gist. You can simply copy/paste code without needing to use any git commands. If you create a "Public Gist", we can then take a look at the code. Just copy and paste the link once it's created. |
|
I've been exploring separate functions for each step in this fork. Thanks for sharing what you've been using @matt-sandgren. I've focused on the flow for updating a dataset from a local csv. To some of your original questions, @tomschenkjr: Overall Flow
Creating a new data set or updating an existing dataset
Updating Metadata
Legacy support for
Note on validating an upload to a revisionWhen data is uploaded to a revision, Socrata checks every column for data type errors as well as running all transforms against the new data. This can be quick, or can take a hot minute. If you try and apply the revision before the validation step has finished, the apply step will fail. You can check
|
Yes! I would really love to see the developer API Key supported for UPSERT and REPLACE. Any plans to include this soon? |
Enhancement:
The Socrata Data Management API (https://socratapublishing.docs.apiary.io/#) enables Socrata publishing features like dataset drafts and on-platform data transformations. It would be ideal if RSocrata offered data publishers a convenient method for using the Data Management API codepath when sending data to Socrata, in addition to the current SODA endpoints.
The text was updated successfully, but these errors were encountered: