1. Window function: 1. Create table: — Create kafka table CREATE TABLE bid ( bidtime TIMESTAMP(3), price DECIMAL(10, 2) , item STRING, WATERMARK FOR bidtime AS bidtime ) WITH ( ‘connector’ = ‘kafka’, ‘topic’ = ‘bid’, — the topic of the data ‘properties.bootstrap.servers’ = ‘master:9092,node1:9092,node2:9092’, — broker list ‘properties.group.id’ = ‘testGroup’, — consumer group ‘scan.startup.mode’ […]
Tag: sql
Docker installation of mysql, redis, rabbitmq, es, nacos under Liunx
1. Environment preparation Note: Ignore if related tools have already been installed. 1Install JAVA operating environment Step 1: Upload or download the installation package cd /usr/local jdk-8u152-linux-x64.tar.gz Step 2: Unzip the installation package tar -zxvf jdk-8u152-linux-x64.tar.gz Step 3: Establish a soft connection ln -s /usr/local/jdk1.8.0_152/ /usr/local/jdk Step 4: Modify environment variables vim /etc/profile export JAVA_HOME=/usr/local/jdk […]
MySQL Backup and Recovery Best Practices: The Ultimate Guide
As businesses and applications increasingly rely on MySQL databases to manage their critical data, ensuring data reliability and availability becomes critical. In this digital information age, a strong backup and recovery strategy is the backbone of application stability. In this article, we will review all the commonly used MySQL backup and recovery strategies, which are […]
Monitoring tool: Prometheus monitoring middleware (Nginx, Redis, MySql, etc.)
Our products currently use middleware such as Nginx, Redis, RabbitMQ, MySql, etc. This article introduces how to use Promtheus to monitor these middleware. There is a picture in “Monitoring Tool: Introduction and Installation of Prometheus” that shows the data trend of Prometheus, as follows: As can be seen from the figure, the first step in […]
33. Time zone in Flink’s Table API and SQL
Flink series of articles 1. Flink column The Flink column systematically introduces a certain knowledge point and explains it with specific examples. 1. Flink deployment series This section introduces the basic content related to the deployment and configuration of Flink. 2. Flink basic series This part introduces the basic parts of Flink, such as terminology, […]
The use of foreign keys and foreign key constraint strategies in MySQL
1. The concept of foreign key constraints Foreign key constraint (FOREIGN KEY, abbreviated as FK is a concept of database design, it ensures that the relationship between two tables maintains data consistency and integrity. Foreign key means that a field in the table depends on the value of a field in another table, and the […]
MySQL: Grammar Quick Reference [Continuously updated…]
1. Define basic tables 1. Commonly used integrity constraints Primary code constraints primary key foreign key constraints foreign key uniqueness constraint unique non-nullity constraint not null value constraints check 2. Example questions [Example 1] Create a “student” table Student, which consists of five attributes: student number Sno, name Sname, gender Ssex, age Sage, and department […]
[MySQL Advanced] Optimize SQL Steps
3. Optimize SQL steps During the application development process, due to the small initial amount of data, developers paid more attention to functional implementation when writing SQL statements. However, when the application system was officially launched, with the rapid increase in the amount of production data, many SQL statements began to gradually appear. Performance problems […]
Write programs based on Spark SQL to complete simple indicators.
Table of Contents data preparation: I have prepared the data information of members of an aerospace company as the data for this project. The details are as follows: Demand indicators: In order to visualize the ratio of the number of members among cities in various provinces, the cities ranked by the number of aerospace company […]
SQL injection – delayed injection / Python script blasting
Delayed injection Due to network problems and other reasons, if the timeout is too short, the blasting may be inaccurate, but if the timeout is set too long, the blasting time cost will increase. Principle Through the condition in if, if it is true, it will sleep, otherwise it will not sleep Here, the first […]