File tree Expand file tree Collapse file tree 1 file changed +14
-18
lines changed
Expand file tree Collapse file tree 1 file changed +14
-18
lines changed Original file line number Diff line number Diff line change 4343
4444 # Завдання для створення таблиці (якщо не існує)
4545 create_table = MySqlOperator (
46- task_id = 'create_table' ,
47- mysql_conn_id = connection_name ,
48- sql = """
49- CREATE TABLE IF NOT EXISTS mds6rdd.games (
50- `edition` text,
51- `edition_id` int DEFAULT NULL,
52- `edition_url` text,
53- `year` int DEFAULT NULL,
54- `city` text,
55- `country_flag_url` text,
56- `country_noc` text,
57- `start_date` text,
58- `end_date` text,
59- `competition_date` text,
60- `isHeld` text
61- );
62- """
63- )
46+ task_id = 'create_table' ,
47+ mysql_conn_id = connection_name ,
48+ sql = """
49+ DROP TABLE IF EXISTS mds6rdd.medals;
50+
51+ CREATE TABLE IF NOT EXISTS mds6rdd.medals (
52+ `id` INT NOT NULL AUTO_INCREMENT,
53+ `medal_type` VARCHAR(50),
54+ `count` INT,
55+ `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP,
56+ PRIMARY KEY (`id`)
57+ );
58+ """
59+ )
6460
6561 check_db = MySqlOperator (
6662 task_id = 'check_db' ,
You can’t perform that action at this time.
0 commit comments