Skip to content
Corridor V1.26.08 is out, see what's new

Technology

Python Shell for Debugging

Ask AI

How to open the corridor-api application-context Python shell for debugging and interacting with platform objects.

Python shell with corridor-api application context is useful to interact with the objects created on the platform, without using SQL. The shell can be opened by running the command:

Terminal window
corridor-api shell

The follow components support this command: corridor-api, corridor-app, corridor-worker.

To create a spark session in the shell:

Terminal window
$ corridor-api shell
>>> import pyspark
>>> spark = pyspark.sql.SparkSession.builder.getOrCreate()
>>> spark
<pyspark.sql.session.SparkSession object at 0x7f9dbd1cb1f0>

To check the version of scikit-learn library:

Terminal window
$ corridor-api shell
>>> import sklearn
>>> sklearn.__version__
'0.24.2'