Multiple PreProcessor Scripts


I've written my first PreProcessor script (that brings back the EOMonth() function we use heavily in Sql Server) and is fully tested and working well.


Question is, how does one have multiple PreProcessor scripts enabled?

I can see how to do one with:

Alter System Set SQL_PREPROCESSOR_SCRIPT = myscript;

 But what if one has more than one script?


Team Exasol
Team Exasol

Hi Rachel,

as @mwellbro points out correctly you can't use multiple preprocessor scripts in parallel. However you can use them sequentially. This means that each transformation you apply to your SQL must not be broken by the next transformation - which might become tricky.

As pointed out using a script as "entry point" is best practise. Have a loo at our exa-toolbox on GitHub. We developed some preprocessing scripts for a customer for a Teradata to Exasol migration. As you can see here the solution consists of two files:  teradata_preprocessor_wrapper.sql and transformations.sql. The first uses the latter to perform transformations on the SQL the session receives.

I hope this gives you a good idea where to start. If you have further questions don't hesitate to post them here 🙂


Hi Rachel,
I don´t think you can use multiple scripts in parallel - I´d assume you´d have to code all required use cases into a single script if you go for "ALTER SYSTEM".
You probably know that you could opt for "ALTER SESSION" and "distribute" tailored scripts to any given session / use case - might help you but could prove a bit of a script-wrangling challenge...
Come to think of it, you could probably use one script as "entry point" with "ALTER SYSTEM" and then call different scripts depending on what you´re after from there....