Creating Python Input Data Source
The Python connector allows the retrieval of output data from a Python Pyro (Python Remote Objects) process.
For Python connectivity, Python must be first installed, together with the latest version of Pyro4. In addition, Pyro must be initiated manually or through using the batch file start_Python_connectivity.bat.
If the scripts utilize additional modules such as Numpy & Scipy in the shipped example, these also need to be installed into the existing Python installation.
Steps:
1. In the New Data Source page, select Input > Python in the Connector drop-down list.
2. Enter the following properties:
Property |
Description |
Host |
Python Pyro instance host address. |
Port |
Python Pyro host port. Default is 9090. |
HMAC Key |
Set to password. |
3. Select the Serialization Type: Serpent or Pickle.
· Serpent – simple serialization library based on ast.literal_eval
· Pickle – faster serialization but less secure
Modify the configuration.py file located in ..\Anaconda3\Lib\site-packages\Pyro4 to specify the serialization to be used.
For example, if Pickle is selected, self.SERIALIZER value should be changed to pickle and self.SERIALIZERS_ACCEPTED value should be changed to include pickle:
NOTE |
Prepend 'default:' for the elements falling under default namespace.
|
4. Enter the required Python script to execute on the active Pyro instance.
5. Select the Use Apache Arrow check box to enable fast serialization of data frames.
6. Select whether the parameters should be automatically enclosed in quotes by selecting the Enclose Parameters in Quotes check box.
7. Click . The new data source is added in the Data Sources list.