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 <liujicong@qq.com>
This commit is contained in:
Shuduo Sang 2022-11-23 09:36:26 +08:00 committed by GitHub
parent fda726df0c
commit 1a12fa92d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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"
)