Running Python3 and Viewing Results
Running Python in CLI Mode
- Grant the execution permission for the script of python3-examples folder. Run the following command in the CLI:
chmod +x python3-examples -R.
- Enter the service plane IP address of the node where HiveServer is installed in the hosts of python3-examples/pyCLI_nosec.py.
When the multi-instance is enabled: In python3-examples/pyCLI_nosec.py, the hosts must be modified. In addition, the port must be set according to the used instance. The port (hive.server2.thrift.port) is used for Hive to provide the Thrift service.
- Run the following commands to start the Python3 client:
cd python3-examples
python pyCLI_nosec.py
- In the CLI, view the HQL query results in the example codes. For example:
[['default', '']] [{'comment': 'from deserializer', 'columnName': 'tab_name', 'type': 'STRING_TYPE'}] ['xx']
Last Article: Running Python and Viewing Results
Next Article: More Information
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.