python-3.6-data-science-EXASOL-6.2.0 and UDFs

kaanmutlu
Padawan

Hi All,

To use in my own UDFs I have added additional python3 packages to BucketFS and have been able to proceed to this stage:

kaanmutlu_0-1629905717956.png

Then I ran this command to make my changes take effect

ALTER SYSTEM SET SCRIPT_LANGUAGES='PYTHON3=localzmq+protobuf:///bucketfs1/datascience/python-3.6-data-science-EXASOL-6.2.0_release?lang=python#buckets/bucketfs1/datascience/python-3.6-data-science-EXASOL-6.2.0_release/exaudf/exaudfclient_py3';

My question is that am I on the right track?
Does the bucket look right?
Even if so, how can I be sure that I can use the provided packages within "python-3.6-data-science-EXASOL-6.2.0" on Exasol?

It would be great if you could share if you have a complete guide or example for using additional python packages in UDFs Because even though I tried to continue by following the steps in this article, I found it a bit complicated 😅

Thanks, in advance

 

1 ACCEPTED SOLUTION

exa-Aleksandr
Team Exasol
Team Exasol

Hi @kaanmutlu .

Apart from the community article you refer to, we also have:

What could be directly applicable for you:

  • Testing new container via ALTER SESSION might be safer then through ALTER SYSTEM because you affect only one session.
  • If you use new alias for language pointing to your recently uploaded container (say, MY_PYTHON3), you'll be able to use both standard pre-shipped container via PYTHON3 and your own via MY_PYTHON3
  • Simple ALTER SYSTEM SET SCRIPT_LANGUAGES='PYTHON3=SOMETHING' could, probably, hide everything accept your one new language-container binding. So it might worth adding alias:
ALTER SESSION SET SCRIPT_LANGUAGES='PYTHON=builtin_python R=builtin_r JAVA=builtin_java PYTHON3=builtin_python3 MY_PYTHON3=localzmq+protobuf:///bucketfs1/datascience/python-3.6-data-science-EXASOL-6.2.0_release?lang=python#buckets/bucketfs1/datascience/python-3.6-data-science-EXASOL-6.2.0_release/exaudf/exaudfclient_py3';
  •  As a next step you can pull the list of installed packages by means of GET_AVAILABLE_PYTHON_MODULES UDF from the initial community article for both pre-installed language alias (PYTHON3) and your newly added (MY_PYTHON3) to make sure the desired packages now is available.

View solution in original post

2 REPLIES 2

kaanmutlu
Padawan

Hi Aleksandr,

"Script-Language Container Tutorial" did the job for me, thank you so much

exa-Aleksandr
Team Exasol
Team Exasol

Hi @kaanmutlu .

Apart from the community article you refer to, we also have:

What could be directly applicable for you:

  • Testing new container via ALTER SESSION might be safer then through ALTER SYSTEM because you affect only one session.
  • If you use new alias for language pointing to your recently uploaded container (say, MY_PYTHON3), you'll be able to use both standard pre-shipped container via PYTHON3 and your own via MY_PYTHON3
  • Simple ALTER SYSTEM SET SCRIPT_LANGUAGES='PYTHON3=SOMETHING' could, probably, hide everything accept your one new language-container binding. So it might worth adding alias:
ALTER SESSION SET SCRIPT_LANGUAGES='PYTHON=builtin_python R=builtin_r JAVA=builtin_java PYTHON3=builtin_python3 MY_PYTHON3=localzmq+protobuf:///bucketfs1/datascience/python-3.6-data-science-EXASOL-6.2.0_release?lang=python#buckets/bucketfs1/datascience/python-3.6-data-science-EXASOL-6.2.0_release/exaudf/exaudfclient_py3';
  •  As a next step you can pull the list of installed packages by means of GET_AVAILABLE_PYTHON_MODULES UDF from the initial community article for both pre-installed language alias (PYTHON3) and your newly added (MY_PYTHON3) to make sure the desired packages now is available.

View solution in original post