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

column mapping expression添加默认值 #233

Closed
aladingg opened this issue Apr 23, 2019 · 2 comments
Closed

column mapping expression添加默认值 #233

aladingg opened this issue Apr 23, 2019 · 2 comments

Comments

@aladingg
Copy link

Feature Request

**由于历史原因,有2种不完全的分库分表实施方案:
1.分库名无后缀,表名有后缀,例如2个分库都为store,分库中的表名分别 为log_1,log_2
2.分库名有后续,表名无后缀,例如2个分库为store_1,store_2,分库中的表名都为log

**data migration工具强制要求分库分表有数字后缀,所以不支持以上2种情况的合并操作

**建议2种方案修改:

  1. 在prefix==name的情况下,将schema id和table id默认为0,具体修改点在pkg/column-mapping/column.go文件,函数为computeID
  2. 添加新的expression :-D

望采纳,谢谢!

@kennytm
Copy link
Contributor

kennytm commented May 2, 2019

Column mapping supports using null or empty string "" to skip assigning the schema/table IDs. So in your cases you could write:

  1. ["1", "", "log_"]
  2. ["1", "store_", ""]

@aladingg
Copy link
Author

aladingg commented May 5, 2019

Column mapping supports using null or empty string "" to skip assigning the schema/table IDs. So in your cases you could write:

  1. ["1", "", "log_"]
  2. ["1", "store_", ""]

thx a lot, and this ran perfectly:-)

@aladingg aladingg closed this as completed May 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants