Remote Session (Python)
The Kaskada Python Client and IPython magic extension Fenlmagic are configurable to connect to a local and remote session. The majority of the examples are focused on running Kaskada locally but the clients are configurable to communicate to a remote service.
Requirements
-
Kaskada Manager endpoint - An accessible endpoint from the current machine to the Kaskada Manager service. An endpoint consists of the hostname and the port of the service.
-
Secure connection (optional) - It is highly recommended that the connection be secured by TLS but connection between the service and client can be optionally insecure.
Setup
# Kaskada Endpoint
endpoint = "kaskada.io:50051"
# Secure connection
is_secure = True
The above example uses an example endpoint and is not a valid remote session. The endpoint will need to be configured to be accessible by the current machine. |
Configure the remote session using a RemoteBuilder. The remote session does not configure automated session recovery and health checks are disabled by default. After configuring the remote session, all existing functionality e.g. table CRUD and queries will operate like normal.
from kaskada.api.remote_session import RemoteBuilder
session = RemoteBuilder(endpoint, is_secure).build()
Under the hood, the Python Client uses the Certifi Pypi library for validating the trustworthiness of SSL certificates while verifying the identity of TLS hosts. Certifi does not support any addition/removal or other modification of the CA trust store content. This project is intended to provide a reliable and highly portable root of trust to python deployments. Look to upstream projects for methods to use alternate trust. Please submit a feature request to prioritize the use of custom CA trust store content. |
Use the remote session
The remote session configures a local client to communicate with a remote service. All functionality between local and remote clients are the same. After configuring the remote session, simply run the same commands/Python code as expected.
from kaskada import table
table.list_tables()