Skip to content

A prototype of an ETL and API for Open Denton

Notifications You must be signed in to change notification settings

newswim/denton_data

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A prototype of an ETL and API for Open Denton

This is a prototype of an application that imports data from the city of Denton's open data project into a permanent schema, and offers a flexible API on top of that schema. The db is PostgreSQL and the framework for the API is Sinatra.

Install & bootstrap

  • Install PostgreSQL
  • Make sure you have ruby installed
  • From the project directory, gem install bundler
  • Then bundle install
  • Run rake db:create db:migrate

Running

Troubleshooting

If you get the following error:

➜ psql: FATAL:  database "<user>" does not exist

Run the shell command, createdb. This creates a database with the name of the current user.

Source: Stack Overflow Article.


If you used Brew to install Postgres, you can also use services to start and stop the psql background service.

➜ brew tap homebrew/services        ## if you don't have it already installed
➜ brew services start postgresql
➜ brew services start postgresql

If the app crashes with the following warning:

$ ActiveRecord::ConnectionTimeoutError - could not obtain a connection from the pool within 5.000 seconds (waited 5.001 seconds); all pooled connections were in use:

You broke it!

Just kidding.. but the app will need to be restarted. We still need to build in some logic for handling blocking calls. Thanks fer yor patience!

About

A prototype of an ETL and API for Open Denton

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 87.7%
  • API Blueprint 11.7%
  • Shell 0.6%