Giter Club home page Giter Club logo

tinkerbuntune's Introduction

tinkerbuntune

  • ETL for tinkerpop & neptune with bun & docker
    • CSV to tinkergraph: complete
    • tinkergraph to neptune: TBD
  • utils for building APIs and querying property graphs

TLDR!

  • TODO (noah): repo under active development: this will eventually become a proper readme file ;)~

links

ETL

### add peer deps
bun add type-fest gremlin

### add tinkerbuntune
# add latest
bun add github:nirv-ai/tinkerbuntune
# or specific version
bun add github:nirv-ai/tinkerbuntune#1.2.3
// everything is available @ tinkerbuntune/utils
// ETL a directory of CSVs into tinkergraph

// somefile.ts
import { csvToTinkergraph } from "tinkerbuntune/utils";
import { config } from "./config";
await csvToTinkergraph(config);

// config.ts
// TODO (noah): create example

ETL Pipeline

  1. config.transform{Header,Records}: this CAN potentially modify the record.col indexes supplied to later fns
  2. config.colMap.inject: this does NOT modify record.col indexes but injects data directly into TinkerData
  3. config.colMap.transform: receives each CSV record after steps and processes each column

docker scripts

  • example based on the practical gremlin air routes dataset

runtinkerpop.sh: gremlin console > gremlin server > tinkergraph

###  starts a gremlin server and gremlin console
./runtinkerpop.sh

### test the server is running & the tinker graph is loaded
curl "localhost:8182/gremlin?gremlin=g.V().has('code','SFO').valueMap()"
wget -qO- "localhost:8182/gremlin?gremlin=g.V().has('code','SFO').valueMap()"

### attach to the running console container
docker attach gconsole
Gremlin.version()
  • execute cmds against tinkergraph
  • ensure you're attached to the console container
//// gremlin console -> gremlin server -> tinkergraph
// connect to gremlin server
:remote connect tinkerpop.server conf/remote.yaml
// toggle remote mode
:remote console
g.V().count()

//// gremlin console -> tinkergraph
// toggle local mode
:remote console
// load air-routes data from practical gremlin
:load scripts/air-routes.groovy
g.V().count()

// detach from the gconsole container
ctrlp ctrlq

runutils.sh: bun > gremlin server

###  starts a bun server with gremlin javascript
./runutils.sh

### install deps and execute examples file
bun install
bun examples

tinkerbuntune's People

Contributors

noahehall avatar

Watchers

 avatar

tinkerbuntune's Issues

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.