example2

command
v0.0.0-...-52cbd5f Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 6 Imported by: 0

README

Example 2

This builds on example1 but adds a custom DataProcessor to transform the data.

USAGE

mysql> source schema.sql   (make sure you read through schema.sql first)
$ go build
$ ./example2

This should have populated dstDB's users2 table using transformed data:

source (srcDB `users`):

	id    |  name
	------|-------
	123   |  Alex
	456   |  John

destination (dstDB `users2`):

	user_id  |  some_new_field
	---------|----------------
	123      |  whatever
	456      |  whatever

Our transformer changed the name id to user_id for the destination table. It also omitted the name field and used a new field some_new_field that wasn't present in the source table.

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