maropu commented on a change in pull request #28953:
URL: https://github.com/apache/spark/pull/28953#discussion_r451436560
##########
File path: docs/sql-data-sources-jdbc.md
##########
@@ -156,6 +156,20 @@ the following case-insensitive options:
</td>
</tr>
+ <tr>
+ <td><code>preActions</code></td>
+ <td>
+ Custom queries which you want to run before reading data from JDBC or
writing data to JDBC. Only DDL or DML (insert/update/delete) are allowed. It is
called per DataFrame, not per session. You can specify multiple queries
separated by semicolon. When exceptions occur in preActions, the queries in
preActions will be rollbacked.
Review comment:
> ~One more question; is there any usecase `preActions` can handle and
`sessionInitStatement` cannot?~
Ah, I see. `sessionInitStatement` is executed on executor-sides and It seems
`preActions` is proposed to be executed in a driver side. Probably, you'd be
better to describe what's a difference between them in the doc clearly.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]