五分钟上手Flink MySQL连接器
MySQL Connector可以将本地或远程的MySQL数据库连接到Flink中,并方便地使用Flink Table API与之交互、捕获数据变更、并将处理结果写回数据库。
本场景将以阿里云实时计算Flink版为基础,使用Flink自带的MySQL Connector连接RDS云数据库实例,并以一个实时商品销售数据统计的例子尝试上手Connector的数据捕获、数据写入等功能。
一、创建数据库表
进入RDS mysql的管理平台DMS。(注意登录的账号需要有读写权限。)
首先创建数据库test。
CREATE DATABASE IF NOT EXISTS test;
点击执行,创建成功后,打开此数据库的SQL Console。
建表语句如下
-- Source Table;
CREATE TABLE `source_table` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`good_id` int DEFAULT NULL,
`amount` int DEFAULT NULL,
`record_time` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
);
-- Dimension Table;
CREATE TABLE `dimension_table` (
`good_id` int unsigned NOT NULL,
`good_name` varchar(256) DEFAULT NULL,
`good_price` int DEFAULT NULL,
PRIMARY KEY (`good_id`)
);
-- Sink Table;
CREATE TABLE `sink_table` (
`record_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`good_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`sell_amount` int DEFAULT NULL,
PRIMARY KEY (`record_timestamp`)
);
选中后点击执行
执行成功后,返回如下结果
可以在左侧表列表看到对应的表
然后向数据库中插入多条数据,插入代码在下面:
INSERT INTO `dimension_table` (`good_id`, `good_name`, `good_price`)
VALUES
(1, 'Cheetah', 53),
(2, 'Puma', 46),
(3, 'Jaguar', 22),
(4, 'Panther', 18),
(5, 'Tiger', 99),
(6, 'Leopard', 84),
(7, 'Snow Leopard', 81),
(8, 'Lion', 17),
(9, 'Mountain Lion', 19),
(10, 'Mavericks', 77),
(11, 'Yosemite', 16),
(12, 'El Capitan', 16),
(13, 'Sierra', 85),
(14, 'High Sierra', 87),
(15, 'Mojave', 51),
(16, 'Catalina', 92),
(17, 'Big Sur', 14),
(18, 'Monterey', 99),
(19, 'Ventura', 15),
(20, 'Sonoma', 68);
INSERT INTO `source_table` (`id`, `good_id`, `amount`, `record_time`)
VALUES
(1, 16, 19, '2023-06-09 11:06:34'),
(2, 8, 20, '2023-06-09 11:06:35'),
(3, 19, 24, '2023-06-09 11:06:36'),
(4, 17, 23, '2023-06-09 11:06:37'),
(5, 2, 25, '2023-06-09 11:06:40'),
(6, 10, 28, '2023-06-09 11:06:44'),
(7, 20, 26, '2023-06-09 11:06:48'),
(8, 18, 19, '2023-06-09 11:06:49'),
(9, 16, 21, '2023-06-09 11:06:53'),
(10, 7, 19, '2023-06-09 11:06:55'),
(11, 7, 20, '2023-06-09 11:06:59'),
(12, 17, 21, '2023-06-09 11:07:03'),
(13, 2, 19, '2023-06-09 11:07:05'),
(14, 5, 22, '2023-06-09 11:07:08'),
(15, 10, 21, '2023-06-09 11:07:12'),
(16, 2, 29, '2023-06-09 11:07:16'),
(17, 6, 27, '2023-06-09 11:07:19'),
(18, 16, 23, '2023-06-09 11:07:23'),
(19, 8, 20, '2023-06-09 11:07:24'),
(20, 8, 31, '2023-06-09 11:07:26'),
(21, 6, 30, '2023-06-09 11:07:29'),
(22, 7, 21, '2023-06-09 11:07:32'),
(23, 2, 22, '2023-06-09 11:07:33'),
(24, 9, 23, '2023-06-09 11:07:37'),
(25, 19, 29, '2023-06-09 11:07:41'),
(26, 16, 31, '2023-06-09 11:07:45'),
(27, 13, 19, '2023-06-09 11:07:48'),
(28, 6, 20, '2023-06-09 11:07:50'),
(29, 4, 20, '2023-06-09 11:07:52'),
(30, 4, 25, '2023-06-09 11:07:54'),
(31, 4, 20, '2023-06-09 11:07:55'),
(32, 4, 21, '2023-06-09 11:07:58'),
(33, 11, 24, '2023-06-09 11:07:59'),
(34, 1, 24, '2023-06-09 11:08:03'),
(35, 7, 31, '2023-06-09 11:08:06'),
(36, 2, 27, '2023-06-09 11:08:10'),
(37, 19, 26, '2023-06-09 11:08:13'),
(38, 3, 23, '2023-06-09 11:08:15'),
(39, 11, 20, '2023-06-09 11:08:19'),
(40, 20, 21, '2023-06-09 11:08:23'),
(41, 7, 22, '2023-06-09 11:08:25'),
(42, 5, 21, '2023-06-09 11:08:29'),
(43, 7, 22, '2023-06-09 11:08:30'),
(44, 11, 28, '2023-06-09 11:08:31'),
(45, 2, 19, '2023-06-09 11:08:32'),
(46, 1, 26, '2023-06-09 11:08:36'),
(47, 3, 31, '2023-06-09 11:08:39'),
(48, 20, 20, '2023-06-09 11:08:41'),
(49, 6, 24, '2023-06-09 11:08:43'),
(50, 10, 28, '2023-06-09 11:08:44'),
(51, 11, 21, '2023-06-09 11:08:48'),
(52, 9, 20, '2023-06-09 11:08:52'),
(53, 5, 28, '2023-06-09 11:08:53'),
(54, 8, 28, '2023-06-09 11:08:54'),
(55, 15, 26, '2023-06-09 11:08:58'),
(56, 3, 26, '2023-06-09 11:09:01'),
(57, 19, 20, '2023-06-09 11:09:02'),
(58, 6, 22, '2023-06-09 11:09:03'),
(59, 1, 22, '2023-06-09 11:09:05'),
(60, 19, 25, '2023-06-09 11:09:08'),
(61, 17, 28, '2023-06-09 11:09:11'),
(62, 5, 25, '2023-06-09 11:09:12'),
(63, 16, 30, '2023-06-09 11:09:16'),
(64, 1, 23, '2023-06-09 11:09:17'),
(65, 1, 22, '2023-06-09 11:09:21'),
(66, 3, 19, '2023-06-09 11:09:22'),
(67, 10, 19, '2023-06-09 11:09:24'),
(68, 12, 20, '2023-06-09 11:09:26'),
(69, 18, 20, '2023-06-09 11:09:29'),
(70, 16, 21, '2023-06-09 11:09:32'),
(71, 4, 27, '2023-06-09 11:09:33'),
(72, 14, 31, '2023-06-09 11:09:37'),
(73, 15, 30, '2023-06-09 11:09:40'),
(74, 8, 24, '2023-06-09 11:09:43'),
(75, 2, 24, '2023-06-09 11:09:44'),
(76, 4, 31, '2023-06-09 11:09:45'),
(77, 15, 25, '2023-06-09 11:09:49'),
(78, 1, 28, '2023-06-09 11:09:53'),
(79, 9, 29, '2023-06-09 11:09:56'),
(80, 3, 30, '2023-06-09 11:09:57'),
(81, 9, 20, '2023-06-09 11:09:58'),
(82, 9, 23, '2023-06-09 11:10:01'),
(83, 2, 30, '2023-06-09 11:10:03'),
(84, 16, 26, '2023-06-09 11:10:04'),
(85, 17, 21, '2023-06-09 11:10:05'),
(86, 14, 25, '2023-06-09 11:10:08'),
(87, 3, 22, '2023-06-09 11:10:10'),
(88, 14, 24, '2023-06-09 11:10:11'),
(89, 9, 21, '2023-06-09 11:10:12'),
(90, 8, 19, '2023-06-09 11:10:16'),
(91, 20, 28, '2023-06-09 11:10:17'),
(92, 15, 30, '2023-06-09 11:10:19'),
(93, 6, 21, '2023-06-09 11:10:21'),
(94, 10, 26, '2023-06-09 11:10:22'),
(95, 10, 30, '2023-06-09 11:10:25'),
(96, 5, 25, '2023-06-09 11:10:29'),
(97, 7, 19, '2023-06-09 11:10:33'),
(98, 4, 19, '2023-06-09 11:10:36'),
(99, 5, 28, '2023-06-09 11:10:38'),
(100, 19, 19, '2023-06-09 11:10:41'),
(101, 18, 27, '2023-06-09 11:10:44'),
(102, 19, 23, '2023-06-09 11:10:46'),
(103, 9, 28, '2023-06-09 11:10:47'),
(104, 15, 19, '2023-06-09 11:10:49'),
(105, 9, 19, '2023-06-09 11:10:51'),
(106, 3, 23, '2023-06-09 11:10:52'),
(107, 12, 28, '2023-06-09 11:10:54'),
(108, 5, 25, '2023-06-09 11:10:56'),
(109, 7, 30, '2023-06-09 11:11:00'),
(110, 13, 28, '2023-06-09 11:11:01'),
(111, 8, 29, '2023-06-09 11:11:03'),
(112, 7, 26, '2023-06-09 11:11:04'),
(113, 2, 23, '2023-06-09 11:11:07'),
(114, 5, 25, '2023-06-09 11:11:08'),
(115, 4, 27, '2023-06-09 11:11:10'),
(116, 7, 25, '2023-06-09 11:11:12'),
(117, 17, 26, '2023-06-09 11:11:14'),
(118, 6, 31, '2023-06-09 11:11:17'),
(119, 6, 27, '2023-06-09 11:11:20'),
(120, 20, 30, '2023-06-09 11:11:23'),
(121, 1, 24, '2023-06-09 11:11:26'),
(122, 1, 27, '2023-06-09 11:11:30'),
(123, 3, 28, '2023-06-09 11:11:31'),
(124, 20, 30, '2023-06-09 11:11:32'),
(125, 1, 31, '2023-06-09 11:11:33'),
(126, 9, 21, '2023-06-09 11:11:37'),
(127, 12, 24, '2023-06-09 11:11:39'),
(128, 17, 30, '2023-06-09 11:11:40'),
(129, 13, 26, '2023-06-09 11:11:43'),
(130, 5, 23, '2023-06-09 11:11:44'),
(131, 1, 28, '2023-06-09 11:11:45'),
(132, 16, 22, '2023-06-09 11:11:46'),
(133, 8, 21, '2023-06-09 11:11:47'),
(134, 15, 20, '2023-06-09 11:11:50'),
(135, 8, 28, '2023-06-09 11:11:53'),
(136, 16, 25, '2023-06-09 11:11:57'),
(137, 14, 31, '2023-06-09 11:11:58'),
(138, 11, 25, '2023-06-09 11:12:00'),
(139, 6, 31, '2023-06-09 11:12:03'),
(140, 1, 27, '2023-06-09 11:12:07'),
(141, 11, 21, '2023-06-09 11:12:09'),
(142, 8, 24, '2023-06-09 11:12:12'),
(143, 11, 24, '2023-06-09 11:12:14'),
(144, 9, 24, '2023-06-09 11:12:18'),
(145, 16, 23, '2023-06-09 11:12:21'),
(146, 4, 21, '2023-06-09 11:12:25'),
(147, 19, 25, '2023-06-09 11:12:29'),
(148, 5, 22, '2023-06-09 11:12:32'),
(149, 14, 28, '2023-06-09 11:12:34'),
(150, 8, 25, '2023-06-09 11:12:35'),
(151, 10, 30, '2023-06-09 11:12:39'),
(152, 4, 24, '2023-06-09 11:12:41'),
(153, 12, 29, '2023-06-09 11:12:43'),
(154, 9, 20, '2023-06-09 11:12:47'),
(155, 13, 19, '2023-06-09 11:12:48'),
(156, 11, 20, '2023-06-09 11:12:50'),
(157, 5, 22, '2023-06-09 11:12:54'),
(158, 16, 28, '2023-06-09 11:12:57'),
(159, 2, 21, '2023-06-09 11:13:01'),
(160, 11, 19, '2023-06-09 11:13:03'),
(161, 15, 19, '2023-06-09 11:13:04'),
(162, 4, 24, '2023-06-09 11:13:06'),
(163, 11, 27, '2023-06-09 11:13:08'),
(164, 12, 20, '2023-06-09 11:13:09'),
(165, 6, 29, '2023-06-09 11:13:11'),
(166, 11, 21, '2023-06-09 11:13:15'),
(167, 10, 28, '2023-06-09 11:13:17'),
(168, 15, 21, '2023-06-09 11:13:18'),
(169, 1, 20, '2023-06-09 11:13:22'),
(170, 15, 24, '2023-06-09 11:13:24'),
(171, 1, 26, '2023-06-09 11:13:28'),
(172, 5, 23, '2023-06-09 11:13:31'),
(173, 4, 23, '2023-06-09 11:13:33'),
(174, 13, 30, '2023-06-09 11:13:37'),
(175, 12, 28, '2023-06-09 11:13:41'),
(176, 18, 27, '2023-06-09 11:13:42'),
(177, 10, 29, '2023-06-09 11:13:45'),
(178, 9, 21, '2023-06-09 11:13:47'),
(179, 19, 20, '2023-06-09 11:13:50'),
(180, 1, 21, '2023-06-09 11:13:54'),
(181, 1, 31, '2023-06-09 11:13:58'),
(182, 11, 30, '2023-06-09 11:13:59'),
(183, 6, 21, '2023-06-09 11:14:02'),
(184, 2, 24, '2023-06-09 11:14:04'),
(185, 18, 29, '2023-06-09 11:14:05'),
(186, 14, 21, '2023-06-09 11:14:08'),
(187, 5, 21, '2023-06-09 11:14:10'),
(188, 2, 30, '2023-06-09 11:14:13'),
(189, 1, 27, '2023-06-09 11:14:14'),
(190, 18, 27, '2023-06-09 11:14:17'),
(191, 10, 26, '2023-06-09 11:14:21'),
(192, 16, 29, '2023-06-09 11:14:23'),
(193, 2, 19, '2023-06-09 11:14:24'),
(194, 13, 30, '2023-06-09 11:14:28'),
(195, 16, 20, '2023-06-09 11:14:29'),
(196, 6, 27, '2023-06-09 11:14:31'),
(197, 19, 27, '2023-06-09 11:14:33'),
(198, 8, 29, '2023-06-09 11:14:37'),
(199, 16, 28, '2023-06-09 11:14:39'),
(200, 14, 25, '2023-06-09 11:14:40'),
(201, 3, 29, '2023-06-09 11:14:42'),
(202, 1, 23, '2023-06-09 11:14:44'),
(203, 10, 19, '2023-06-09 11:14:47'),
(204, 14, 27, '2023-06-09 11:14:48'),
(205, 2, 26, '2023-06-09 11:14:51'),
(206, 19, 24, '2023-06-09 11:14:55'),
(207, 7, 19, '2023-06-09 11:14:57'),
(208, 5, 24, '2023-06-09 11:14:59'),
(209, 20, 24, '2023-06-09 11:15:00'),
(210, 20, 25, '2023-06-09 11:15:02'),
(211, 12, 27, '2023-06-09 11:15:03'),
(212, 14, 31, '2023-06-09 11:15:06'),
(213, 1, 22, '2023-06-09 11:15:07'),
(214, 3, 22, '2023-06-09 11:15:09'),
(215, 16, 27, '2023-06-09 11:15:10'),
(216, 10, 19, '2023-06-09 11:15:14'),
(217, 7, 30, '2023-06-09 11:15:15'),
(218, 2, 22, '2023-06-09 11:15:17'),
(219, 13, 20, '2023-06-09 11:15:18'),
(220, 11, 21, '2023-06-09 11:15:22'),
(221, 15, 26, '2023-06-09 11:15:25'),
(222, 8, 25, '2023-06-09 11:15:30'),
(223, 15, 29, '2023-06-09 11:15:32'),
(224, 13, 24, '2023-06-09 11:15:36'),
(225, 20, 21, '2023-06-09 11:15:40'),
(226, 9, 27, '2023-06-09 11:15:42'),
(227, 18, 25, '2023-06-09 11:15:44'),
(228, 3, 19, '2023-06-09 11:15:45'),
(229, 19, 24, '2023-06-09 11:15:46'),
(230, 13, 26, '2023-06-09 11:15:50'),
(231, 10, 30, '2023-06-09 11:15:54'),
(232, 18, 19, '2023-06-09 11:15:57'),
(233, 10, 27, '2023-06-09 11:15:59'),
(234, 8, 31, '2023-06-09 11:16:02'),
(235, 6, 25, '2023-06-09 11:16:06'),
(236, 1, 19, '2023-06-09 11:16:08'),
(237, 12, 31, '2023-06-09 11:16:11'),
(238, 10, 25, '2023-06-09 11:16:14'),
(239, 8, 24, '2023-06-09 11:16:17'),
(240, 16, 28, '2023-06-09 11:16:19'),
(241, 19, 23, '2023-06-09 11:16:20'),
(242, 18, 30, '2023-06-09 11:16:23'),
(243, 9, 25, '2023-06-09 11:16:27'),
(244, 17, 27, '2023-06-09 11:16:30'),
(245, 17, 24, '2023-06-09 11:16:34'),
(246, 1, 29, '2023-06-09 11:16:35'),
(247, 3, 23, '2023-06-09 11:16:39'),
(248, 1, 25, '2023-06-09 11:16:41'),
(249, 14, 25, '2023-06-09 11:16:45'),
(250, 17, 29, '2023-06-09 11:16:49'),
(251, 15, 26, '2023-06-09 11:16:50'),
(252, 6, 30, '2023-06-09 11:16:52'),
(253, 13, 25, '2023-06-09 11:16:53'),
(254, 20, 27, '2023-06-09 11:16:56'),
(255, 19, 30, '2023-06-09 11:17:00'),
(256, 20, 29, '2023-06-09 11:17:03'),
(257, 4, 26, '2023-06-09 11:17:04'),
(258, 20, 23, '2023-06-09 11:17:05'),
(259, 8, 25, '2023-06-09 11:17:08'),
(260, 3, 24, '2023-06-09 11:17:10'),
(261, 5, 29, '2023-06-09 11:17:13'),
(262, 12, 31, '2023-06-09 11:17:15'),
(263, 2, 21, '2023-06-09 11:17:16'),
(264, 2, 31, '2023-06-09 11:17:18'),
(265, 6, 30, '2023-06-09 11:17:20'),
(266, 18, 20, '2023-06-09 11:17:23'),
(267, 8, 20, '2023-06-09 11:17:24'),
(268, 18, 30, '2023-06-09 11:17:25'),
(269, 9, 28, '2023-06-09 11:17:27'),
(270, 12, 28, '2023-06-09 11:17:30'),
(271, 16, 29, '2023-06-09 11:17:31'),
(272, 20, 30, '2023-06-09 11:17:35'),
(273, 7, 21, '2023-06-09 11:17:39'),
(274, 4, 30, '2023-06-09 11:17:42'),
(275, 6, 26, '2023-06-09 11:17:44'),
(276, 7, 19, '2023-06-09 11:17:45'),
(277, 19, 31, '2023-06-09 11:17:46'),
(278, 16, 30, '2023-06-09 11:17:47'),
(279, 19, 30, '2023-06-09 11:17:49'),
(280, 13, 21, '2023-06-09 11:17:52'),
(281, 18, 22, '2023-06-09 11:17:54'),
(282, 12, 26, '2023-06-09 11:17:57'),
(283, 3, 22, '2023-06-09 11:18:01'),
(284, 1, 22, '2023-06-09 11:18:02'),
(285, 13, 23, '2023-06-09 11:18:04'),
(286, 20, 19, '2023-06-09 11:18:09'),
(287, 11, 27, '2023-06-09 11:18:11'),
(288, 15, 24, '2023-06-09 11:18:13'),
(289, 17, 28, '2023-06-09 11:18:16'),
(290, 19, 23, '2023-06-09 11:18:19'),
(291, 4, 28, '2023-06-09 11:18:20'),
(292, 8, 25, '2023-06-09 11:18:22'),
(293, 9, 29, '2023-06-09 11:18:23'),
(294, 1, 23, '2023-06-09 11:18:27'),
(295, 15, 27, '2023-06-09 11:18:29'),
(296, 2, 24, '2023-06-09 11:18:32'),
(297, 18, 30, '2023-06-09 11:18:34'),
(298, 9, 27, '2023-06-09 11:18:35'),
(299, 2, 19, '2023-06-09 11:18:36'),
(300, 10, 20, '2023-06-09 11:18:39'),
(301, 17, 28, '2023-06-09 11:18:43'),
(302, 7, 30, '2023-06-09 11:18:45'),
(303, 14, 30, '2023-06-09 11:18:48'),
(304, 11, 30, '2023-06-09 11:18:52'),
(305, 8, 29, '2023-06-09 11:18:56'),
(306, 11, 23, '2023-06-09 11:19:00'),
(307, 10, 23, '2023-06-09 11:19:04'),
(308, 14, 26, '2023-06-09 11:19:07'),
(309, 11, 25, '2023-06-09 11:19:09'),
(310, 6, 22, '2023-06-09 11:19:11'),
(311, 12, 27, '2023-06-09 11:19:15'),
(312, 3, 22, '2023-06-09 11:19:17'),
(313, 1, 28, '2023-06-09 11:19:18'),
(314, 18, 24, '2023-06-09 11:19:20'),
(315, 4, 20, '2023-06-09 11:19:24'),
(316, 11, 29, '2023-06-09 11:19:25'),
(317, 11, 30, '2023-06-09 11:19:27'),
(318, 20, 21, '2023-06-09 11:19:31'),
(319, 5, 24, '2023-06-09 11:19:33'),
(320, 20, 20, '2023-06-09 11:19:37'),
(321, 8, 28, '2023-06-09 11:19:41'),
(322, 10, 31, '2023-06-09 11:19:43'),
(323, 15, 19, '2023-06-09 11:19:47'),
(324, 19, 29, '2023-06-09 11:19:48'),
(325, 14, 19, '2023-06-09 11:19:51'),
(326, 3, 23, '2023-06-09 11:19:52'),
(327, 15, 26, '2023-06-09 11:19:57'),
(328, 12, 23, '2023-06-09 11:19:58'),
(329, 7, 28, '2023-06-09 11:20:01'),
(330, 20, 29, '2023-06-09 11:20:05'),
(331, 17, 26, '2023-06-09 11:20:09'),
(332, 10, 19, '2023-06-09 11:20:13'),
(333, 18, 31, '2023-06-09 11:20:16'),
(334, 4, 23, '2023-06-09 11:20:18'),
(335, 7, 21, '2023-06-09 11:20:19'),
(336, 9, 22, '2023-06-09 11:20:23'),
(337, 6, 27, '2023-06-09 11:20:26'),
(338, 19, 28, '2023-06-09 11:20:30'),
(339, 19, 21, '2023-06-09 11:20:31'),
(340, 13, 25, '2023-06-09 11:20:33'),
(341, 17, 26, '2023-06-09 11:20:37'),
(342, 19, 27, '2023-06-09 11:20:41'),
(343, 20, 20, '2023-06-09 11:20:42'),
(344, 10, 24, '2023-06-09 11:20:43'),
(345, 12, 23, '2023-06-09 11:20:46'),
(346, 9, 19, '2023-06-09 11:20:47'),
(347, 15, 21, '2023-06-09 11:20:50'),
(348, 18, 19, '2023-06-09 11:20:54'),
(349, 4, 26, '2023-06-09 11:20:56'),
(350, 3, 24, '2023-06-09 11:20:57'),
(351, 18, 24, '2023-06-09 11:20:58'),
(352, 17, 25, '2023-06-09 11:21:02'),
(353, 16, 31, '2023-06-09 11:21:06'),
(354, 1, 24, '2023-06-09 11:21:07'),
(355, 13, 30, '2023-06-09 11:21:11'),
(356, 3, 30, '2023-06-09 11:21:13'),
(357, 3, 20, '2023-06-09 11:21:16'),
(358, 10, 22, '2023-06-09 11:21:19'),
(359, 17, 27, '2023-06-09 11:21:20'),
(360, 13, 22, '2023-06-09 11:21:22'),
(361, 15, 22, '2023-06-09 11:21:25'),
(362, 17, 30, '2023-06-09 11:21:26'),
(363, 2, 28, '2023-06-09 11:21:28'),
(364, 9, 24, '2023-06-09 11:21:30'),
(365, 9, 23, '2023-06-09 11:21:32'),
(366, 6, 27, '2023-06-09 11:21:34'),
(367, 17, 26, '2023-06-09 11:21:38'),
(368, 8, 30, '2023-06-09 11:21:42'),
(369, 3, 29, '2023-06-09 11:21:45'),
(370, 14, 25, '2023-06-09 11:21:47'),
(371, 9, 25, '2023-06-09 11:21:51'),
(372, 13, 30, '2023-06-09 11:21:54'),
(373, 18, 19, '2023-06-09 11:21:58'),
(374, 6, 21, '2023-06-09 11:22:00'),
(375, 1, 24, '2023-06-09 11:22:01'),
(376, 16, 23, '2023-06-09 11:22:02'),
(377, 17, 23, '2023-06-09 11:22:03'),
(378, 5, 23, '2023-06-09 11:22:06'),
(379, 17, 27, '2023-06-09 11:22:09'),
(380, 20, 30, '2023-06-09 11:22:13'),
(381, 19, 28, '2023-06-09 11:22:14'),
(382, 6, 24, '2023-06-09 11:22:18'),
(383, 17, 28, '2023-06-09 11:22:21'),
(384, 14, 26, '2023-06-09 11:22:24'),
(385, 14, 22, '2023-06-09 11:22:26'),
(386, 10, 27, '2023-06-09 11:22:30'),
(387, 12, 28, '2023-06-09 11:22:31'),
(388, 13, 31, '2023-06-09 11:22:35'),
(389, 9, 25, '2023-06-09 11:22:39'),
(390, 17, 27, '2023-06-09 11:22:40'),
(391, 13, 27, '2023-06-09 11:22:41'),
(392, 4, 26, '2023-06-09 11:22:42'),
(393, 9, 26, '2023-06-09 11:22:43'),
(394, 11, 27, '2023-06-09 11:22:46'),
(395, 18, 22, '2023-06-09 11:22:48'),
(396, 4, 27, '2023-06-09 11:22:52'),
(397, 1, 26, '2023-06-09 11:22:56'),
(398, 5, 27, '2023-06-09 11:22:58'),
(399, 8, 20, '2023-06-09 11:23:02'),
(400, 11, 25, '2023-06-09 11:23:04'),
(401, 16, 22, '2023-06-09 11:23:05'),
(402, 4, 22, '2023-06-09 11:23:07'),
(403, 14, 23, '2023-06-09 11:23:11'),
(404, 2, 27, '2023-06-09 11:23:12'),
(405, 7, 24, '2023-06-09 11:23:13'),
(406, 3, 30, '2023-06-09 11:23:16'),
(407, 14, 25, '2023-06-09 11:23:17'),
(408, 12, 28, '2023-06-09 11:23:21'),
(409, 15, 25, '2023-06-09 11:23:24'),
(410, 8, 22, '2023-06-09 11:23:26'),
(411, 6, 30, '2023-06-09 11:23:29'),
(412, 15, 22, '2023-06-09 11:23:31'),
(413, 15, 19, '2023-06-09 11:23:32'),
(414, 5, 29, '2023-06-09 11:23:36'),
(415, 1, 31, '2023-06-09 11:23:38'),
(416, 18, 28, '2023-06-09 11:23:39'),
(417, 9, 19, '2023-06-09 11:23:43'),
(418, 3, 22, '2023-06-09 11:23:45'),
(419, 4, 19, '2023-06-09 11:23:47'),
(420, 17, 29, '2023-06-09 11:23:48'),
(421, 17, 22, '2023-06-09 11:23:50'),
(422, 15, 30, '2023-06-09 11:23:53'),
(423, 13, 21, '2023-06-09 11:23:55'),
(424, 4, 29, '2023-06-09 11:23:56'),
(425, 10, 27, '2023-06-09 11:23:58'),
(426, 9, 24, '2023-06-09 11:24:01'),
(427, 11, 24, '2023-06-09 11:24:04'),
(428, 5, 28, '2023-06-09 11:24:08'),
(429, 14, 29, '2023-06-09 11:24:13'),
(430, 3, 20, '2023-06-09 11:24:14'),
(431, 8, 22, '2023-06-09 11:24:17'),
(432, 1, 30, '2023-06-09 11:24:18'),
(433, 13, 19, '2023-06-09 11:24:21'),
(434, 1, 23, '2023-06-09 11:24:25'),
(435, 6, 30, '2023-06-09 11:24:29'),
(436, 17, 26, '2023-06-09 11:24:33'),
(437, 8, 23, '2023-06-09 11:24:34'),
(438, 4, 29, '2023-06-09 11:24:36'),
(439, 9, 31, '2023-06-09 11:24:37'),
(440, 18, 23, '2023-06-09 11:24:40'),
(441, 11, 19, '2023-06-09 11:24:43'),
(442, 12, 25, '2023-06-09 11:24:45'),
(443, 7, 26, '2023-06-09 11:24:47'),
(444, 8, 31, '2023-06-09 11:24:51'),
(445, 13, 23, '2023-06-09 11:24:55'),
(446, 13, 22, '2023-06-09 11:24:56'),
(447, 7, 27, '2023-06-09 11:25:00'),
(448, 8, 21, '2023-06-09 11:25:01'),
(449, 1, 25, '2023-06-09 11:25:04'),
(450, 14, 19, '2023-06-09 11:25:06'),
(451, 12, 29, '2023-06-09 11:25:08'),
(452, 16, 26, '2023-06-09 11:25:10'),
(453, 6, 30, '2023-06-09 11:25:14'),
(454, 19, 25, '2023-06-09 11:25:15'),
(455, 15, 24, '2023-06-09 11:25:17'),
(456, 4, 19, '2023-06-09 11:25:21'),
(457, 20, 31, '2023-06-09 11:25:25'),
(458, 14, 31, '2023-06-09 11:25:29'),
(459, 17, 24, '2023-06-09 11:25:32'),
(460, 13, 26, '2023-06-09 11:25:35'),
(461, 17, 28, '2023-06-09 11:25:36'),
(462, 9, 23, '2023-06-09 11:25:40'),
(463, 5, 29, '2023-06-09 11:25:42'),
(464, 9, 28, '2023-06-09 11:25:43'),
(465, 13, 25, '2023-06-09 11:25:44'),
(466, 15, 19, '2023-06-09 11:25:47'),
(467, 2, 19, '2023-06-09 11:25:49'),
(468, 15, 29, '2023-06-09 11:25:53'),
(469, 18, 21, '2023-06-09 11:25:55'),
(470, 14, 21, '2023-06-09 11:25:56'),
(471, 11, 28, '2023-06-09 11:25:57'),
(472, 13, 19, '2023-06-09 11:25:58'),
(473, 8, 23, '2023-06-09 11:25:59'),
(474, 16, 24, '2023-06-09 11:26:01'),
(475, 18, 31, '2023-06-09 11:26:05'),
(476, 12, 20, '2023-06-09 11:26:08'),
(477, 19, 30, '2023-06-09 11:26:12'),
(478, 11, 28, '2023-06-09 11:26:15'),
(479, 9, 30, '2023-06-09 11:26:18'),
(480, 12, 29, '2023-06-09 11:26:22'),
(481, 4, 29, '2023-06-09 11:26:25'),
(482, 13, 31, '2023-06-09 11:26:27'),
(483, 15, 23, '2023-06-09 11:26:31'),
(484, 6, 27, '2023-06-09 11:26:35'),
(485, 14, 31, '2023-06-09 11:26:36'),
(486, 16, 30, '2023-06-09 11:26:40'),
(487, 3, 22, '2023-06-09 11:26:43'),
(488, 17, 19, '2023-06-09 11:26:46'),
(489, 8, 19, '2023-06-09 11:26:48'),
(490, 1, 25, '2023-06-09 11:26:49'),
(491, 13, 31, '2023-06-09 11:26:52'),
(492, 10, 21, '2023-06-09 11:26:54'),
(493, 9, 22, '2023-06-09 11:26:58'),
(494, 16, 20, '2023-06-09 11:27:00'),
(495, 11, 19, '2023-06-09 11:27:04'),
(496, 10, 27, '2023-06-09 11:27:05'),
(497, 14, 22, '2023-06-09 11:27:07'),
(498, 12, 30, '2023-06-09 11:27:09'),
(499, 19, 20, '2023-06-09 11:27:13'),
(500, 11, 23, '2023-06-09 11:27:14'),
(501, 10, 30, '2023-06-09 11:27:17'),
(502, 18, 21, '2023-06-09 11:27:18'),
(503, 15, 24, '2023-06-09 11:27:19'),
(504, 17, 23, '2023-06-09 11:27:23'),
(505, 7, 27, '2023-06-09 11:27:25'),
(506, 9, 24, '2023-06-09 11:27:29'),
(507, 6, 24, '2023-06-09 11:27:30'),
(508, 14, 20, '2023-06-09 11:27:34'),
(509, 8, 23, '2023-06-09 11:27:35'),
(510, 9, 27, '2023-06-09 11:27:36'),
(511, 7, 22, '2023-06-09 11:27:39'),
(512, 13, 21, '2023-06-09 11:27:40'),
(513, 9, 30, '2023-06-09 11:27:41'),
(514, 12, 25, '2023-06-09 11:27:42'),
(515, 17, 22, '2023-06-09 11:27:45'),
(516, 6, 20, '2023-06-09 11:27:47'),
(517, 11, 20, '2023-06-09 11:27:50'),
(518, 15, 25, '2023-06-09 11:27:53'),
(519, 15, 27, '2023-06-09 11:27:55'),
(520, 9, 27, '2023-06-09 11:27:57'),
(521, 2, 21, '2023-06-09 11:28:01'),
(522, 17, 24, '2023-06-09 11:28:03'),
(523, 10, 29, '2023-06-09 11:28:06'),
(524, 16, 24, '2023-06-09 11:28:09'),
(525, 5, 28, '2023-06-09 11:28:11'),
(526, 11, 22, '2023-06-09 11:28:13'),
(527, 13, 19, '2023-06-09 11:28:16'),
(528, 13, 30, '2023-06-09 11:28:18'),
(529, 5, 21, '2023-06-09 11:28:22'),
(530, 19, 25, '2023-06-09 11:28:24'),
(531, 1, 27, '2023-06-09 11:28:28'),
(532, 19, 21, '2023-06-09 11:28:32'),
(533, 7, 25, '2023-06-09 11:28:35'),
(534, 2, 25, '2023-06-09 11:28:37'),
(535, 18, 24, '2023-06-09 11:28:41'),
(536, 8, 27, '2023-06-09 11:28:42'),
(537, 9, 30, '2023-06-09 11:28:44'),
(538, 18, 31, '2023-06-09 11:28:47'),
(539, 4, 25, '2023-06-09 11:28:49'),
(540, 5, 27, '2023-06-09 11:28:50'),
(541, 4, 20, '2023-06-09 11:28:53'),
(542, 20, 27, '2023-06-09 11:28:55'),
(543, 7, 20, '2023-06-09 11:28:58'),
(544, 2, 26, '2023-06-09 11:28:59'),
(545, 8, 21, '2023-06-09 11:29:01'),
(546, 10, 25, '2023-06-09 11:29:05'),
(547, 11, 31, '2023-06-09 11:29:10'),
(548, 14, 22, '2023-06-09 11:29:11'),
(549, 5, 31, '2023-06-09 11:29:15'),
(550, 5, 21, '2023-06-09 11:29:19'),
(551, 8, 29, '2023-06-09 11:29:22'),
(552, 12, 30, '2023-06-09 11:29:26'),
(553, 8, 22, '2023-06-09 11:29:27'),
(554, 5, 28, '2023-06-09 11:29:29'),
(555, 4, 23, '2023-06-09 11:29:32'),
(556, 12, 21, '2023-06-09 11:29:35'),
(557, 14, 23, '2023-06-09 11:29:36'),
(558, 10, 26, '2023-06-09 11:29:38'),
(559, 2, 31, '2023-06-09 11:29:42'),
(560, 18, 22, '2023-06-09 11:29:44'),
(561, 3, 22, '2023-06-09 11:29:45'),
(562, 2, 31, '2023-06-09 11:29:47'),
(563, 6, 21, '2023-06-09 11:29:51'),
(564, 5, 30, '2023-06-09 11:29:55'),
(565, 5, 24, '2023-06-09 11:29:56'),
(566, 6, 24, '2023-06-09 11:30:00'),
(567, 14, 25, '2023-06-09 11:30:03'),
(568, 8, 20, '2023-06-09 11:30:05'),
(569, 12, 20, '2023-06-09 11:30:08'),
(570, 5, 20, '2023-06-09 11:30:10'),
(571, 20, 24, '2023-06-09 11:30:14'),
(572, 8, 22, '2023-06-09 11:30:16'),
(573, 2, 24, '2023-06-09 11:30:20'),
(574, 14, 20, '2023-06-09 11:30:22'),
(575, 1, 30, '2023-06-09 11:30:25'),
(576, 13, 31, '2023-06-09 11:30:26'),
(577, 4, 21, '2023-06-09 11:30:30'),
(578, 11, 27, '2023-06-09 11:30:31'),
(579, 19, 20, '2023-06-09 11:30:32'),
(580, 13, 28, '2023-06-09 11:30:36'),
(581, 6, 22, '2023-06-09 11:30:38'),
(582, 10, 23, '2023-06-09 11:30:42'),
(583, 11, 27, '2023-06-09 11:30:43'),
(584, 5, 25, '2023-06-09 11:30:46'),
(585, 2, 20, '2023-06-09 11:30:47'),
(586, 1, 21, '2023-06-09 11:30:49'),
(587, 11, 27, '2023-06-09 11:30:51'),
(588, 11, 23, '2023-06-09 11:30:56'),
(589, 7, 20, '2023-06-09 11:30:59'),
(590, 10, 24, '2023-06-09 11:31:03'),
(591, 7, 20, '2023-06-09 11:31:05'),
(592, 17, 21, '2023-06-09 11:31:06'),
(593, 17, 20, '2023-06-09 11:31:08'),
(594, 5, 21, '2023-06-09 11:31:09'),
(595, 16, 29, '2023-06-09 11:31:10'),
(596, 2, 20, '2023-06-09 11:31:14'),
(597, 4, 25, '2023-06-09 11:31:15'),
(598, 11, 19, '2023-06-09 11:31:16'),
(599, 5, 30, '2023-06-09 11:31:20'),
(600, 4, 26, '2023-06-09 11:31:23'),
(601, 7, 23, '2023-06-09 11:31:24'),
(602, 17, 24, '2023-06-09 11:31:25'),
(603, 2, 25, '2023-06-09 11:31:26'),
(604, 19, 21, '2023-06-09 11:31:30'),
(605, 16, 19, '2023-06-09 11:31:32'),
(606, 17, 26, '2023-06-09 11:31:33'),
(607, 3, 25, '2023-06-09 11:31:37'),
(608, 12, 20, '2023-06-09 11:31:39'),
(609, 17, 29, '2023-06-09 11:31:41'),
(610, 3, 30, '2023-06-09 11:31:44'),
(611, 3, 19, '2023-06-09 11:31:47'),
(612, 13, 29, '2023-06-09 11:31:51'),
(613, 9, 29, '2023-06-09 11:31:52'),
(614, 7, 22, '2023-06-09 11:31:56'),
(615, 11, 28, '2023-06-09 11:31:57'),
(616, 7, 22, '2023-06-09 11:32:00'),
(617, 11, 28, '2023-06-09 11:32:04'),
(618, 7, 29, '2023-06-09 11:32:05'),
(619, 14, 29, '2023-06-09 11:32:09'),
(620, 17, 19, '2023-06-09 11:32:10'),
(621, 17, 22, '2023-06-09 11:32:11'),
(622, 8, 19, '2023-06-09 11:32:12'),
(623, 7, 28, '2023-06-09 11:32:14'),
(624, 1, 26, '2023-06-09 11:32:17'),
(625, 14, 30, '2023-06-09 11:32:20'),
(626, 5, 28, '2023-06-09 11:32:22'),
(627, 7, 31, '2023-06-09 11:32:24'),
(628, 8, 23, '2023-06-09 11:32:28'),
(629, 11, 20, '2023-06-09 11:32:29'),
(630, 13, 19, '2023-06-09 11:32:31'),
(631, 9, 19, '2023-06-09 11:32:32'),
(632, 1, 19, '2023-06-09 11:32:35'),
(633, 12, 31, '2023-06-09 11:32:38'),
(634, 11, 30, '2023-06-09 11:32:40'),
(635, 1, 22, '2023-06-09 11:32:42'),
(636, 4, 20, '2023-06-09 11:32:45'),
(637, 18, 23, '2023-06-09 11:32:49'),
(638, 12, 19, '2023-06-09 11:32:51'),
(639, 19, 25, '2023-06-09 11:32:52'),
(640, 3, 30, '2023-06-09 11:32:53'),
(641, 17, 27, '2023-06-09 11:32:54'),
(642, 4, 31, '2023-06-09 11:32:55'),
(643, 10, 19, '2023-06-09 11:32:57'),
(644, 15, 25, '2023-06-09 11:32:58'),
(645, 17, 31, '2023-06-09 11:33:01'),
(646, 19, 27, '2023-06-09 11:33:05'),
(647, 4, 28, '2023-06-09 11:33:09'),
(648, 16, 23, '2023-06-09 11:33:12'),
(649, 7, 26, '2023-06-09 11:33:14'),
(650, 19, 24, '2023-06-09 11:33:17'),
(651, 4, 27, '2023-06-09 11:33:20'),
(652, 10, 26, '2023-06-09 11:33:23'),
(653, 14, 21, '2023-06-09 11:33:26'),
(654, 16, 31, '2023-06-09 11:33:29'),
(655, 16, 23, '2023-06-09 11:33:33'),
(656, 8, 27, '2023-06-09 11:33:34'),
(657, 9, 20, '2023-06-09 11:33:36'),
(658, 10, 20, '2023-06-09 11:33:40'),
(659, 7, 20, '2023-06-09 11:33:41'),
(660, 13, 31, '2023-06-09 11:33:44'),
(661, 15, 29, '2023-06-09 11:33:48'),
(662, 15, 27, '2023-06-09 11:33:51'),
(663, 3, 24, '2023-06-09 11:33:52'),
(664, 8, 27, '2023-06-09 11:33:55'),
(665, 7, 29, '2023-06-09 11:33:58'),
(666, 7, 26, '2023-06-09 11:33:59'),
(667, 1, 31, '2023-06-09 11:34:00'),
(668, 7, 28, '2023-06-09 11:34:03'),
(669, 7, 20, '2023-06-09 11:34:07'),
(670, 2, 28, '2023-06-09 11:34:09'),
(671, 5, 31, '2023-06-09 11:34:10'),
(672, 13, 26, '2023-06-09 11:34:13'),
(673, 18, 25, '2023-06-09 11:34:16'),
(674, 4, 29, '2023-06-09 11:34:20'),
(675, 18, 27, '2023-06-09 11:34:22'),
(676, 5, 27, '2023-06-09 11:34:24'),
(677, 1, 29, '2023-06-09 11:34:25'),
(678, 14, 19, '2023-06-09 11:34:27'),
(679, 17, 22, '2023-06-09 11:34:29'),
(680, 5, 24, '2023-06-09 11:34:32'),
(681, 4, 23, '2023-06-09 11:34:35'),
(682, 16, 25, '2023-06-09 11:34:37'),
(683, 12, 28, '2023-06-09 11:34:39'),
(684, 5, 22, '2023-06-09 11:34:43'),
(685, 12, 27, '2023-06-09 11:34:47'),
(686, 5, 25, '2023-06-09 11:34:51'),
(687, 1, 22, '2023-06-09 11:34:52'),
(688, 14, 31, '2023-06-09 11:34:54'),
(689, 7, 20, '2023-06-09 11:34:56'),
(690, 20, 30, '2023-06-09 11:35:00'),
(691, 3, 28, '2023-06-09 11:35:03'),
(692, 10, 23, '2023-06-09 11:35:04'),
(693, 9, 31, '2023-06-09 11:35:07'),
(694, 10, 23, '2023-06-09 11:35:08'),
(695, 2, 30, '2023-06-09 11:35:12'),
(696, 11, 24, '2023-06-09 11:35:13'),
(697, 12, 29, '2023-06-09 11:35:15'),
(698, 15, 28, '2023-06-09 11:35:17'),
(699, 19, 28, '2023-06-09 11:35:18'),
(700, 14, 25, '2023-06-09 11:35:20'),
(701, 12, 31, '2023-06-09 11:35:21'),
(702, 4, 30, '2023-06-09 11:35:22'),
(703, 12, 22, '2023-06-09 11:35:24'),
(704, 18, 27, '2023-06-09 11:35:26'),
(705, 8, 21, '2023-06-09 11:35:29'),
(706, 12, 27, '2023-06-09 11:35:31'),
(707, 2, 26, '2023-06-09 11:35:33'),
(708, 18, 26, '2023-06-09 11:35:35'),
(709, 15, 30, '2023-06-09 11:35:38'),
(710, 7, 26, '2023-06-09 11:35:40'),
(711, 9, 27, '2023-06-09 11:35:43'),
(712, 3, 29, '2023-06-09 11:35:45'),
(713, 13, 29, '2023-06-09 11:35:47'),
(714, 12, 20, '2023-06-09 11:35:49'),
(715, 1, 19, '2023-06-09 11:35:50'),
(716, 4, 22, '2023-06-09 11:35:51'),
(717, 16, 19, '2023-06-09 11:35:54'),
(718, 12, 28, '2023-06-09 11:35:57'),
(719, 13, 23, '2023-06-09 11:35:58'),
(720, 17, 23, '2023-06-09 11:35:59'),
(721, 11, 24, '2023-06-09 11:36:03'),
(722, 20, 22, '2023-06-09 11:36:05'),
(723, 20, 23, '2023-06-09 11:36:08'),
(724, 13, 28, '2023-06-09 11:36:09'),
(725, 8, 22, '2023-06-09 11:36:10'),
(726, 12, 20, '2023-06-09 11:36:13'),
(727, 2, 29, '2023-06-09 11:36:15'),
(728, 4, 22, '2023-06-09 11:36:18'),
(729, 20, 25, '2023-06-09 11:36:23'),
(730, 17, 20, '2023-06-09 11:36:24'),
(731, 17, 26, '2023-06-09 11:36:27'),
(732, 3, 27, '2023-06-09 11:36:28'),
(733, 4, 21, '2023-06-09 11:36:32'),
(734, 14, 26, '2023-06-09 11:36:33'),
(735, 17, 21, '2023-06-09 11:36:37'),
(736, 18, 23, '2023-06-09 11:36:41'),
(737, 19, 28, '2023-06-09 11:36:45'),
(738, 19, 26, '2023-06-09 11:36:47'),
(739, 10, 30, '2023-06-09 11:36:49'),
(740, 16, 25, '2023-06-09 11:36:53'),
(741, 1, 22, '2023-06-09 11:36:57'),
(742, 2, 29, '2023-06-09 11:37:00'),
(743, 7, 27, '2023-06-09 11:37:03'),
(744, 19, 27, '2023-06-09 11:37:05'),
(745, 9, 26, '2023-06-09 11:37:08'),
(746, 4, 25, '2023-06-09 11:37:11'),
(747, 1, 27, '2023-06-09 11:37:13'),
(748, 4, 26, '2023-06-09 11:37:14'),
(749, 6, 22, '2023-06-09 11:37:17'),
(750, 4, 22, '2023-06-09 11:37:19'),
(751, 3, 27, '2023-06-09 11:37:23'),
(752, 7, 26, '2023-06-09 11:37:27'),
(753, 13, 23, '2023-06-09 11:37:30'),
(754, 6, 20, '2023-06-09 11:37:32'),
(755, 16, 23, '2023-06-09 11:37:33'),
(756, 20, 29, '2023-06-09 11:37:35'),
(757, 16, 23, '2023-06-09 11:37:37'),
(758, 14, 29, '2023-06-09 11:37:38'),
(759, 5, 19, '2023-06-09 11:37:40'),
(760, 8, 27, '2023-06-09 11:37:41'),
(761, 14, 22, '2023-06-09 11:37:44'),
(762, 19, 26, '2023-06-09 11:37:46'),
(763, 20, 21, '2023-06-09 11:37:48'),
(764, 14, 25, '2023-06-09 11:37:51'),
(765, 2, 22, '2023-06-09 11:37:54'),
(766, 18, 28, '2023-06-09 11:37:56'),
(767, 15, 28, '2023-06-09 11:37:57'),
(768, 19, 26, '2023-06-09 11:37:58'),
(769, 17, 28, '2023-06-09 11:38:00'),
(770, 15, 24, '2023-06-09 11:38:03'),
(771, 3, 19, '2023-06-09 11:38:07'),
(772, 3, 28, '2023-06-09 11:38:10'),
(773, 2, 26, '2023-06-09 11:38:13'),
(774, 20, 31, '2023-06-09 11:38:14'),
(775, 3, 22, '2023-06-09 11:38:16'),
(776, 12, 19, '2023-06-09 11:38:19'),
(777, 20, 30, '2023-06-09 11:38:23'),
(778, 9, 22, '2023-06-09 11:38:25'),
(779, 14, 31, '2023-06-09 11:38:27'),
(780, 19, 23, '2023-06-09 11:38:31'),
(781, 15, 31, '2023-06-09 11:38:35'),
(782, 20, 22, '2023-06-09 11:38:37'),
(783, 6, 23, '2023-06-09 11:38:40'),
(784, 8, 28, '2023-06-09 11:38:44'),
(785, 8, 28, '2023-06-09 11:38:46'),
(786, 12, 22, '2023-06-09 11:38:49'),
(787, 14, 19, '2023-06-09 11:38:52'),
(788, 6, 20, '2023-06-09 11:38:56'),
(789, 18, 26, '2023-06-09 11:38:58'),
(790, 7, 31, '2023-06-09 11:39:01'),
(791, 13, 30, '2023-06-09 11:39:02'),
(792, 2, 31, '2023-06-09 11:39:06'),
(793, 8, 22, '2023-06-09 11:39:07'),
(794, 3, 28, '2023-06-09 11:39:08'),
(795, 18, 24, '2023-06-09 11:39:09'),
(796, 14, 30, '2023-06-09 11:39:11'),
(797, 4, 24, '2023-06-09 11:39:14'),
(798, 3, 28, '2023-06-09 11:39:17'),
(799, 12, 29, '2023-06-09 11:39:21'),
(800, 11, 19, '2023-06-09 11:39:22'),
(801, 18, 27, '2023-06-09 11:39:26'),
(802, 15, 20, '2023-06-09 11:39:27'),
(803, 14, 30, '2023-06-09 11:39:28'),
(804, 6, 31, '2023-06-09 11:39:31'),
(805, 4, 27, '2023-06-09 11:39:34'),
(806, 10, 22, '2023-06-09 11:39:35'),
(807, 8, 25, '2023-06-09 11:39:38'),
(808, 19, 19, '2023-06-09 11:39:39'),
(809, 2, 26, '2023-06-09 11:39:43'),
(810, 12, 19, '2023-06-09 11:39:46'),
(811, 8, 26, '2023-06-09 11:39:50'),
(812, 10, 31, '2023-06-09 11:39:53'),
(813, 6, 19, '2023-06-09 11:39:56'),
(814, 2, 28, '2023-06-09 11:39:57'),
(815, 17, 24, '2023-06-09 11:39:59'),
(816, 17, 25, '2023-06-09 11:40:02'),
(817, 5, 31, '2023-06-09 11:40:05'),
(818, 5, 19, '2023-06-09 11:40:09'),
(819, 20, 25, '2023-06-09 11:40:13'),
(820, 20, 19, '2023-06-09 11:40:15'),
(821, 11, 27, '2023-06-09 11:40:19'),
(822, 18, 23, '2023-06-09 11:40:20'),
(823, 7, 29, '2023-06-09 11:40:22'),
(824, 8, 24, '2023-06-09 11:40:23'),
(825, 20, 31, '2023-06-09 11:40:26'),
(826, 15, 31, '2023-06-09 11:40:30'),
(827, 19, 26, '2023-06-09 11:40:31'),
(828, 8, 31, '2023-06-09 11:40:35'),
(829, 5, 25, '2023-06-09 11:40:37'),
(830, 13, 21, '2023-06-09 11:40:40'),
(831, 2, 29, '2023-06-09 11:40:42'),
(832, 1, 20, '2023-06-09 11:40:43'),
(833, 16, 26, '2023-06-09 11:40:46'),
(834, 3, 31, '2023-06-09 11:40:48'),
(835, 11, 27, '2023-06-09 11:40:51'),
(836, 5, 19, '2023-06-09 11:40:52'),
(837, 13, 26, '2023-06-09 11:40:54'),
(838, 9, 19, '2023-06-09 11:40:56'),
(839, 4, 20, '2023-06-09 11:41:00'),
(840, 18, 21, '2023-06-09 11:41:02'),
(841, 13, 31, '2023-06-09 11:41:03'),
(842, 3, 22, '2023-06-09 11:41:04'),
(843, 13, 20, '2023-06-09 11:41:08'),
(844, 1, 30, '2023-06-09 11:41:09'),
(845, 16, 20, '2023-06-09 11:41:11'),
(846, 9, 25, '2023-06-09 11:41:14'),
(847, 13, 27, '2023-06-09 11:41:17'),
(848, 9, 30, '2023-06-09 11:41:21'),
(849, 16, 25, '2023-06-09 11:41:24'),
(850, 5, 25, '2023-06-09 11:41:26'),
(851, 14, 31, '2023-06-09 11:41:27'),
(852, 7, 26, '2023-06-09 11:41:31'),
(853, 10, 25, '2023-06-09 11:41:33'),
(854, 1, 19, '2023-06-09 11:41:36'),
(855, 3, 28, '2023-06-09 11:41:39'),
(856, 1, 21, '2023-06-09 11:41:42'),
(857, 8, 29, '2023-06-09 11:41:43'),
(858, 13, 28, '2023-06-09 11:41:45'),
(859, 15, 31, '2023-06-09 11:41:48'),
(860, 20, 20, '2023-06-09 11:41:50'),
(861, 13, 20, '2023-06-09 11:41:51'),
(862, 1, 25, '2023-06-09 11:41:54'),
(863, 9, 19, '2023-06-09 11:41:56'),
(864, 13, 26, '2023-06-09 11:41:59'),
(865, 18, 26, '2023-06-09 11:42:03'),
(866, 7, 31, '2023-06-09 11:42:06'),
(867, 15, 19, '2023-06-09 11:42:10'),
(868, 9, 20, '2023-06-09 11:42:12'),
(869, 19, 25, '2023-06-09 11:42:14'),
(870, 8, 19, '2023-06-09 11:42:15'),
(871, 19, 22, '2023-06-09 11:42:18'),
(872, 5, 25, '2023-06-09 11:42:20'),
(873, 2, 24, '2023-06-09 11:42:21'),
(874, 15, 20, '2023-06-09 11:42:23'),
(875, 16, 24, '2023-06-09 11:42:26'),
(876, 11, 26, '2023-06-09 11:42:30'),
(877, 2, 22, '2023-06-09 11:42:32'),
(878, 20, 29, '2023-06-09 11:42:33'),
(879, 18, 29, '2023-06-09 11:42:37'),
(880, 15, 20, '2023-06-09 11:42:38'),
(881, 11, 20, '2023-06-09 11:42:42'),
(882, 11, 21, '2023-06-09 11:42:45'),
(883, 6, 28, '2023-06-09 11:42:47'),
(884, 16, 28, '2023-06-09 11:42:49'),
(885, 17, 22, '2023-06-09 11:42:52'),
(886, 7, 28, '2023-06-09 11:42:53'),
(887, 3, 24, '2023-06-09 11:42:55'),
(888, 1, 27, '2023-06-09 11:42:58'),
(889, 10, 23, '2023-06-09 11:42:59'),
(890, 5, 21, '2023-06-09 11:43:00'),
(891, 3, 28, '2023-06-09 11:43:01'),
(892, 16, 20, '2023-06-09 11:43:02'),
(893, 11, 25, '2023-06-09 11:43:03'),
(894, 5, 22, '2023-06-09 11:43:04'),
(895, 14, 26, '2023-06-09 11:43:05'),
(896, 20, 27, '2023-06-09 11:43:08'),
(897, 3, 22, '2023-06-09 11:43:09'),
(898, 5, 29, '2023-06-09 11:43:11'),
(899, 14, 31, '2023-06-09 11:43:15'),
(900, 16, 21, '2023-06-09 11:43:19'),
(901, 11, 31, '2023-06-09 11:43:20'),
(902, 16, 23, '2023-06-09 11:43:23'),
(903, 16, 30, '2023-06-09 11:43:25'),
(904, 10, 28, '2023-06-09 11:43:28'),
(905, 11, 21, '2023-06-09 11:43:31'),
(906, 14, 26, '2023-06-09 11:43:35'),
(907, 10, 27, '2023-06-09 11:43:38'),
(908, 3, 23, '2023-06-09 11:43:42'),
(909, 13, 19, '2023-06-09 11:43:46'),
(910, 11, 31, '2023-06-09 11:43:47'),
(911, 13, 31, '2023-06-09 11:43:48'),
(912, 17, 23, '2023-06-09 11:43:50'),
(913, 17, 24, '2023-06-09 11:43:51'),
(914, 4, 31, '2023-06-09 11:43:53'),
(915, 7, 27, '2023-06-09 11:43:57'),
(916, 19, 26, '2023-06-09 11:43:58'),
(917, 18, 23, '2023-06-09 11:44:01'),
(918, 16, 25, '2023-06-09 11:44:04'),
(919, 6, 25, '2023-06-09 11:44:05'),
(920, 19, 31, '2023-06-09 11:44:08'),
(921, 20, 25, '2023-06-09 11:44:09'),
(922, 14, 25, '2023-06-09 11:44:12'),
(923, 17, 29, '2023-06-09 11:44:16'),
(924, 19, 20, '2023-06-09 11:44:20'),
(925, 15, 24, '2023-06-09 11:44:21'),
(926, 8, 22, '2023-06-09 11:44:25'),
(927, 13, 29, '2023-06-09 11:44:27'),
(928, 5, 29, '2023-06-09 11:44:29'),
(929, 2, 19, '2023-06-09 11:44:34'),
(930, 5, 26, '2023-06-09 11:44:38'),
(931, 20, 25, '2023-06-09 11:44:40'),
(932, 3, 19, '2023-06-09 11:44:43'),
(933, 14, 28, '2023-06-09 11:44:45'),
(934, 14, 29, '2023-06-09 11:44:46'),
(935, 1, 20, '2023-06-09 11:44:49'),
(936, 1, 27, '2023-06-09 11:44:51'),
(937, 10, 27, '2023-06-09 11:44:55'),
(938, 18, 29, '2023-06-09 11:44:56'),
(939, 1, 28, '2023-06-09 11:44:57'),
(940, 16, 22, '2023-06-09 11:44:59'),
(941, 7, 22, '2023-06-09 11:45:02'),
(942, 11, 30, '2023-06-09 11:45:06'),
(943, 18, 31, '2023-06-09 11:45:07'),
(944, 12, 22, '2023-06-09 11:45:11'),
(945, 13, 29, '2023-06-09 11:45:15'),
(946, 17, 26, '2023-06-09 11:45:19'),
(947, 7, 26, '2023-06-09 11:45:22'),
(948, 1, 19, '2023-06-09 11:45:24'),
(949, 4, 31, '2023-06-09 11:45:27'),
(950, 5, 26, '2023-06-09 11:45:29'),
(951, 14, 26, '2023-06-09 11:45:33'),
(952, 17, 24, '2023-06-09 11:45:34'),
(953, 6, 21, '2023-06-09 11:45:38'),
(954, 5, 21, '2023-06-09 11:45:40'),
(955, 9, 19, '2023-06-09 11:45:44'),
(956, 12, 26, '2023-06-09 11:45:47'),
(957, 5, 30, '2023-06-09 11:45:48'),
(958, 3, 26, '2023-06-09 11:45:52'),
(959, 12, 21, '2023-06-09 11:45:55'),
(960, 13, 23, '2023-06-09 11:45:57'),
(961, 2, 22, '2023-06-09 11:46:01'),
(962, 10, 31, '2023-06-09 11:46:05'),
(963, 14, 24, '2023-06-09 11:46:06'),
(964, 15, 24, '2023-06-09 11:46:08'),
(965, 18, 19, '2023-06-09 11:46:09'),
(966, 16, 24, '2023-06-09 11:46:12'),
(967, 4, 22, '2023-06-09 11:46:16'),
(968, 11, 25, '2023-06-09 11:46:20'),
(969, 3, 24, '2023-06-09 11:46:22'),
(970, 20, 30, '2023-06-09 11:46:24'),
(971, 7, 24, '2023-06-09 11:46:27'),
(972, 14, 26, '2023-06-09 11:46:31'),
(973, 10, 22, '2023-06-09 11:46:32'),
(974, 8, 30, '2023-06-09 11:46:34'),
(975, 5, 30, '2023-06-09 11:46:36'),
(976, 4, 26, '2023-06-09 11:46:39'),
(977, 12, 19, '2023-06-09 11:46:40'),
(978, 9, 23, '2023-06-09 11:46:41'),
(979, 13, 22, '2023-06-09 11:46:43'),
(980, 12, 29, '2023-06-09 11:46:45'),
(981, 12, 22, '2023-06-09 11:46:47'),
(982, 4, 30, '2023-06-09 11:46:51'),
(983, 11, 19, '2023-06-09 11:46:54'),
(984, 9, 24, '2023-06-09 11:46:56'),
(985, 10, 20, '2023-06-09 11:46:59'),
(986, 10, 19, '2023-06-09 11:47:01'),
(987, 16, 25, '2023-06-09 11:47:03'),
(988, 17, 25, '2023-06-09 11:47:05'),
(989, 10, 26, '2023-06-09 11:47:09'),
(990, 15, 25, '2023-06-09 11:47:12'),
(991, 20, 24, '2023-06-09 11:47:16'),
(992, 10, 25, '2023-06-09 11:47:20'),
(993, 10, 31, '2023-06-09 11:47:24'),
(994, 19, 19, '2023-06-09 11:47:25'),
(995, 8, 29, '2023-06-09 11:47:28'),
(996, 19, 27, '2023-06-09 11:47:32'),
(997, 15, 31, '2023-06-09 11:47:35'),
(998, 10, 24, '2023-06-09 11:47:39'),
(999, 19, 20, '2023-06-09 11:47:43'),
(1000, 4, 25, '2023-06-09 11:47:45');
选中插入代码,点击执行
插入数据成功后,可以看到source_table和dimension_table中已有数据。
查询数据条数
select count(1) from source_table;
select count(1) from dimension_table;
二、创建session集群
使用之前的flink-sql-test-session集群即可。如若没有,安装下面步骤创建。
- 登录实时计算控制台。
- 在Flink全托管页签,单击目标工作空间名称对应应操作列下的控制台。
- 在左侧导航栏,单击Session集群。
- 单击创建Session集群。
表格中未提及的参数保持默认值即可,需要配置的参数说明请参见下表。
配置项
说明
配置示例
名称
Session集群名称。
flink-sql-test-session
状态
设置当前集群的期望运行状态:
- STOPPED:当集群配置完成后保持停止状态,同样会停止所有在运行中的作业。
- RUNNING:当集群配置完成后保持运行状态。
RUNNING
引擎版本
Session集群引擎版本号。
vvr-6.0.7-flink-1.15
Task Managers数量
默认与并行度保持一致。
4
- 单击创建Session集群。
当Session集群状态(页面上方集群名称旁边)从启动中变为运行中后,可以进入后续步骤。
三、源表查询
进入Flink开发平台,点击左侧作业开发,在demo文件夹下创建mysqlcdc-test流作业草稿,版本选择vvr-6.0.7-flink-1.15。创建源表,代码如下
CREATE TABLE mysql_source_table(
id INT NOT NULL PRIMARY KEY NOT ENFORCED,
record_time TIMESTAMP(3),
good_id INT,
amount INT,
WATERMARK FOR record_time AS record_time-INTERVAL '5' SECOND
)WITH(
'connector' = 'mysql',
'hostname' = 'rm-cn-g48798978t000ca.rwlb.rds.aliyuncs.com',
'port' = '3306',
'username' = 'itlanson',
'password' = 'It123',
'database-name' = 'test',
'table-name' = 'source_table'
);
其中hostname后是mysql的内网ip,可以在mysql实例详情的数据库连接处查看。
username和password是mysql的账号和密码。
选中代码后,点击运行,完成源表创建。
查询表数据,验证源表数据可以正常捕获。
SELECT * FROM mysqlcdc_source_table;
选中查询代码,点击调试,选择flink-sql-test-session集群,结果如下。
查询数据条数
SELECT count(1) FROM mysql_source_table;
选择代码后,点击调试。
可以看到控制台的结果在不断增大,达到500会暂停。这是因为默认查询500条,此时需要点击左侧的绿色箭头,恢复查询。
最后结果如下,可以看到,与mysql中的对应表数据条数相同。
此时,在mysql中插入一条数据。
INSERT INTO `source_table` (`id`, `good_id`, `amount`, `record_time`)
VALUE (1001, 1, 19, '2023-06-09 11:59:34');
插入成功后,观察flink控制台,发现数据已经发生了变化。即已经捕获了新增的数据。
四、窗口计算
接下来,我们希望对原始数据按照时间窗口进行分组计算。我们使用TUMBLE相关窗口函数结合GROUP BY,将长度 15 秒内的订单数据按照商品 ID 进行归类,并使用SUM计算其销售总额。
在Flink作业编辑页签中,输入如下代码。选中代码,点击调试,观察控制台的输出结果。
SELECT
good_id,
tumble_start(
record_time, interval '15' seconds
) AS record_timestamp,
sum(amount) AS total_amount
FROM
mysql_source_table
GROUP BY
tumble(
record_time, interval '15' seconds
),
good_id;
结果如下
在这个业务场景中,购买商品信息使用good_id记录,而商品ID到可读商品名字的映射表、每件商品的价格等信息则存储在另一张维度表(Dimension Table)中。我们同样可以使用Flink SQL连接维度表,只需在Flink作业中编写下面的语句。
首先建表
CREATE TABLE dimension_table (
good_id INT NOT NULL PRIMARY KEY NOT ENFORCED,
good_name VARCHAR(256),
good_price INT
)WITH(
'connector' = 'mysql',
'hostname' = 'rm-cn-g48798978t000ca.rwlb.rds.aliyuncs.com',
'port' = '3306',
'username' = 'itlanson',
'password' = 'It123',
'database-name' = 'test',
'table-name' = 'dimension_table'
);
查询数据条数
select count(1) from dimension_table;
查询结果,与mysql中对应表的数据条数一致。
这里,我们希望根据上一步中统计出的「每15秒商品销售量」信息,计算出每件商品的销售额。由于商品名称及商品价格数据存储在另一张维度表 dimension_table中,我们需要将结果视图和 dimension_table进行JOIN操作,并将「商品销售量」、「商品价格」相乘计算出「商品销售额」,并提取结果中的商品可读名称信息作为结果表。
需要确保 dimension_table中存在对应商品 ID 的条目。
作业代码如下。
SELECT
record_timestamp,
good_name,
total_amount * good_price AS revenue
FROM
(
SELECT
good_id,
tumble_start(
record_time, interval '15' seconds
) AS record_timestamp,
sum(amount) AS total_amount
FROM
mysql_source_table
GROUP BY
tumble(
record_time,interval '15'seconds
),
good_id
)AS tumbled_table
LEFT JOIN dimension_table ON tumbled_table.good_id = dimension_table.good_id;
选中代码,点击调试,结果如下
五、结果数据写回数据库
我们将这些实时的统计数据写回数据库,Flink SQL也可以简单地实现这一点。首先我们需要创建一张用于连接汇表的 Flink 表,代码如下所示:
CREATE TABLE mysql_sink_table (
record_timestamp TIMESTAMP(3) NOT NULL PRIMARY KEY NOT ENFORCED,
good_name VARCHAR(128),
sell_amount INT
) WITH (
'connector' = 'jdbc',
'url' = 'jdbc:mysql://rm-cn-g48798978t000ca.rwlb.rds.aliyuncs.com:3306/test',
'table-name' = 'sink_table',
'username' = 'itlanson',
'password' = 'It123',
'scan.auto-commit' = 'true'
);
注意:url中//与:之间的为mysql的内网ip,根据实际进行更改。
新建mysqlcdc-insert流作业草稿,版本选择vvr-6.0.7-flink-1.15。
INSERT INTO mysql_sink_table
SELECT
record_timestamp,
good_name,
total_amount * good_price AS revenue
FROM
(
SELECT
good_id,
tumble_start(
record_time, interval '15' seconds
) AS record_timestamp,
sum(amount) AS total_amount
FROM
mysql_source_table
GROUP BY
tumble (
record_time, interval '15' seconds
),
good_id
) AS tumbled_table
LEFT JOIN dimension_table ON tumbled_table.good_id = dimension_table.good_id;
点击右上角部署,提交上线。
进入左侧作业运维,启动新提交的作业。
等待一段时间,作业状态变成运行中。点击状态总览可以看到作业执行图。可以看到首先进行的是源表数据的捕获与窗口聚合;接着和维度表进行JOIN操作得到运算结果;最后将处理数据存入汇表。
等待数据写入后,可以在mysql对应表查看写入结果。
返回DMS的SQL Console,查询数据。
SELECT * FROM `sink_table`;
结果如下
- 📢博客主页:https://lansonli.blog.csdn.net
- 📢欢迎点赞 👍 收藏 ⭐留言 📝 如有错误敬请指正!
- 📢本文由 Lansonli 原创,首发于 CSDN博客🙉
- 📢停下休息的时候不要忘了别人还在奔跑,希望大家抓紧时间学习,全力奔赴更美好的生活✨
版权归原作者 Lansonli 所有, 如有侵权,请联系我们删除。