Skip to content

Commit

Permalink
[Fix](mysql) fix mysql datetime missing millisecond digits (apache#195)
Browse files Browse the repository at this point in the history
Co-authored-by: wudi <>
  • Loading branch information
JNSimba authored Sep 15, 2023
1 parent da648ac commit 666411c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

package org.apache.doris.flink.tools.cdc;
package org.apache.doris.flink.tools.cdc.mysql;

import com.ververica.cdc.connectors.shaded.org.apache.kafka.connect.data.SchemaBuilder;
import io.debezium.spi.converter.CustomConverter;
Expand Down Expand Up @@ -47,9 +47,9 @@ public class DateToStringConverter implements CustomConverter<SchemaBuilder, Rel

static {
DEFAULT_PROPS.setProperty("converters", "date");
DEFAULT_PROPS.setProperty("date.type", "org.apache.doris.flink.tools.cdc.DateToStringConverter");
DEFAULT_PROPS.setProperty("date.type", "org.apache.doris.flink.tools.cdc.mysql.DateToStringConverter");
DEFAULT_PROPS.setProperty("date.format.date", "yyyy-MM-dd");
DEFAULT_PROPS.setProperty("date.format.datetime", "yyyy-MM-dd HH:mm:ss");
DEFAULT_PROPS.setProperty("date.format.datetime", "yyyy-MM-dd HH:mm:ss.SSSSSS");
DEFAULT_PROPS.setProperty("date.format.timestamp", "yyyy-MM-dd HH:mm:ss.SSSSSS");
DEFAULT_PROPS.setProperty("date.format.timestamp.zone", "UTC+8");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.apache.doris.flink.catalog.doris.DataModel;
import org.apache.doris.flink.deserialization.DorisJsonDebeziumDeserializationSchema;
import org.apache.doris.flink.tools.cdc.DatabaseSync;
import org.apache.doris.flink.tools.cdc.DateToStringConverter;
import org.apache.doris.flink.tools.cdc.SourceSchema;
import org.apache.flink.api.common.eventtime.WatermarkStrategy;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
Expand Down

0 comments on commit 666411c

Please sign in to comment.