Liquibase execute-sql --sql-file no generate output in sentence "select" multiline

when execute liquibase from file sql in multiline, dont be able to get the output

Command executed: liquibase execute-sql --sql-file=scripts/scripts.sql --output-file=validation-results.csv

cat scripts/scripts.sql SELECT * FROM table WHERE rownum < 100 ;

obtained output: cat validation-results.csv Successfully Executed:
WHERE rownum < 100;

expected output: output from query executed

it’s work it only if the sentence sql is setting in a single multiline, example:
SELECT * FROM table WHERE rownum < 100;

In this case, I be able to get all data consulted

As far as I’m aware, Liquibase will not write output from select statements into the Liquibase output.

If you are using Liquibase Pro you can look into the “runWith” option, which allows you to use a native executor for your database (psql, sqlplus, etc), and then you can spool output to a file.

Thank you for you response, in my case I use the community version. Currenly liquibase it generates output to file or to screen if I do not define the --output-file parameter with select statements. The only problem is that it does it only when the statement is written on a single line. When it is written in multilines the output does not show results, only the executed statement

Interesting, I wasn’t aware of that. I’ll have to do some testing.