Hello everyone,
I’m currently trying to implement a custom policy check in Liquibase using a Python script. In my code, I need to calculate the number of rows in a table. If I use a constant value for this variable, the code works correctly, but I am unable to retrieve this value directly from the database.
I understand that I need to perform a query within the script to get the value, but this is where I’m encountering issues. I have tried using the subprocess library with the “execute-sql” command from Liquibase without success.
I would appreciate any guidance or suggestions on how to achieve this. Is there a recommended way to perform database queries within a custom policy check script in Liquibase that I might be missing?
Thank you in advance for your help.