Skip to content

Commit cf1bce4

Browse files
committed
add example that doesn't have tag
Signed-off-by: Jiabin Hu <jiabin.hu@databricks.com>
1 parent 2c9acb5 commit cf1bce4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

examples/query_tags_example.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@
7474
result = cursor.fetchone()
7575
print(f" Special Chars Query Result: {result[0]}")
7676

77+
# Query 4: No tags (demonstrates tags don't persist from previous queries)
78+
cursor.execute("SELECT 4")
79+
result = cursor.fetchone()
80+
print(f" No Tags Query Result: {result[0]}")
81+
7782
print()
7883

7984
# Example 3: Async execution with query tags
@@ -86,7 +91,7 @@
8691

8792
with connection.cursor() as cursor:
8893
cursor.execute_async(
89-
"SELECT 4",
94+
"SELECT 5",
9095
query_tags={"team": "data-eng", "mode": "async"}
9196
)
9297
cursor.get_async_execution_result()
@@ -107,7 +112,7 @@
107112
# Execute multiple queries with the same tags
108113
cursor.executemany(
109114
"SELECT ?",
110-
[[5], [6], [7]],
115+
[[6], [7], [8]],
111116
query_tags={"team": "data-eng", "batch": "executemany"}
112117
)
113118
result = cursor.fetchone()

0 commit comments

Comments
 (0)