I was able to find a solution, I write it here if it helps anybody: you need to peform a query in the external database connector module:
ALTER USER <Your account name> SET JDBC_QUERY_RESULT_FORMAT = 'JSON'
By doing this once locally you fix the issue