本文概述無伺服器環境第 2 版的系統環境資訊。 為了確保應用程式的相容性,無伺服器工作負載會使用稱為「環境版本」的版本 API,與較新的伺服器版本保持相容。
您可以使用無伺服器筆記本中的 [環境] 側面板來選取環境版本。 請參閱 選取環境版本。
新功能和改善
無伺服器環境 2 提供下列新功能和改進功能。
儀錶板、警示和查詢都可以在工作區檔案中得到支援。
2025年5月20日
現在支援儀錶板、警示和查詢作為工作區檔案,這表示您可以從工作區文件系統的任何位置,以程序設計方式與這些 Databricks 對象互動,就像任何其他檔案一樣。 請參閱 什麼是工作區檔案? 並以 程序設計方式與工作區檔案互動。
在無伺服器計算上啟用 Web 終端機
2025年4月3日
Web 終端機現在已在無伺服器環境第 2 版上啟用。 如需如何使用 Web 終端機的詳細資訊,請參閱 在 Azure Databricks Web 終端機中執行殼層命令。
VARIANT 數據類型無法再與需要比較的作業搭配使用
2025年2月5日
您不能在包含 VARIANT 資料類型的查詢中使用下列子句或運算子:
DISTINCTINTERSECTEXCEPTUNIONDISTRIBUTE BY
此外,您無法使用這些 DataFrame 函式:
df.dropDuplicates()df.repartition()
這些作業會執行比較,並使用 VARIANT 數據類型的比較會產生未定義的結果,而且 Databricks 中不支援。 如果您在 Azure Databricks 工作負載或數據表中使用 VARIANT 類型,Databricks 建議進行下列變更:
- 更新查詢或表達式,以明確將
VARIANT值轉換成非VARIANT數據類型。 - 如果您有必須搭配上述任何作業使用的欄位,請從
VARIANT數據類型擷取這些字段,並使用非VARIANT數據類型加以儲存。
請參閱 查詢變體數據。
筆記本可以作為工作區檔案使用
2025 年 1 月 23 日
無伺服器環境 2 支援將筆記本作為工作區檔案。 您可以如同任何其他檔案一樣,以程式設計方式撰寫、讀取和刪除筆記本。 這可讓您從工作區文件系統的任何位置與筆記本進行程式化互動。 如需詳細資訊,請參閱 以程序設計方式建立、更新和刪除檔案和目錄。
已將工作進度列新增至無伺服器計算
2024 年 12 月 16 日
新增的工作進度列已經加入到在無伺服器運算環境版本 2 上執行的筆記本單元格中。 此進度列表示儲存格 Spark 程式代碼的執行進度。
系統環境
- 操作系統:Ubuntu 22.04.4 LTS
- Python:3.11.10
- Databricks 連線:15.4.5
已安裝的 Python 函式庫
若要在本地 Python 虛擬環境中重現無伺服器環境 2,請下載 requirements-env-2.txt 檔案並執行 pip install -r requirements-env-2.txt。 此命令會從無伺服器環境第二版安裝所有開放原始碼函式庫。
| Library | Version | Library | Version | Library | Version |
|---|---|---|---|---|---|
| asttokens | 2.0.5 | astunparse | 1.6.3 | autocommand | 2.2.2 |
| azure-core | 1.31.0 | azure-storage-blob | 12.19.1 | azure-storage-file-datalake | 12.14.0 |
| backports.tarfile | 1.2.0 | black | 23.3.0 | blinker | 1.4 |
| boto3 | 1.34.39 | botocore | 1.34.39 | cachetools | 5.5.0 |
| certifi | 2023.7.22 | cffi | 1.15.1 | chardet | 4.0.0 |
| charset-normalizer | 2.0.4 | click | 8.0.4 | cloudpickle | 3.0.0 |
| comm | 0.1.2 | contourpy | 1.0.5 | 加密 | 41.0.3 |
| cycler | 0.11.0 | Cython | 0.29.32 | databricks-connect | 15.4.5 |
| databricks-sdk | 0.36.0 | dbus-python | 1.2.18 | debugpy | 1.6.7 |
| 裝飾項目 | 5.1.1 | dill | 0.3.6 | distlib | 0.3.9 |
| entrypoints | 0.4 | executing | 0.8.3 | facets-overview | 1.1.1 |
| filelock | 3.13.4 | fonttools | 4.25.0 | gitdb | 4.0.11 |
| GitPython | 3.1.43 | google-api-core | 2.18.0 | google-auth | 2.35.0 |
| google-cloud-core | 2.4.1 | google-cloud-storage | 2.18.2 | google-crc32c | 1.6.0 |
| google-resumable-media | 2.7.2 | googleapis-common-protos | 1.65.0 | grpcio | 1.67.0 |
| grpcio-status | 1.67.0 | httplib2 | 0.20.2 | idna | 3.4 |
| importlib-metadata | 6.0.0 | importlib_resources | 6.4.0 | inflect | 7.3.1 |
| ipyflow-core | 0.0.201 | ipykernel | 6.28.0 | ipython | 8.25.0 |
| ipython-genutils | 0.2.0 | ipywidgets | 7.7.2 | isodate | 0.7.2 |
| jaraco.collections | 5.1.0 | jaraco.context | 5.3.0 | jaraco.functools | 4.0.1 |
| jaraco.text | 3.12.1 | jedi | 0.18.1 | jeepney | 0.7.1 |
| jmespath | 0.10.0 | joblib | 1.2.0 | jupyter_client | 7.4.9 |
| jupyter_core | 5.3.0 | keyring | 23.5.0 | kiwisolver | 1.4.4 |
| launchpadlib | 1.10.16 | lazr.restfulclient | 0.14.4 | lazr.uri | 1.0.6 |
| matplotlib | 3.7.2 | matplotlib-inline | 0.1.6 | mlflow-skinny | 2.11.4 |
| more-itertools | 8.10.0 | mypy-extensions | 0.4.3 | nest-asyncio | 1.5.6 |
| numpy | 1.23.5 | oauthlib | 3.2.0 | packaging | 23.2 |
| pandas | 1.5.3 | parso | 0.8.3 | pathspec | 0.10.3 |
| patsy | 0.5.3 | pexpect | 4.8.0 | pillow | 10.3.0 |
| pip | 24.2 | platformdirs | 3.10.0 | plotly | 5.9.0 |
| prompt_toolkit | 3.0.48 | proto-plus | 1.25.0 | protobuf | 5.28.3 |
| psutil | 5.9.0 | psycopg2 | 2.9.3 | ptyprocess | 0.7.0 |
| pure-eval | 0.2.2 | py4j | 0.10.9.7 | pyarrow | 14.0.1 |
| pyasn1 | 0.4.8 | pyasn1-modules | 0.2.8 | pyccolo | 0.0.65 |
| pycparser | 2.21 | pydantic | 1.10.6 | Pygments | 2.15.1 |
| PyGObject | 3.42.1 | PyJWT | 2.3.0 | pyodbc | 4.0.39 |
| pyparsing | 3.0.9 | python-dateutil | 2.8.2 | python-lsp-jsonrpc | 1.1.2 |
| pytz | 2022.7 | PyYAML | 6.0 | pyzmq | 25.1.2 |
| requests | 2.31.0 | rsa | 4.9 | s3transfer | 0.10.3 |
| scikit-learn | 1.3.0 | scipy | 1.11.1 | seaborn | 0.12.2 |
| SecretStorage | 3.3.1 | setuptools | 75.1.0 | six | 1.16.0 |
| smmap | 5.0.1 | sqlparse | 0.5.1 | ssh-import-id | 5.11 |
| stack-data | 0.2.0 | statsmodels | 0.14.0 | tenacity | 8.2.2 |
| threadpoolctl | 2.2.0 | tokenize-rt | 4.2.1 | tomli | 2.0.1 |
| tornado | 6.3.2 | traitlets | 5.13.0 | typeguard | 4.3.0 |
| typing_extensions | 4.10.0 | tzdata | 2022.1 | ujson | 5.4.0 |
| unattended-upgrades | 0.1 | urllib3 | 1.26.16 | virtualenv | 20.26.6 |
| wadllib | 1.3.6 | wcwidth | 0.2.5 | Wheel | 0.38.4 |
| zipp | 3.11.0 | zstandard | 0.23.0 |