Python Shell for debugging
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:
corridor-api shell
The follow components support this command: corridor-api, corridor-app, corridor-worker.
Note
The shell is only available for quick debugging. Many of the debugging commands used here are internal, and not stable. The commands could change across versions without warning. To get more information about your installation, the corridor team may request certain commands to be run.
Examples
To create a spark session in the shell:
$ 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:
$ corridor-api shell
>>> import sklearn
>>> sklearn.__version__
'0.24.2'