我正在使用pgbouncer-rr在一个红移集群中进行查询重写(pgbouncer调用rewrite_query.py进行重写,这里是关于这个项目-https://github.com/awslabsPgbouncer-rr是基于pgbouncer的,它的代码被合并到pgbouncer中并启动。我已经成功地使用它重写了查询,但是当我试图将insert语句转换为unload to external table时,我遇到了一个问题。Redshi
通过查看ViewSet源代码,我应该可以在视图集中不定义查询集,然后重写get查询集函数,以得到我想要的任何查询集。但是我的代码在以下错误中失败:
AssertionError: `base_name` argument not specified, and could not automatically determine因此,即使我覆盖queryset属性,我仍然需要在开始时将其设置为一些假属性.这是可行的,但是定义queryset,然后在一秒钟后重写它,感觉很奇怪。