-
Notifications
You must be signed in to change notification settings - Fork 679
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
I can't retrieve the updated or written field names; all I get are things like UNKNOWN_COL0. #612
Comments
Do I need to update the MySQL configuration to include column names? |
I was mistaken, indeed we need to add the following MySQL configurationto enable FULL row metadata and row images in the binlogbinlog_row_metadata=FULL |
I'm having a similar issue. When I run the code on my local connecting to an AWS RDS DB column names are present but same code deployed to AWS Fargate connecting to the same RDS instance with same credentials spits out UNKOWN_COL0, UNKNOWN_COL1, etc... Has anyone ever run into anything like this ? |
@pstanescu binlog_row_metadata=FULL |
@sean-k1 Where do you set those as they're already set in the RDS parameter group for the instance running mysql. |
Would you please state the vendor and version of the compatible database that you're using next time you create an issue? |
Thanks @dongwook-chan - I already did that as I mentioned in my prior message. Those parameters are already applied. As I stated in my original ask - same DB instance when I connect to it from my local machine everything works as expected but when I deploy and run the code from AWS Fargate task which connects to the same DB instance I get the UNKNOWN_COL0, etc... |
Any other thoughts on this @sean-k1 / @dongwook-chan ? By the way, 0.30.1 works fine, it's just when upgrading to version 1.0.8 it stops showing column names properly |
@pstanescu After you set that variable, Your binlog file has column Data so you should see the column mapping come out correctly. |
I am also running into this issue, but with MySQL 5.7 where |
Once I downgraded to 0.30.* or 0.45.1 I had no issues. FYI @pmcgannon22 |
@pmcgannon22 |
Have the same problem, Using AWS Aurora
|
@jiajie999 set binlog_row_metadata=FULL |
@sean-k1 The account does not have permission to set "binlog_row_metadata", how to solve this issue? |
import base64
from datetime import date, datetime
import json
import traceback
import pymysql
from pymysqlreplication import BinLogStreamReader
from pymysqlreplication.row_event import (
DeleteRowsEvent,
UpdateRowsEvent,
WriteRowsEvent,
TableMapEvent
)
def default(obj):
if isinstance(obj, datetime):
return obj.isoformat()
elif isinstance(obj, date):
return obj.isoformat()
elif isinstance(obj, bytes):
return base64.b64encode(obj).decode('ascii')
raise TypeError(f"Object of type {obj.class.name} is not JSON serializable")
class BinlogListener:
def init(self, mysql_settings):
self.mysql_settings = mysql_settings
self.stream = None
self.table_map = {}
The text was updated successfully, but these errors were encountered: