You can install third-party Python modules in Dataphin to extend data processing capabilities.
Permissions
Only super administrators and system administrators can install, upgrade, or delete third-party Python packages.
Procedure
-
On the Dataphin home page, choose Management Center > System Settings from the top menu bar.
-
In the navigation pane on the left, choose Third-party Library Management > Python Module.
-
On the Python Third-party Packages page, click the Python Module tab, and then click + Add Python Module on the Python Module tab.
-
In the Install Python Module dialog box, configure the following parameters.
Parameter
Description
Module Name
Enter a name for the Python module. The name can contain only letters, digits, underscores (_), hyphens (-), periods (.), and square brackets ([]).
ImportantThe combination of the module name and Python version must be globally unique. If a module with the same name already exists for the selected Python version, the installation is not supported.
Module Version (Optional)
Enter the module version. The version can contain only letters, digits, underscores (_), hyphens (-), and periods (.).
If specified, that version is installed. If left empty, the latest version is installed by default. If the specified version does not exist, error details are available in the installation log.
Python Version
Select a Python version. Python 3.11, Python 3.7, and Python 2.7 are supported.
Installation Method
Two installation methods are available:
-
Upload installation: Upload a resource file to install the module.
-
Online installation: Download and install the module from a configured traffic mirror source.
Resource Type
When using upload installation, select a resource type. Available types are *.whl and Custom installation package.
-
*.whl resource type: Package the
*.whlfile of the target module and the*.whlfiles of its dependencies into a.zipfile and upload it. The.zipfile cannot exceed 1 GB.ImportantThe wheel package version must be compatible with the Python version. The environment must be Linux (manylinux/none) and the CPU architecture must be x86 64-bit. Run the
pip wheel [module_name]command on an x86 64-bit machine that runs a Linux operating system, such as CentOS, and is connected to the public network to obtain all*.whlfiles. -
Custom installation package: Upload a custom
.zipinstallation package. The.zipfile cannot exceed 1 GB. To create a custom installation package:-
Write the installation steps in the
setup.shorsetup.pyscript file. The Dataphin system directly executes this script file. -
Package the resource files required for the installation together with the
setup.shorsetup.pyfile into a.zippackage. Make sure that thesetup.shorsetup.pyfile is in the root directory of the installation package. Installation environment: CentOS 7, x86 64-bit.
-
-
-
Click OK.