简体   繁体   English

Nifi处理器CaptureChangeMySQL可以处理架构名称模式中的连字符吗?

[英]Can Nifi processor CaptureChangeMySQL handle hyphens in schema name pattern?

Working with Nifi 1.3.0 and MySQL Server 5.7 for testing of CaptureChangeMySQL processor. 与Nifi 1.3.0和MySQL Server 5.7一起测试CaptureChangeMySQL处理器。 Unfortunately, the schema I want to keep track of changes is hyphened like schema-name-here.table_is_fine , and the property "Database/Schema Name Pattern" in CaptureChangeMySQL processor can't understand it. 不幸的是,我想跟踪更改的schema-name-here.table_is_fineschema-name-here.table_is_fine一样被schema-name-here.table_is_fine ,并且CaptureChangeMySQL处理器中的属性“数据库/模式名称模式”无法理解它。

Does NiFi have a way to handle this kind of naming? NiFi是否可以处理此类命名? I've tried `, ', and " but it seems to treat schema names with those quotations surrounding as unique to their counterpart without them. 我已经尝试过`,'和“,但是似乎将模式名称与那些引号一起视为没有它们的对应名称所独有。

The Database/Schema Name Pattern field for the CaptureChangeMySQL processor expects a Java regex pattern string. CaptureChangeMySQL处理器的“ 数据库/模式名称模式”字段需要Java正则表达式模式字符串。 From the CaptureChangeMySQL processor documentation : CaptureChangeMySQL处理器文档中

A regular expression (regex) for matching databases (or schemas, depending on your RDBMS' terminology) against the list of CDC events. 用于将数据库(或模式,取决于RDBMS的术语)与CDC事件列表进行匹配的正则表达式(regex)。 The regex must match the database name as it is stored in the RDBMS. 正则表达式必须与存储在RDBMS中的数据库名称匹配。

So, yes, it should be able to handle just about any schema name. 因此,是的,它应该能够处理几乎所有架构名称。 Make sure you are using a valid regex pattern string, as internally, it will be passed to Pattern.compile(YOUR_SCHEMA_NAME_PATTERN) , where YOUR_SCHEMA_NAME_PATTERN is whatever you enter for the Database/Schema Name Pattern field. 确保在内部使用有效的正则表达式模式字符串,该字符串将传递给Pattern.compile(YOUR_SCHEMA_NAME_PATTERN) ,其中YOUR_SCHEMA_NAME_PATTERN是您在“ 数据库/模式名称模式”字段中输入的内容。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM