Influxdb_v2 Output to different buckets doesn't work

I would use namepass for the metric filtering:

https://docs.influxdata.com/telegraf/v1/configuration/

Here is a simple example:

Telegraf...specify influxdb database per mqtt input? - #2 by Franky1