Account Usage QUERY_HISTORY 视图:QUERY_TAG 的变更

注意

此行为变更在 2024_03 捆绑包中。

有关捆绑包的当前状态,请参阅 捆绑包历史记录

当返回与 Streamlit in Snowflake 查询相关的信息时,QUERY_HISTORY 视图 的输出显示如下:

变更前:

QUERY_TAG 列包含一个自由格式值,类似于:

ExecuteStreamlit,streamlitName: STREAMLIT_DB.STREAMLIT_SCHEMA.OBJECT_NAME,streamlitId:123456789
Copy

具有子查询标记内容,类似于:

File "/usr/lib/python_udf/ed2bb26281494c8405804a3281315153bd4c74b8d05d7de038bb8ce6fe8796d5/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "/home/udf/10380937708282/streamlit_app.py", line 29, in <module>
df = session.sql(sql).collect()
File "/usr/lib/python_udf/ed2bb26281494c8405804a3281315153bd4c74b8d05d7de038bb8ce6fe8796d5/lib/python3.8/site-packages/snowflake/snowpark/_internal/telemetry.py", line 139, in wrap
result = func(*args, **kwargs)
Copy
变更后:

QUERY_TAG 列包含一个 JSON 值。类似于:

{
  "StreamlitEngine": "ExecuteStreamlit",
  "StreamlitName": "STREAMLIT_DB.STREAMLIT_SCHEMA.OBJECT_NAME"
}
Copy

具有子查询标记内容,类似于:

{
  "StreamlitEngine": "ExecuteStreamlit",
  "StreamlitName": "STREAMLIT_DB.STREAMLIT_SCHEMA.OBJECT_NAME",
  "ChildQuery": "true"
}
Copy

例如,在解析查询历史记录或跟踪 Streamlit 应用程序时,请引用 Streamlit 应用程序的完全限定名称,例如 "StreamlitName": "STREAMLIT_DB.STREAMLIT_SCHEMA.OBJECT_NAME"

参考:1571

语言: 中文