From 1a12fa92d486d49c74700547f48f9ba912290234 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Wed, 23 Nov 2022 09:36:26 +0800 Subject: [PATCH] docs: move topic drop to early phase in python tmq example (#18350) * docs: update examples/python/tmq_example.py with connector repo * Update tmq_example.py * docs: remove tb variable after get_table_name removed * docs: move topic drop to early phase Co-authored-by: Liu Jicong --- docs/examples/python/tmq_example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/python/tmq_example.py b/docs/examples/python/tmq_example.py index 836beb2417..a4625ca11a 100644 --- a/docs/examples/python/tmq_example.py +++ b/docs/examples/python/tmq_example.py @@ -4,6 +4,7 @@ from taos.tmq import * conn = taos.connect() print("init") +conn.execute("drop topic if exists topic_ctb_column") conn.execute("drop database if exists py_tmq") conn.execute("create database if not exists py_tmq vgroups 2") conn.select_db("py_tmq") @@ -15,7 +16,6 @@ conn.execute("create table if not exists tb2 using stb1 tags(2)") conn.execute("create table if not exists tb3 using stb1 tags(3)") print("create topic") -conn.execute("drop topic if exists topic_ctb_column") conn.execute( "create topic if not exists topic_ctb_column as select ts, c1, c2, c3 from stb1" ) -- GitLab