SML0127 commented on code in PR #3904: URL: https://github.com/apache/flink-cdc/pull/3904#discussion_r1991588299
########## flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-iceberg/src/main/java/org/apache/flink/cdc/connectors/iceberg/sink/IcebergDataSinkOptions.java: ########## @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.cdc.connectors.iceberg.sink; + +import org.apache.flink.cdc.common.configuration.ConfigOption; + +import static org.apache.flink.cdc.common.configuration.ConfigOptions.key; + +/** Config options for {@link IcebergDataSink}. */ +public class IcebergDataSinkOptions { Review Comment: I wonder what you think about receiving [`catalog-name`](https://iceberg.apache.org/docs/latest/flink-connector/#:~:text=constant%20iceberg.-,catalog%2Dname,-%3A%20User%2Dspecified%20catalog) as a separate option. And I understand that the current code separates the namespace and table name based on `dot` This method is also possible, but I would like to ask for opinions on providing the namespace name as a separate option. ```suggestion public class IcebergDataSinkOptions { public static final ConfigOption<String> CATALOG_NAME = key("catalog.name") .stringType() .noDefaultValue() .withDescription("The name of iceberg catalog to use"); public static final ConfigOption<String> NAMESPACE_NAME = key("namespace.name") .stringType() .noDefaultValue() .withDescription("The name of iceberg namespace to use"); ``` [TableIdentifier.java](https://github.com/apache/iceberg/blob/main/api/src/main/java/org/apache/iceberg/catalog/TableIdentifier.java#L44-L52) ```java public static TableIdentifier of(Namespace namespace, String name) { return new TableIdentifier(namespace, name); } public static TableIdentifier parse(String identifier) { Preconditions.checkArgument(identifier != null, "Cannot parse table identifier: null"); Iterable<String> parts = DOT.split(identifier); return TableIdentifier.of(Iterables.toArray(parts, String.class)); } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
