dmk

command module
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2018 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Data Migration Kit

DMK Release Build Status Go Report Card

DMK - Data Migration Kit

Work in Progress

This project is under development.


Alpha Preview

On MacOS with brew installed.

Run:

brew tap cjimti/homebrew-tap
brew install dmk

Upgrade:

brew upgrade dmk

Testing

Use docker-compose to bring up Cassandra and MySql test databases.

$ docker-compose up

Create example Keyspace and table in Cassandra:

$ docker run -it --rm -v $(pwd)/dev/cassandra.cql:/setup.cql --net host \
     cassandra cqlsh localhost 39042 -f /setup.cql

Use the official Cassandra image to open a cqlsh session to the local Cassandra running from the docker-compose above.

$ docker run -it --rm --net host cassandra cqlsh localhost 39042

Run the following example migrations in order:

go run ./dmk.go -d examples -p example run -v example_csv_to_cassandra
# check: select * from example.migration_data;

go run ./dmk.go -d examples -p example run -v cassandra_to_cassandra_by_name example
# check: select * from example.migration_data_name;

go run ./dmk.go -d examples -p example run -v cassnadra_to_cassandra_name_lookup example
# check: select * from example.migration_name; 

go run ./dmk.go -d examples -p example run -v cassandra_to_cassandra_using_collector example
# check: select * from example.migration_sets;


Todo

  • Reuse DB connection for script run sub-migrations.
  • Better error messaging (location of error)
  • General Performance improvements.

Development

Run go run ./dmk.go -d ./examples/

Use godep save after adding any dependencies.

Release Development

Uses goreleaser:

Install goreleaser with brew (mac):

brew install goreleaser/tap/goreleaser`

Build without releasing:
`goreleaser --skip-publish --rm-dist --skip-validate`

Release:

```bash
GITHUB_TOKEN=$GITHUB_TOKEN goreleaser --rm-dist
Containers

Containers for testing MySql and Cassandra databases.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址