evidence-dev / evidence

Business intelligence as code: build fast, interactive data visualizations in pure SQL and markdown
https://evidence.dev
MIT License
3.84k stars 186 forks source link

Google Cloud Spanner Support #876

Open campfireman opened 1 year ago

campfireman commented 1 year ago

What do you use this database for?

We have a smaller set of data in production, we don't keep a separate data warehouse. Therefore, we perform our analyses directly on our Google Cloud Spanner instance.

Are there any popular and well-maintained clients for this database?

All popular languages have support, npm ist supported as well: https://www.npmjs.com/package/@google-cloud/spanner

Are you interested in contributing this database connector?

I haven't had the time to dig into your code. But I see you already support big query, so I assume there is plumbing I could recycle. I'd by happy to contribute! :)

archiewood commented 1 year ago

How do you currently authenticate with Spanner?

Do you use a service account?

archiewood commented 1 year ago

As another question, in the absence of a current Spanner connector, would you be able to use the BQ connector like this?

https://cloud.google.com/bigquery/docs/federated-queries-intro

https://cloud.google.com/bigquery/docs/cloud-spanner-federated-queries

archiewood commented 5 months ago

Hello - looping back on connector requests

We have recently re-architected Evidence (since this issue was opened), and Evidence is now "pluggable", meaning you can write your own connectors, publish them, and use them in Evidence.

If you are interesting in writing a connector, here are some resources:

  1. Docs on creating a plugin: https://docs.evidence.dev/plugins/creating-a-plugin/datasources
  2. Template for a connector plugin: https://github.com/evidence-dev/datasource-template
  3. An example that I spun up for pulling stats from the npm API: https://github.com/archiewood/npm-stats

If you do write a plugin: