deephaven_enterprise.controller_import¶
This module provides a way for workers on a cluster to import scripts from the Persistent Query Controller. The controller provides a centralized script repository that can also be configured to automatically pull from git. This mechanism allows users to modularize the query scripts and distribute them to workers in a cluster without having to manually copy them.
- meta_import(root='controller')[source]¶
Sets up a meta importer to enable using a Python import statement that references paths from the Persistent Query Controller.
For example, after calling ‘meta_import(“controller”)’; you can then call ‘import controller.package1.module1’ to make the “package1/module1.py” from the controller available as a Python module.
Note: implicitly populated global objects like ‘db’, ‘performance_overview’, etc., in the main module are not automatically available in the imported module. You must explicitly import them or pass them as arguments to functions in the module. To import them, you can use the following:
from deephaven_enterprise.database import db
from deephaven_enterprise.performance_overview import performance_overview