-
Notifications
You must be signed in to change notification settings - Fork 14
Utilities Examples
Arya Ketan edited this page Aug 13, 2015
·
1 revision
Follow these steps to generate schema using avro schema generator:
- This examples assumes a running MySql setup. It also assumes the user root with no password.
-
git clone aesop
(ignore if done already) - Run
mvn clean install
insample-mysql-relay
directory. This might take a while to download Aesop, Trooper and their dependencies from the various Maven repositories. - A
distribution
directory will be created in thesample-mysql-relay
directory. This directory is the distribution which contains the built sample. - To display help about schema generator, execute following command
java -cp "lib/*" com.flipkart.aesop.avro.schemagenerator.main.SchemaGeneratorCli -help
- Following command generates avro schema of all tables in database
or_test
and saves the .avro files of each table in a folder at path~/Desktop/schema
java -cp "lib/*" com.flipkart.aesop.avro.schemagenerator.main.SchemaGeneratorCli -d or_test -f ~/Desktop/schema -v 1
- Successful execution of command will print a lot of log messages on terminal followed by following success message:
**********************************************************************************
********* Written Schema to folder /Users/<username>/Desktop/schema ***********
**********************************************************************************