-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add query capability to Python plugin API #25757
Labels
Comments
pauldix
added a commit
that referenced
this issue
Jan 8, 2025
This ended up being a couple things rolled into one. In order to add a query API to the Python plugin, I had to pull the QueryExecutor trait out of server into a place so that the python crate could use it. This implements the query API, but also fixes up the WAL plugin test CLI a bit. I've added a test in the CLI section so that it shows end-to-end operation of the WAL plugin test API and exercise of the entire Plugin API. Closes #25757
pauldix
added a commit
that referenced
this issue
Jan 8, 2025
This ended up being a couple things rolled into one. In order to add a query API to the Python plugin, I had to pull the QueryExecutor trait out of server into a place so that the python crate could use it. This implements the query API, but also fixes up the WAL plugin test CLI a bit. I've added a test in the CLI section so that it shows end-to-end operation of the WAL plugin test API and exercise of the entire Plugin API. Closes #25757
pauldix
added a commit
that referenced
this issue
Jan 10, 2025
This ended up being a couple things rolled into one. In order to add a query API to the Python plugin, I had to pull the QueryExecutor trait out of server into a place so that the python crate could use it. This implements the query API, but also fixes up the WAL plugin test CLI a bit. I've added a test in the CLI section so that it shows end-to-end operation of the WAL plugin test API and exercise of the entire Plugin API. Closes #25757
pauldix
added a commit
that referenced
this issue
Jan 10, 2025
This ended up being a couple things rolled into one. In order to add a query API to the Python plugin, I had to pull the QueryExecutor trait out of server into a place so that the python crate could use it. This implements the query API, but also fixes up the WAL plugin test CLI a bit. I've added a test in the CLI section so that it shows end-to-end operation of the WAL plugin test API and exercise of the entire Plugin API. Closes #25757
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As part of #25654, #25618, and #25537, plugin authors will need the ability to query the database and get results back for use in their scripts. If should be part of the API pointer that gets handed to the various plugin entry point functions.
For now we can create a function that return rows like the kind yielded to the WAL plugins (see: https://github.com/influxdata/influxdb/blob/main/influxdb3_py_api/src/system_py.rs#L412-L459). Later we'll want to give users an option to return Arrow along with a dataframe API, but this should be enough to make something useful.
The function will by default query the database that a plugin is tied to (via its trigger) or take an optional parameter to specify a different database. They should take an optional PyDict with parameterized query arguments. So we have:
The text was updated successfully, but these errors were encountered: