The SQL Module
The SQL module provides access to SQL databases connected to Ingenuity.
What This Module Does
Section titled “What This Module Does”- Executes raw SQL queries
- Lists available databases
- Lists tables within a database
Key Entry Point
Section titled “Key Entry Point”Use get_sql() to create a client:
from eigeningenuity import get_sql, EigenServer
ei = EigenServer("https://demo.eigen.co/")sql = get_sql(ei)Common Operations
Section titled “Common Operations”Execute a Query
Section titled “Execute a Query”query = "SELECT * FROM VT_TAGBARRIER WHERE ROWNUM <= 10"results = sql.executeRawQuery("EXECUTE", "aveva-db", query)List Databases and Tables
Section titled “List Databases and Tables”dbs = sql.listDatabases()tables = sql.listTables("aveva-db")Output Formats
Section titled “Output Formats”Most calls support:
json(default)df(pandas DataFrame)raw(full API response)file(write JSON to disk)
Authentication
Section titled “Authentication”For secured environments, configure Azure auth before creating the client. See Authentication.