A way to test would be to enter the container, edit /var/www/discourse/plugins/discourse-data-explorer/plugin.rb and change QUERY_RESULT_MAX_LIMIT = 10000, do a sv restart unicorn and see what happens. Of course there are reasons not to allow such huge queries; if you’re confident of your infrastructure being able to handle it, or don’t mind a bit of instability, this could work.
If the world doesn’t explode, then you could add some stuff to app.yml that would modify that file after the plugins get cloned at every rebuild. It would probably conflict with upgrading with docker_manager. (You can look at some other templates the modify files to figure out what some stuff might be.)
@DonH if you need that query a lot and it’s just one then you might want a plugin that would deliver it somehow. It could, say, write a file in chunks that you could retrieve via some path.