-
Notifications
You must be signed in to change notification settings - Fork 72
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
Request: Data-Modifying CTEs #60
Comments
MS SQL OUTPUT Clause is an équivalent of RETURNING postgresql clause. I agree with you, this kind of clause (RETURNING or OUTPUT) can be usefull |
Both the The queries below are part of our test suite, and Hyper is able to execute them succesfully: Can you please provide a complete, self-contained repro of your issue?
|
@vogelsgesang , can you specify which version of the API you confirmed this with? I'm also specifically creating endpoint requests via Python so I'm leveraging the connection.execute_query method. Does your test do the same? |
I verified this using the latest internal HyperAPI-build, but the test case in question was unmodified for a couple of years already, so the HyperAPI version doesn't matter. I am using |
Request:
I'd like to request the connection.execute_query function permit CTEs (Common Table Expressions) with DML operations as noted in below examples on Postgre's main webpage (see section 7.8.2. Data-Modifying Statements in WITH)
https://www.postgresql.org/docs/13/queries-with.html#QUERIES-WITH-MODIFYING
Purpose:
We'd like to have the ability to persist the original records before they're updated or deleted within the same query using the RETURNING clause. This seems to also be allowed in existing Tableau Hyper API document (https://help.tableau.com/current/api/hyper_api/en-us/reference/sql/sql-delete.html); trying this today (tableauhyperapi 0.0.14265) throws an exception
tableauhyperapi.hyperexception.HyperException: syntax error: got "delete", expected "explain", "select", "table", "values", "with", "with ", '(:'
Alternative (in case of technical limitation):
First call the connection.execute_query function that returns the rows that will be updated or deleted and persist them in a Results object (dataframe), then call the connection.execute_command function that performs the update or delete operation (using same filter from step one above).
The text was updated successfully, but these errors were encountered: