diff --git a/docs/examples/python/develop_tutorial.py b/docs/examples/python/develop_tutorial.py index fad6dfca16ede1dd668baa13ab440cf4fb285141..56ce8eeecf83a8297e6621890518f9838f8bfe54 100644 --- a/docs/examples/python/develop_tutorial.py +++ b/docs/examples/python/develop_tutorial.py @@ -16,7 +16,7 @@ print("server version:", conn.server_info) # ANCHOR_END: connect # ANCHOR: insert # create super table -conn.execute("CREATE STABLE power.meters (ts TIMESTAMP, current FLOAT, voltage INT, phase FLOAT) TAGS (location BINARY(64), groupId INT)") +conn.execute("CREATE STABLE IF NOT EXISTS power.meters (ts TIMESTAMP, current FLOAT, voltage INT, phase FLOAT) TAGS (location BINARY(64), groupId INT)") # insert multiple rows into multiple tables at once. subtables will be created automatically. affected_row = conn.execute("""INSERT INTO power.d1001 USING power.meters TAGS(California.SanFrancisco, 2) VALUES ('2018-10-03 14:38:05.000', 10.30000, 219, 0.31000) ('2018-10-03 14:38:15.000', 12.60000, 218, 0.33000) ('2018-10-03 14:38:16.800', 12.30000, 221, 0.31000) power.d1002 USING power.meters TAGS(California.SanFrancisco, 3) VALUES ('2018-10-03 14:38:16.650', 10.30000, 218, 0.25000)