Create and push Socrata datasets from Arc SDE feature classes
This program provides a command-line utility to create Socrata datasets from Arc SDE feature classes and push their contents in using an efficient transfer process provided by Socrata's DataSync utility. Optionally, you can use a list of pushes to create a recurring sync job that can run on a cron tab / Windows task.
Supports proxy servers, logging, and email alerts (via DataSync's out-of-the-box functionality).
- Java Runtime JDK
- DataSync
- ArcGIS Desktop with Python and ArcPy
- Clone this repository
- Put the DataSync
.jar
file inside the directory - Optionally, create a virtual environment using
virtualenv --system-site-packages venv
and activate using. venv/bin/activate
(unix) orvenv/Scripts/activate
(windows) - Install dependencies via
pip install -I -r requirements.txt
- Install the command-line utility via
python setup.py install
- Register a Socrata app token
- Copy
config/config.sample.json
toconfig/config.json
and fill it in (help) - Optionally, fill in table and dataset ID information in
config/datasets.yaml
Usage:
sdesocrata create <table> [--key=objectid] [--public] [--config=<config_path>]
sdesocrata push <table> <id>
sdesocrata push --list=<list_path>
sdesocrata -h | --help
sdesocrata --version
Options:
--public Set dataset permissions to public
--config=<config_path> Path to config file [default: ./config/config.json]
-h --help Show this screen.
--version Show version.
Examples:
sdesocrata create Council_Districts_2016
sdesocrata push Council_Districts_2016 jo21-8sz0
sdesocrata push --list=config/datasets.yaml
Command-line setup followed this helpful tutorial.