This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Language plugins

1 - Python plugin

Learn how to use the Python plugin to run user-defined functions using a Python script.

2 - Python plugin packages

Learn about the Python packages available in the Python plugin.

This article lists the available Python packages in the Python plugin. For more information, see Python plugin.

3.11.7 (Preview)

Python engine 3.11.7 + common data science and ML packages

PackageVersion
annotated-types0.6.0
anytree2.12.1
arrow1.3.0
attrs23.2.0
blinker1.7.0
blis0.7.11
Bottleneck1.3.8
Brotli1.1.0
brotlipy0.7.0
catalogue2.0.10
certifi2024.2.2
cffi1.16.0
chardet5.2.0
charset-normalizer3.3.2
click8.1.7
cloudpathlib0.16.0
cloudpickle3.0.0
colorama0.4.6
coloredlogs15.0.1
confection0.1.4
contourpy1.2.1
cycler0.12.1
cymem2.0.8
Cython3.0.10
daal2024.3.0
daal4py2024.3.0
dask2024.4.2
diff-match-patch20230430
dill0.3.8
distributed2024.4.2
filelock3.13.4
flashtext2.7
Flask3.0.3
Flask-Compress1.15
flatbuffers24.3.25
fonttools4.51.0
fsspec2024.3.1
gensim4.3.2
humanfriendly10.0
idna3.7
importlib_metadata7.1.0
intervaltree3.1.0
itsdangerous2.2.0
jellyfish1.0.3
Jinja23.1.3
jmespath1.0.1
joblib1.4.0
json50.9.25
jsonschema4.21.1
jsonschema-specifications2023.12.1
kiwisolver1.4.5
langcodes3.4.0
language_data1.2.0
locket1.0.0
lxml5.2.1
marisa-trie1.1.0
MarkupSafe2.1.5
mlxtend0.23.1
mpmath1.3.0
msgpack1.0.8
murmurhash1.0.10
networkx3.3
nltk3.8.1
numpy1.26.4
onnxruntime1.17.3
packaging24.0
pandas2.2.2
partd1.4.1
patsy0.5.6
pillow10.3.0
platformdirs4.2.1
plotly5.21.0
preshed3.0.9
protobuf5.26.1
psutil5.9.8
pycparser2.22
pydantic2.7.1
pydantic_core2.18.2
pyfpgrowth1.0
pyparsing3.1.2
pyreadline33.4.1
python-dateutil2.9.0.post0
pytz2024.1
PyWavelets1.6.0
PyYAML6.0.1
queuelib1.6.2
referencing0.35.0
regex2024.4.16
requests2.31.0
requests-file2.0.0
rpds-py0.18.0
scikit-learn1.4.2
scipy1.13.0
sip6.8.3
six1.16.0
smart-open6.4.0
snowballstemmer2.2.0
sortedcollections2.1.0
sortedcontainers2.4.0
spacy3.7.4
spacy-legacy3.0.12
spacy-loggers1.0.5
srsly2.4.8
statsmodels0.14.2
sympy1.12
tbb2021.12.0
tblib3.0.0
tenacity8.2.3
textdistance4.6.2
thinc8.2.3
threadpoolctl3.4.0
three-merge0.1.1
tldextract5.1.2
toolz0.12.1
tornado6.4
tqdm4.66.2
typer0.9.4
types-python-dateutil2.9.0.20240316
typing_extensions4.11.0
tzdata2024.1
ujson5.9.0
Unidecode1.3.8
urllib32.2.1
wasabi1.1.2
weasel0.3.4
Werkzeug3.0.2
xarray2024.3.0
zict3.0.0
zipp3.18.1
zstandard0.22.0

3.11.7 DL (Preview)

Python engine 3.11.7 + common data science and ML packages + deep learning packages (tensorflow & torch)

PackageVersion
absl-py2.1.0
alembic1.13.1
aniso86019.0.1
annotated-types0.6.0
anytree2.12.1
arch7.0.0
arrow1.3.0
astunparse1.6.3
attrs23.2.0
blinker1.7.0
blis0.7.11
Bottleneck1.3.8
Brotli1.1.0
brotlipy0.7.0
cachetools5.3.3
catalogue2.0.10
certifi2024.2.2
cffi1.16.0
chardet5.2.0
charset-normalizer3.3.2
click8.1.7
cloudpathlib0.16.0
cloudpickle3.0.0
colorama0.4.6
coloredlogs15.0.1
confection0.1.4
contourpy1.2.1
cycler0.12.1
cymem2.0.8
Cython3.0.10
daal2024.3.0
daal4py2024.3.0
dask2024.4.2
Deprecated1.2.14
diff-match-patch20230430
dill0.3.8
distributed2024.4.2
docker7.1.0
entrypoints0.4
filelock3.13.4
flashtext2.7
Flask3.0.3
Flask-Compress1.15
flatbuffers24.3.25
fonttools4.51.0
fsspec2024.3.1
gast0.5.4
gensim4.3.2
gitdb4.0.11
GitPython3.1.43
google-pasta0.2.0
graphene3.3
graphql-core3.2.3
graphql-relay3.2.0
greenlet3.0.3
grpcio1.64.0
h5py3.11.0
humanfriendly10.0
idna3.7
importlib-metadata7.0.0
iniconfig2.0.0
intervaltree3.1.0
itsdangerous2.2.0
jellyfish1.0.3
Jinja23.1.3
jmespath1.0.1
joblib1.4.0
json50.9.25
jsonschema4.21.1
jsonschema-specifications2023.12.1
keras3.3.3
kiwisolver1.4.5
langcodes3.4.0
language_data1.2.0
libclang18.1.1
locket1.0.0
lxml5.2.1
Mako1.3.5
marisa-trie1.1.0
Markdown3.6
markdown-it-py3.0.0
MarkupSafe2.1.5
mdurl0.1.2
ml-dtypes0.3.2
mlflow2.13.0
mlxtend0.23.1
mpmath1.3.0
msgpack1.0.8
murmurhash1.0.10
namex0.0.8
networkx3.3
nltk3.8.1
numpy1.26.4
onnxruntime1.17.3
opentelemetry-api1.24.0
opentelemetry-sdk1.24.0
opentelemetry-semantic-conventions0.45b0
opt-einsum3.3.0
optree0.11.0
packaging24.0
pandas2.2.2
partd1.4.1
patsy0.5.6
pillow10.3.0
platformdirs4.2.1
plotly5.21.0
pluggy1.5.0
preshed3.0.9
protobuf4.25.3
psutil5.9.8
pyarrow15.0.2
pycparser2.22
pydantic2.7.1
pydantic_core2.18.2
pyfpgrowth1.0
Pygments2.18.0
pyparsing3.1.2
pyreadline33.4.1
pytest8.2.1
python-dateutil2.9.0.post0
pytz2024.1
PyWavelets1.6.0
pywin32306
PyYAML6.0.1
querystring-parser1.2.4
queuelib1.6.2
referencing0.35.0
regex2024.4.16
requests2.31.0
requests-file2.0.0
rich13.7.1
rpds-py0.18.0
rstl0.1.3
scikit-learn1.4.2
scipy1.13.0
seasonal0.3.1
sip6.8.3
six1.16.0
smart-open6.4.0
smmap5.0.1
snowballstemmer2.2.0
sortedcollections2.1.0
sortedcontainers2.4.0
spacy3.7.4
spacy-legacy3.0.12
spacy-loggers1.0.5
SQLAlchemy2.0.30
sqlparse0.5.0
srsly2.4.8
statsmodels0.14.2
sympy1.12
tbb2021.12.0
tblib3.0.0
tenacity8.2.3
tensorboard2.16.2
tensorboard-data-server0.7.2
tensorflow2.16.1
tensorflow-intel2.16.1
tensorflow-io-gcs-filesystem0.31.0
termcolor2.4.0
textdistance4.6.2
thinc8.2.3
threadpoolctl3.4.0
three-merge0.1.1
time-series-anomaly-detector0.2.7
tldextract5.1.2
toolz0.12.1
torch2.2.2
torchaudio2.2.2
torchvision0.17.2
tornado6.4
tqdm4.66.2
typer0.9.4
types-python-dateutil2.9.0.20240316
typing_extensions4.11.0
tzdata2024.1
ujson5.9.0
Unidecode1.3.8
urllib32.2.1
waitress3.0.0
wasabi1.1.2
weasel0.3.4
Werkzeug3.0.2
wrapt1.16.0
xarray2024.3.0
zict3.0.0
zipp3.18.1
zstandard0.22.0

3.10.8

Python engine 3.10.8 + common data science and ML packages

PackageVersion
alembic1.11.1
anytree2.8.0
arrow1.2.3
attrs22.2.0
blis0.7.9
Bottleneck1.3.5
Brotli1.0.9
brotlipy0.7.0
catalogue2.0.8
certifi2022.12.7
cffi1.15.1
chardet5.0.0
charset-normalizer2.1.1
click8.1.3
cloudpickle2.2.1
colorama0.4.6
coloredlogs15.0.1
confection0.0.4
contourpy1.0.7
cycler0.11.0
cymem2.0.7
Cython0.29.28
daal2021.6.0
daal4py2021.6.3
dask2022.10.2
databricks-cli0.17.7
diff-match-patch20200713
dill0.3.6
distributed2022.10.2
docker6.1.3
entrypoints0.4
filelock3.9.1
flashtext2.7
Flask2.2.3
Flask-Compress1.13
flatbuffers23.3.3
fonttools4.39.0
fsspec2023.3.0
gensim4.2.0
gitdb4.0.10
GitPython3.1.31
greenlet2.0.2
HeapDict1.0.1
humanfriendly10.0
idna3.4
importlib-metadata6.7.0
intervaltree3.1.0
itsdangerous2.1.2
jellyfish0.9.0
Jinja23.1.2
jmespath1.0.1
joblib1.2.0
json50.9.10
jsonschema4.16.0
kiwisolver1.4.4
langcodes3.3.0
locket1.0.0
lxml4.9.1
Mako1.2.4
Markdown3.4.3
MarkupSafe2.1.2
mlflow2.4.1
mlxtend0.21.0
mpmath1.3.0
msgpack1.0.5
murmurhash1.0.9
networkx2.8.7
nltk3.7
numpy1.23.4
oauthlib3.2.2
onnxruntime1.13.1
packaging23.0
pandas1.5.1
partd1.3.0
pathy0.10.1
patsy0.5.3
Pillow9.4.0
pip23.0.1
platformdirs2.5.2
plotly5.11.0
ply3.11
preshed3.0.8
protobuf4.22.1
psutil5.9.3
pyarrow12.0.1
pycparser2.21
pydantic1.10.6
pyfpgrowth1.0
PyJWT2.7.0
pyparsing3.0.9
pyreadline33.4.1
pyrsistent0.19.3
python-dateutil2.8.2
pytz2022.7.1
PyWavelets1.4.1
pywin32306
PyYAML6.0
querystring-parser1.2.4
queuelib1.6.2
regex2022.10.31
requests2.28.2
requests-file1.5.1
scikit-learn1.1.3
scipy1.9.3
setuptools67.6.0
sip6.7.3
six1.16.0
smart-open6.3.0
smmap5.0.0
snowballstemmer2.2.0
sortedcollections2.1.0
sortedcontainers2.4.0
spacy3.4.2
spacy-legacy3.0.12
spacy-loggers1.0.4
SQLAlchemy2.0.18
sqlparse0.4.4
srsly2.4.5
statsmodels0.13.2
sympy1.11.1
tabulate0.9.0
tbb2021.7.1
tblib1.7.0
tenacity8.2.2
textdistance4.5.0
thinc8.1.9
threadpoolctl3.1.0
three-merge0.1.1
tldextract3.4.0
toml0.10.2
toolz0.12.0
tornado6.1
tqdm4.65.0
typer0.4.2
typing_extensions4.5.0
ujson5.5.0
Unidecode1.3.6
urllib31.26.15
waitress2.1.2
wasabi0.10.1
websocket-client1.6.1
Werkzeug2.2.3
wheel0.40.0
xarray2022.10.0
zict2.2.0
zipp3.15.0

3.10.8 DL

Not supported

3.6.5 (Legacy)

Not supported

This article lists the available managed Python packages in the Python plugin. For more information, see Python plugin.

To create a custom image, see Create a custom image.

3.11.7 (Preview)

Python engine 3.11.7 + common data science and ML packages

PackageVersion
annotated-types0.6.0
anytree2.12.1
arrow1.3.0
attrs23.2.0
blinker1.7.0
blis0.7.11
Bottleneck1.3.8
Brotli1.1.0
brotlipy0.7.0
catalogue2.0.10
certifi2024.2.2
cffi1.16.0
chardet5.2.0
charset-normalizer3.3.2
click8.1.7
cloudpathlib0.16.0
cloudpickle3.0.0
colorama0.4.6
coloredlogs15.0.1
confection0.1.4
contourpy1.2.1
cycler0.12.1
cymem2.0.8
Cython3.0.10
daal2024.3.0
daal4py2024.3.0
dask2024.4.2
diff-match-patch20230430
dill0.3.8
distributed2024.4.2
filelock3.13.4
flashtext2.7
Flask3.0.3
Flask-Compress1.15
flatbuffers24.3.25
fonttools4.51.0
fsspec2024.3.1
gensim4.3.2
humanfriendly10.0
idna3.7
importlib_metadata7.1.0
intervaltree3.1.0
itsdangerous2.2.0
jellyfish1.0.3
Jinja23.1.3
jmespath1.0.1
joblib1.4.0
json50.9.25
jsonschema4.21.1
jsonschema-specifications2023.12.1
kiwisolver1.4.5
langcodes3.4.0
language_data1.2.0
locket1.0.0
lxml5.2.1
marisa-trie1.1.0
MarkupSafe2.1.5
matplotlib3.8.4
mlxtend0.23.1
mpmath1.3.0
msgpack1.0.8
murmurhash1.0.10
networkx3.3
nltk3.8.1
numpy1.26.4
onnxruntime1.17.3
packaging24.0
pandas2.2.2
partd1.4.1
patsy0.5.6
pillow10.3.0
platformdirs4.2.1
plotly5.21.0
preshed3.0.9
protobuf5.26.1
psutil5.9.8
pycparser2.22
pydantic2.7.1
pydantic_core2.18.2
pyfpgrowth1.0
pyparsing3.1.2
pyreadline33.4.1
python-dateutil2.9.0.post0
pytz2024.1
PyWavelets1.6.0
PyYAML6.0.1
queuelib1.6.2
referencing0.35.0
regex2024.4.16
requests2.31.0
requests-file2.0.0
rpds-py0.18.0
scikit-learn1.4.2
scipy1.13.0
sip6.8.3
six1.16.0
smart-open6.4.0
snowballstemmer2.2.0
sortedcollections2.1.0
sortedcontainers2.4.0
spacy3.7.4
spacy-legacy3.0.12
spacy-loggers1.0.5
srsly2.4.8
statsmodels0.14.2
sympy1.12
tbb2021.12.0
tblib3.0.0
tenacity8.2.3
textdistance4.6.2
thinc8.2.3
threadpoolctl3.4.0
three-merge0.1.1
tldextract5.1.2
toolz0.12.1
tornado6.4
tqdm4.66.2
typer0.9.4
types-python-dateutil2.9.0.20240316
typing_extensions4.11.0
tzdata2024.1
ujson5.9.0
Unidecode1.3.8
urllib32.2.1
wasabi1.1.2
weasel0.3.4
Werkzeug3.0.2
xarray2024.3.0
zict3.0.0
zipp3.18.1
zstandard0.22.0

3.11.7 DL (Preview)

Python engine 3.11.7 + common data science and ML packages + deep learning packages (tensorflow & torch)

PackageVersion
absl-py2.1.0
alembic1.13.1
aniso86019.0.1
annotated-types0.6.0
anytree2.12.1
arch7.0.0
arrow1.3.0
astunparse1.6.3
attrs23.2.0
blinker1.7.0
blis0.7.11
Bottleneck1.3.8
Brotli1.1.0
brotlipy0.7.0
cachetools5.3.3
catalogue2.0.10
certifi2024.2.2
cffi1.16.0
chardet5.2.0
charset-normalizer3.3.2
click8.1.7
cloudpathlib0.16.0
cloudpickle3.0.0
colorama0.4.6
coloredlogs15.0.1
confection0.1.4
contourpy1.2.1
cycler0.12.1
cymem2.0.8
Cython3.0.10
daal2024.3.0
daal4py2024.3.0
dask2024.4.2
Deprecated1.2.14
diff-match-patch20230430
dill0.3.8
distributed2024.4.2
docker7.1.0
entrypoints0.4
filelock3.13.4
flashtext2.7
Flask3.0.3
Flask-Compress1.15
flatbuffers24.3.25
fonttools4.51.0
fsspec2024.3.1
gast0.5.4
gensim4.3.2
gitdb4.0.11
GitPython3.1.43
google-pasta0.2.0
graphene3.3
graphql-core3.2.3
graphql-relay3.2.0
greenlet3.0.3
grpcio1.64.0
h5py3.11.0
humanfriendly10.0
idna3.7
importlib-metadata7.0.0
iniconfig2.0.0
intervaltree3.1.0
itsdangerous2.2.0
jellyfish1.0.3
Jinja23.1.3
jmespath1.0.1
joblib1.4.0
json50.9.25
jsonschema4.21.1
jsonschema-specifications2023.12.1
keras3.3.3
kiwisolver1.4.5
langcodes3.4.0
language_data1.2.0
libclang18.1.1
locket1.0.0
lxml5.2.1
Mako1.3.5
marisa-trie1.1.0
Markdown3.6
markdown-it-py3.0.0
MarkupSafe2.1.5
matplotlib3.8.4
mdurl0.1.2
ml-dtypes0.3.2
mlflow2.13.0
mlxtend0.23.1
mpmath1.3.0
msgpack1.0.8
murmurhash1.0.10
namex0.0.8
networkx3.3
nltk3.8.1
numpy1.26.4
onnxruntime1.17.3
opentelemetry-api1.24.0
opentelemetry-sdk1.24.0
opentelemetry-semantic-conventions0.45b0
opt-einsum3.3.0
optree0.11.0
packaging24.0
pandas2.2.2
partd1.4.1
patsy0.5.6
pillow10.3.0
platformdirs4.2.1
plotly5.21.0
pluggy1.5.0
preshed3.0.9
protobuf4.25.3
psutil5.9.8
pyarrow15.0.2
pycparser2.22
pydantic2.7.1
pydantic_core2.18.2
pyfpgrowth1.0
Pygments2.18.0
pyparsing3.1.2
pyreadline33.4.1
pytest8.2.1
python-dateutil2.9.0.post0
pytz2024.1
PyWavelets1.6.0
pywin32306
PyYAML6.0.1
querystring-parser1.2.4
queuelib1.6.2
referencing0.35.0
regex2024.4.16
requests2.31.0
requests-file2.0.0
rich13.7.1
rpds-py0.18.0
rstl0.1.3
scikit-learn1.4.2
scipy1.13.0
seasonal0.3.1
sip6.8.3
six1.16.0
smart-open6.4.0
smmap5.0.1
snowballstemmer2.2.0
sortedcollections2.1.0
sortedcontainers2.4.0
spacy3.7.4
spacy-legacy3.0.12
spacy-loggers1.0.5
SQLAlchemy2.0.30
sqlparse0.5.0
srsly2.4.8
statsmodels0.14.2
sympy1.12
tbb2021.12.0
tblib3.0.0
tenacity8.2.3
tensorboard2.16.2
tensorboard-data-server0.7.2
tensorflow2.16.1
tensorflow-intel2.16.1
tensorflow-io-gcs-filesystem0.31.0
termcolor2.4.0
textdistance4.6.2
thinc8.2.3
threadpoolctl3.4.0
three-merge0.1.1
time-series-anomaly-detector0.2.7
tldextract5.1.2
toolz0.12.1
torch2.2.2
torchaudio2.2.2
torchvision0.17.2
tornado6.4
tqdm4.66.2
typer0.9.4
types-python-dateutil2.9.0.20240316
typing_extensions4.11.0
tzdata2024.1
ujson5.9.0
Unidecode1.3.8
urllib32.2.1
waitress3.0.0
wasabi1.1.2
weasel0.3.4
Werkzeug3.0.2
wrapt1.16.0
xarray2024.3.0
zict3.0.0
zipp3.18.1
zstandard0.22.0

3.10.8

Python engine 3.10.8 + common data science and ML packages

PackageVersion
alembic1.11.1
anytree2.8.0
arrow1.2.3
attrs22.2.0
blis0.7.9
Bottleneck1.3.5
Brotli1.0.9
brotlipy0.7.0
catalogue2.0.8
certifi2022.12.7
cffi1.15.1
chardet5.0.0
charset-normalizer2.1.1
click8.1.3
cloudpickle2.2.1
colorama0.4.6
coloredlogs15.0.1
confection0.0.4
contourpy1.0.7
cycler0.11.0
cymem2.0.7
Cython0.29.28
daal2021.6.0
daal4py2021.6.3
dask2022.10.2
databricks-cli0.17.7
diff-match-patch20200713
dill0.3.6
distributed2022.10.2
docker6.1.3
entrypoints0.4
filelock3.9.1
flashtext2.7
Flask2.2.3
Flask-Compress1.13
flatbuffers23.3.3
fonttools4.39.0
fsspec2023.3.0
gensim4.2.0
gitdb4.0.10
GitPython3.1.31
greenlet2.0.2
HeapDict1.0.1
humanfriendly10.0
idna3.4
importlib-metadata6.7.0
intervaltree3.1.0
itsdangerous2.1.2
jellyfish0.9.0
Jinja23.1.2
jmespath1.0.1
joblib1.2.0
json50.9.10
jsonschema4.16.0
kiwisolver1.4.4
langcodes3.3.0
locket1.0.0
lxml4.9.1
Mako1.2.4
Markdown3.4.3
MarkupSafe2.1.2
mlflow2.4.1
mlxtend0.21.0
mpmath1.3.0
msgpack1.0.5
murmurhash1.0.9
networkx2.8.7
nltk3.7
numpy1.23.4
oauthlib3.2.2
onnxruntime1.13.1
packaging23.0
pandas1.5.1
partd1.3.0
pathy0.10.1
patsy0.5.3
Pillow9.4.0
pip23.0.1
platformdirs2.5.2
plotly5.11.0
ply3.11
preshed3.0.8
protobuf4.22.1
psutil5.9.3
pyarrow12.0.1
pycparser2.21
pydantic1.10.6
pyfpgrowth1.0
PyJWT2.7.0
pyparsing3.0.9
pyreadline33.4.1
pyrsistent0.19.3
python-dateutil2.8.2
pytz2022.7.1
PyWavelets1.4.1
pywin32306
PyYAML6.0
querystring-parser1.2.4
queuelib1.6.2
regex2022.10.31
requests2.28.2
requests-file1.5.1
scikit-learn1.1.3
scipy1.9.3
setuptools67.6.0
sip6.7.3
six1.16.0
smart-open6.3.0
smmap5.0.0
snowballstemmer2.2.0
sortedcollections2.1.0
sortedcontainers2.4.0
spacy3.4.2
spacy-legacy3.0.12
spacy-loggers1.0.4
SQLAlchemy2.0.18
sqlparse0.4.4
srsly2.4.5
statsmodels0.13.2
sympy1.11.1
tabulate0.9.0
tbb2021.7.1
tblib1.7.0
tenacity8.2.2
textdistance4.5.0
thinc8.1.9
threadpoolctl3.1.0
three-merge0.1.1
tldextract3.4.0
toml0.10.2
toolz0.12.0
tornado6.1
tqdm4.65.0
typer0.4.2
typing_extensions4.5.0
ujson5.5.0
Unidecode1.3.6
urllib31.26.15
waitress2.1.2
wasabi0.10.1
websocket-client1.6.1
Werkzeug2.2.3
wheel0.40.0
xarray2022.10.0
zict2.2.0
zipp3.15.0

3.10.8 DL

Python engine 3.10.8 + common data science and ML packages + deep learning packages (tensorflow & torch)

PackageVersion
absl-py1.4.0
alembic1.11.1
anytree2.8.0
arrow1.2.3
astunparse1.6.3
attrs22.1.0
blis0.7.9
Bottleneck1.3.5
Brotli1.0.9
brotlipy0.7.0
cachetools5.3.0
catalogue2.0.8
certifi2022.9.24
cffi1.15.1
chardet5.0.0
charset-normalizer2.1.1
click8.1.3
cloudpickle2.2.0
colorama0.4.6
coloredlogs15.0.1
confection0.0.3
contourpy1.0.6
cycler0.11.0
cymem2.0.7
Cython0.29.28
daal2021.6.0
daal4py2021.6.3
dask2022.10.2
databricks-cli0.17.7
diff-match-patch20200713
dill0.3.6
distributed2022.10.2
docker6.1.3
entrypoints0.4
filelock3.8.0
flashtext2.7
Flask2.2.2
Flask-Compress1.13
flatbuffers22.10.26
fonttools4.38.0
fsspec2022.10.0
gast0.4.0
gensim4.2.0
gitdb4.0.10
GitPython3.1.31
google-auth2.16.2
google-auth-oauthlib0.4.6
google-pasta0.2.0
greenlet2.0.2
grpcio1.51.3
h5py3.8.0
HeapDict1.0.1
humanfriendly10.0
idna3.4
importlib-metadata6.7.0
intervaltree3.1.0
itsdangerous2.1.2
jax0.4.6
jellyfish0.9.0
Jinja23.1.2
jmespath1.0.1
joblib1.2.0
json50.9.10
jsonschema4.16.0
keras2.12.0
kiwisolver1.4.4
langcodes3.3.0
libclang16.0.0
locket1.0.0
lxml4.9.1
Mako1.2.4
Markdown3.4.2
MarkupSafe2.1.1
mlflow2.4.1
mlxtend0.21.0
mpmath1.2.1
msgpack1.0.4
murmurhash1.0.9
networkx2.8.7
nltk3.7
numpy1.23.4
oauthlib3.2.2
onnxruntime1.13.1
opt-einsum3.3.0
packaging21.3
pandas1.5.1
partd1.3.0
pathy0.6.2
patsy0.5.3
Pillow9.3.0
pip23.0.1
platformdirs2.5.2
plotly5.11.0
ply3.11
preshed3.0.8
protobuf4.21.9
psutil5.9.3
pyarrow12.0.1
pyasn10.4.8
pyasn1-modules0.2.8
pycparser2.21
pydantic1.10.2
pyfpgrowth1.0
PyJWT2.7.0
pyparsing3.0.9
pyreadline33.4.1
pyrsistent0.19.1
python-dateutil2.8.2
pytz2022.5
PyWavelets1.4.1
pywin32306
PyYAML6.0
querystring-parser1.2.4
queuelib1.6.2
regex2022.10.31
requests2.28.1
requests-file1.5.1
requests-oauthlib1.3.1
rsa4.9
scikit-learn1.1.3
scipy1.9.3
setuptools67.6.0
sip6.7.3
six1.16.0
smart-open5.2.1
smmap5.0.0
snowballstemmer2.2.0
sortedcollections2.1.0
sortedcontainers2.4.0
spacy3.4.2
spacy-legacy3.0.10
spacy-loggers1.0.3
SQLAlchemy2.0.18
sqlparse0.4.4
srsly2.4.5
statsmodels0.13.2
sympy1.11.1
tabulate0.9.0
tbb2021.7.0
tblib1.7.0
tenacity8.1.0
tensorboard2.12.0
tensorboard-data-server0.7.0
tensorboard-plugin-wit1.8.1
tensorflow2.12.0
tensorflow-estimator2.12.0
tensorflow-intel2.12.0
tensorflow-io-gcs-filesystem0.31.0
termcolor2.2.0
textdistance4.5.0
thinc8.1.5
threadpoolctl3.1.0
three-merge0.1.1
tldextract3.4.0
toml0.10.2
toolz0.12.0
torch2.0.0
torchaudio2.0.1
torchvision0.15.1
tornado6.1
tqdm4.64.1
typer0.4.2
typing_extensions4.4.0
ujson5.5.0
Unidecode1.3.6
urllib31.26.12
waitress2.1.2
wasabi0.10.1
websocket-client1.6.1
Werkzeug2.2.2
wheel0.40.0
wrapt1.14.1
xarray2022.10.0
zict2.2.0
zipp3.15.0

3.6.5 (Legacy)

PackageVersion
adal1.2.0
anaconda_navigator1.8.7
anytree2.8.0
argparse1.1
asn1crypto0.24.0
astor0.7.1
astroid1.6.3
astropy3.0.2
attr18.1.0
babel2.5.3
backcall0.1.0
bitarray0.8.1
bleach2.1.3
bokeh0.12.16
boto2.48.0
boto31.9.109
botocore1.12.109
bottleneck1.2.1
bs44.6.0
certifi2018.04.16
cffi1.11.5
cgi2.6
chardet3.0.4
click6.7
cloudpickle0.5.3
clyent1.2.2
colorama0.3.9
conda4.5.4
conda_build3.10.5
conda_env4.5.4
conda_verify2.0.0
Crypto2.6.1
cryptography2.2.2
csv1
ctypes1.1.0
cycler0.10.0
cython0.28.2
Cython0.28.2
cytoolz0.9.0.1
dask0.17.5
datashape0.5.4
dateutil2.7.3
decimal1.7
decorator4.3.0
dill0.2.8.2
distributed1.21.8
distutils3.6.5
docutils0.14
entrypoints0.2.3
et_xmlfile1.0.1
fastcache1.0.2
filelock3.0.4
flask1.0.2
flask_cors3.0.4
future0.17.1
gensim3.7.1
geohash0.8.5
gevent1.3.0
glob2“(0, 6)”
greenlet0.4.13
h5py2.7.1
html5lib1.0.1
idna2.6
imageio2.3.0
imaplib2.58
ipaddress1
IPython6.4.0
ipython_genutils0.2.0
isort4.3.4
jdcal1.4
jedi0.12.0
jinja22.1
jmespath0.9.4
joblib0.13.0
json2.0.9
jsonschema2.6.0
jupyter_core4.4.0
jupyterlab0.32.1
jwt1.7.1
keras2.2.4
keras_applications1.0.6
keras_preprocessing1.0.5
kiwisolver1.0.1
lazy_object_proxy1.3.1
llvmlite0.23.1
logging0.5.1.2
markdown3.0.1
markupsafe1
matplotlib2.2.2
mccabe0.6.1
menuinst1.4.14
mistune0.8.3
mkl1.1.2
mlxtend0.15.0.0
mpmath1.0.0
msrest0.6.2
msrestazure0.6.0
multipledispatch0.5.0
navigator_updater0.2.1
nbconvert5.3.1
nbformat4.4.0
networkx2.1
nltk3.3
nose1.3.7
notebook5.5.0
numba0.38.0
numexpr2.6.5
numpy1.19.1
numpydoc0.8.0
oauthlib2.1.0
olefile0.45.1
onnxruntime1.4.0
openpyxl2.5.3
OpenSSL18.0.0
optparse1.5.3
packaging17.1
pandas0.24.1
parso0.2.0
past0.17.1
path11.0.1
patsy0.5.0
pep81.7.1
phonenumbers8.10.6
pickleshare0.7.4
PIL5.1.0
pint0.8.1
pip21.3.1
plac0.9.6
platform1.0.8
plotly4.8.2
pluggy0.6.0
ply3.11
prompt_toolkit1.0.15
psutil5.4.5
py1.5.3
pycodestyle2.4.0
pycosat0.6.3
pycparser2.18
pyflakes1.6.0
pyfpgrowth1
pygments2.2.0
pylint1.8.4
pyparsing2.2.0
pytest3.5.1
pytest_arraydiff0.2
pytz2018.4
pywt0.5.2
qtconsole4.3.1
re2.2.1
regex2.4.136
requests2.18.4
requests_oauthlib1.0.0
ruamel_yaml0.15.35
s3transfer0.2.0
sandbox_utils1.2
scipy1.1.0
scrubadub1.2.0
setuptools39.1.0
six1.11.0
sklearn0.20.3
socketserver0.4
socks1.6.7
sortedcollections0.6.1
sortedcontainers1.5.10
spacy2.0.18
sphinx1.7.4
spyder3.2.8
sqlalchemy1.2.7
statsmodels0.9.0
surprise1.0.6
sympy1.1.1
tables3.4.3
tabnanny6
tblib1.3.2
tensorflow1.12.0
terminado0.8.1
testpath0.3.1
textblob0.10.0
tlz0.9.0.1
toolz0.9.0
torch1.0.0
tqdm4.31.1
traitlets4.3.2
ujson1.35
unicodecsv0.14.1
urllib31.22
werkzeug0.14.1
wheel0.31.1
widgetsnbextension3.2.1
win32rcparser0.11
winpty0.5.1
wrapt1.10.11
xgboost0.81
xlsxwriter1.0.4
yaml3.12
zict0.1.3

3 - R plugin (Preview)

Learn how to use the R plugin (Preview) to run a user-defined function using an R script.

The R plugin runs a user-defined function (UDF) using an R script.

The script gets tabular data as its input, and produces tabular output. The plugin’s runtime is hosted in a sandbox on the cluster’s nodes. The sandbox provides an isolated and secure environment.

Syntax

T | evaluate [hint.distribution = (single | per_node)] r(output_schema, script [, script_parameters] [, external_artifacts])

Parameters

NameTypeRequiredDescription
output_schemastring✔️A type literal that defines the output schema of the tabular data, returned by the R code. The format is: typeof(ColumnName: ColumnType[, …]). For example: typeof(col1:string, col2:long). To extend the input schema, use the following syntax: typeof(*, col1:string, col2:long).
scriptstring✔️The valid R script to be executed.
script_parametersdynamicA property bag of name and value pairs to be passed to the R script as the reserved kargs dictionary. For more information, see Reserved R variables.
hint.distributionstringHint for the plugin’s execution to be distributed across multiple cluster nodes. The default value is single. single means that a single instance of the script will run over the entire query data. per_node means that if the query before the R block is distributed, an instance of the script will run on each node over the data that it contains.
external_artifactsdynamicA property bag of name and URL pairs for artifacts that are accessible from cloud storage. They can be made available for the script to use at runtime. URLs referenced in this property bag are required to be included in the cluster’s callout policy and in a publicly available location, or contain the necessary credentials, as explained in storage connection strings. The artifacts are made available for the script to consume from a local temporary directory, .\Temp. The names provided in the property bag are used as the local file names. See Example. For more information, see Install packages for the R plugin.

Reserved R variables

The following variables are reserved for interaction between Kusto Query Language and the R code:

  • df: The input tabular data (the values of T above), as an R DataFrame.
  • kargs: The value of the script_parameters argument, as an R dictionary.
  • result: An R DataFrame created by the R script. The value becomes the tabular data that gets sent to any Kusto query operator that follows the plugin.

Enable the plugin

R sandbox image

Examples

range x from 1 to 360 step 1
| evaluate r(
//
typeof(*, fx:double),               //  Output schema: append a new fx column to original table 
//
'result <- df\n'                    //  The R decorated script
'n <- nrow(df)\n'
'g <- kargs$gain\n'
'f <- kargs$cycles\n'
'result$fx <- g * sin(df$x / n * 2 * pi * f)'
//
, bag_pack('gain', 100, 'cycles', 4)    //  dictionary of parameters
)
| render linechart 

Sine demo.

Performance tips

  • Reduce the plugin’s input dataset to the minimum amount required (columns/rows).

  • Use filters on the source dataset using the Kusto Query Language, when possible.

  • To make a calculation on a subset of the source columns, project only those columns before invoking the plugin.

  • Use hint.distribution = per_node whenever the logic in your script is distributable.

  • You can also use the partition operator for partitioning the input data et.

  • Whenever possible, use the Kusto Query Language to implement the logic of your R script.

    For example:

    .show operations
    | where StartedOn > ago(1d) // Filtering out irrelevant records before invoking the plugin
    | project d_seconds = Duration / 1s // Projecting only a subset of the necessary columns
    | evaluate hint.distribution = per_node r( // Using per_node distribution, as the script's logic allows it
        typeof(*, d2:double),
        'result <- df\n'
        'result$d2 <- df$d_seconds\n' // Negative example: this logic should have been written using Kusto's query language
      )
    | summarize avg = avg(d2)
    

Usage tips

  • To avoid conflicts between Kusto string delimiters and R string delimiters:

    • Use single quote characters (') for Kusto string literals in Kusto queries.
    • Use double quote characters (") for R string literals in R scripts.
  • Use the external data operator to obtain the content of a script that you’ve stored in an external location, such as Azure blob storage or a public GitHub repository.

    For example:

    let script = 
        externaldata(script:string)
        [h'https://kustoscriptsamples.blob.core.windows.net/samples/R/sample_script.r']
        with(format = raw);
    range x from 1 to 360 step 1
    | evaluate r(
        typeof(*, fx:double),
        toscalar(script), 
        bag_pack('gain', 100, 'cycles', 4))
    | render linechart 
    

Install packages for the R plugin

Follow these step by step instructions to install package(s) that aren’t included in the plugin’s base image.

Prerequisites

  1. Create a blob container to host the packages, preferably in the same place as your cluster. For example, https://artifactswestus.blob.core.windows.net/r, assuming your cluster is in West US.

  2. Alter the cluster’s callout policy to allow access to that location.

    • This change requires AllDatabasesAdmin permissions.

    • For example, to enable access to a blob located in https://artifactswestus.blob.core.windows.net/r, run the following command:

    .alter-merge cluster policy callout @'[ { "CalloutType": "sandbox_artifacts", "CalloutUriRegex": "artifactswestus\\.blob\\.core\\.windows\\.net/r/","CanCall": true } ]'
    

Install packages

The example snips below assume local R machine on Windows environment.

  1. Verify you’re using the appropriate R version – current R Sandbox version is 3.4.4:

    > R.Version()["version.string"]
    
    $version.string
    [1] "R version 3.4.4 (2018-03-15)"
    

    If needed you can download it from here.

  2. Launch the x64 RGui

  3. Create a new empty folder to be populated with all the relevant packages you would like to install. In this example we install the brglm2 package, so creating “C:\brglm2”.

  4. Add the newly created folder path to lib paths:

    > .libPaths("C://brglm2")
    
  5. Verify that the new folder is now the first path in .libPaths():

    > .libPaths()
    
    [1] "C:/brglm2"    "C:/Program Files/R/R-3.4.4/library"
    
  6. Once this setup is done, any package that we install shall be added to this new folder. Let’s install the requested package and its dependencies:

    > install.packages("brglm2")
    

    In case the question “Do you want to install from sources the packages which need compilation?” pops up, answer “Y”.

  7. Verify that new folders were added to “C:\brglm2”:

    Screenshot of library directory content.

  8. Select all items in that folder and zip them to e.g. libs.zip (do not zip the parent folder). You should get an archive structure like this:

    libs.zip:

    • brglm2 (folder)
    • enrichwith (folder)
    • numDeriv (folder)
  9. Upload libs.zip to the blob container that was set above

  10. Call the r plugin.

    • Specify the external_artifacts parameter with a property bag of name and reference to the ZIP file (the blob’s URL, including a SAS token).
    • In your inline r code, import zipfile from sandboxutils and call its install() method with the name of the ZIP file.

Example

Install the brglm2 package:

print x=1
| evaluate r(typeof(*, ver:string),
    'library(sandboxutils)\n'
    'zipfile.install("brglm2.zip")\n'
    'library("brglm2")\n'
    'result <- df\n'
    'result$ver <-packageVersion("brglm2")\n'
    ,external_artifacts=bag_pack(brglm2.zip', 'https://artifactswestus.blob.core.windows.net/r/libs.zip?*** REPLACE WITH YOUR SAS TOKEN ***'))
xver
11.8.2

Make sure that the archive’s name (first value in pack pair) has the *.zip suffix to prevent collisions when unzipping folders whose name is identical to the archive name.