Giter Site home page Giter Site logo

loadbluetoothdump's Introduction

loadbluetoothdump

if you use this and you're not james marca, you are insane.

waht?

This library parses a bunch of data from bluetooth detector dump from an oracle database, so as to load them into my postgresql database.

It uses node-postgres and rw

typical command line:

node lib/process_data.js /home/ftp/incoming/bluetooth_log-2014-07-30-*

but first you had better set up config.json properly, something like

{
    "postgresql": {
        "host": "127.0.0.1",
        "port":5432,
        "db": "mydb",
        "table":"bluetooth_data",
        "schema":"smartsig",
        "user":"myuser",
        "pass":"mypass"
    }
}

and then make sure to create the db stuff by doing

psql -U myuser -f sql/create.schema.sql mydb
psql -U myuser -f sql/perl_hash_decode.sql mydb

This will properly create tables and functions that are needed.

Then you can run the command line to parse files.

node lib/process_data.js /home/ftp/incoming/bluetooth_log-2014-07-30-*

It won't re-process a file, as it uses copy statements. So if you break something or some parse is broken because a file is broken, then you will need to either truncate the existing dbs and start over, or else split the file in question to get rid of the lines already processed.

Finally, this only understands the bluetooth data from the Beach Blvd (SR39) reports. Other detectors were not examined or processed.

loadbluetoothdump's People

Contributors

jmarca avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.