Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get column names of a table? #30

Closed
ngocdaothanh opened this issue Mar 16, 2015 · 7 comments
Closed

How to get column names of a table? #30

ngocdaothanh opened this issue Mar 16, 2015 · 7 comments
Labels

Comments

@ngocdaothanh
Copy link

In TableMapEventData I can get DB name, table name, column types etc. But there's no info about column names.

How to get column names of a table? Is there a feature in mysql-binlog-connector-java to do that? Or must I use other tools like JDBC? It's very helpful if there's instruction about this in the README.

(Sorry this is a question. I don't know a better place to post it so I post it here.)

@shyiko
Copy link
Owner

shyiko commented Mar 16, 2015

Hi.

Unfortunately binary log is missing that piece of information so you'll have to use something like this.

P.S. This a perfect place for questions. Don't worry.
P.P.S. Leaving issue open until I add QA section to the readme.md.

@ngocdaothanh
Copy link
Author

Thanks! 👍
I guess this is the most frequently asked question.

I need the column names because I'm about to write a tool to replicate data from MySQL to MongoDB. I'll publish the tool to GitHub and let you know when it's ready, so that you can add it to the "Used by" section in readme.md.

@ngocdaothanh
Copy link
Author

I'll publish the tool to GitHub

Here it is:
https://github.com/ngocdaothanh/mydit

@shyiko
Copy link
Owner

shyiko commented Mar 20, 2015

Great. Please let me know when it's ready so that I would add it to the "Used by" section. Thank you.

shyiko added a commit that referenced this issue Mar 20, 2015
@shyiko shyiko closed this as completed Mar 20, 2015
@ngocdaothanh
Copy link
Author

Thanks 👍

It's ready now.
You can download the first version and use it right away:
https://github.com/ngocdaothanh/mydit/releases

In the next version, I'll improve it a little bit as you advised at #32.

@shyiko
Copy link
Owner

shyiko commented Mar 20, 2015

Cool 👍. Added to the readme.md.

@aaaweisen
Copy link

this point must add

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants