Philadelphia Open Crime Data on Phoenix / HBase

This is an update to a previous article on accessing Philadelphia Open Crime Data and storing it in Apache Phoenix on HBase.

It seems an update to Spring Boot, Phoenix and Zeppelin make for a cleaner experience.

I also added a way to grab years of historical Policing data.

All NiFi, Zeppelin and Source is here:

Part 1:

We convert JSON to Phoenix Upserts.
We push JSON Records to HBase with PutHBaseReord.

Query Phoenix at the Command Line, Super Fast SQL


Example Data
"location_block":"S 38TH ST / MARKETUT ST",
"text_general_code":"Other Assaults",

Create a Phoenix Table

/usr/hdp/current/phoenix-client/bin/ localhost:2181:/hbase-unsecure

CREATE TABLE phillycrime (dc_dist varchar,
dc_key varchar not null primary key,dispatch_date varchar,dispatch_date_time varchar,dispatch_time varchar,hour varchar,location_block varchar,psa varchar,
text_general_code varchar,ucr_general varchar);

Add NiFi / Spring Boot Connectivity to Phoenix

Run spring boot …