It’s still pretty early so I don’t have great things to point you to. Last month I prototyped adding support for using Prometheus as a back end for Flux. You can see that work here: https://github.com/influxdata/platform/compare/pd-from-prometheus?expand=1
However, we’ve since moved Flux to its own repo here: https://github.com/influxdata/flux
Basically, at a minimum you’ll need to implement a new source, reader, and the from function. You’ll also want to update the pushdown logic for the range and filter functions so that at least those get translated to be pushed down whatever database you’re querying.
My guess is that we’ll be refactoring how the sources work so that its easier to add any kind of source. This initial version of the code was only concerned with connecting to InfluxDB. Also, we already know that we’re going to be rewriting the query planner and pushdown logic.
So I’d say it’s early to jump in and add another source unless you’re willing to update it and possibly even help us refactor things so we can hook it up to any source (or provide feedback). It’s a goal of Flux to be able to connect to any data source, but we’re probably at least a few months out from getting to that.