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

topics.regex support in BigQuery Sink Connector #261

Merged
merged 2 commits into from
Apr 21, 2020

Conversation

gkstechie
Copy link
Contributor

No description provided.

@CLAassistant
Copy link

CLAassistant commented Apr 1, 2020

CLA assistant check
All committers have signed the CLA.

@gkstechie
Copy link
Contributor Author

I've made TOPICS_CONFIG as an optional parameter because either one of the parameters should present (TOPICS_CONFIG or TOPICS_REGEX_CONFIG).

private static final String TOPICS_DISPLAY = "Topics";

public static final String TOPICS_REGEX_CONFIG = "topics.regex";
private static final ConfigDef.Type TOPICS_REGEX_TYPE = ConfigDef.Type.STRING;
Copy link
Contributor

@whynick1 whynick1 Apr 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When many different topics configured for one KCBQ connector, it will be odd to represent them all with single regex. How about make it a list of regex?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@whynick1
Copy link
Contributor

whynick1 commented Apr 15, 2020

Think it over. Now I tend to keep only TOPICS_CONFIG but treat it as a list of topic regex (rather than a list of topics). A couple reason:
1) We can support "regex based topics" without breaking back-compatibility
2) Less configurations (one rather than two)
3) No need to validate only one of TOPICS_CONFIG & TOPICS_REGEX_CONFIG is set.

Wasn't pay attention to the title. Looks like the TOPIC_REGEX_CONFIG is just mirroring https://github.com/apache/kafka/blob/1.1.1/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/SinkConnectorConfig.java#L38-L43

Copy link
Contributor

@whynick1 whynick1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in general! Just one suggested change. See below.

@whynick1 whynick1 merged commit 5e2dd7c into wepay:master Apr 21, 2020
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

Successfully merging this pull request may close these issues.

4 participants