[docs] Small example of Python API to submit a query
@@ -33,6 +33,25 @@ And finally launch the shell by:
> ALERT: HUE_CONF_DIR must be set when running hue commands in CM Managed environment
> ALERT: Please run 'hue <command> --cm-managed'
+
+## Query
+
+Requires a user object:
+
+ from notebook.models import make_notebook, MockRequest
+
+ job = make_notebook(
+ name='List tables in Salesforce database',
+ editor_type='hive',
+ statement='SHOW TABLES',
+ status='ready',
+ database='sfdc',
+ on_success_url='assist.db.refresh'
+ )
+
+ request = MockRequest(user=user)
+ job.execute_and_wait(request)
+
## Storage
### S3
