neil_mcguigan
12/27/2022, 7:31 PMaaronsteers
12/28/2022, 12:56 AMsystemdb
, which expects an OLTP-like database. As a cloud-native massively parallel (MPP) OLAP backend, BigQuery itself does not have basic OLTP-esque capabilities.
A quick google search let me to some helpful points in https://dev.to/stack-labs/brace-yourself-using-bigquery-as-an-operational-backend-3e1i:
• BigQuery is not optimized for writing, but for performing complex queries.
• Single-line inserts are discouraged.
• BigQuery does not enforce keys, foreign keys nor constraints
• BigQuery does not perform well with normalized schema, on the contrary it encourages denormalizationIn theory, this could be possible. If you provide an exact error message, someone might have an idea on how to debug - and if there's a way to add BigQuery as a supported
systemdb
backend, we would accept a PR. Since Meltano uses SQLAlchemy as our OLTP abstraction layer (as you've already found), anything that works with SQLAlchemy could also be implemented in the systemdb
implementation.
If your primary goal is just to track incremental bookmark state for EL loads, and you don't care as much about other systemdb
functions (logs, settings backend, etc.), then you could use our new State Backends feature with Google Cloud Storage or similar.aaronsteers
12/28/2022, 1:02 AMeven though sqlalchemy-bigquery is installedOne follow-up here, if you'd like to keep debugging this, can you confirm that
sqlalchemy-bigquery
is installed in the same virtual env? If Meltano is installed with pipx
, you may need to use the inject
command to make sure the library lands into the same Python venv.neil_mcguigan
12/28/2022, 2:10 AMneil_mcguigan
12/28/2022, 3:51 AMneil_mcguigan
12/28/2022, 3:52 AMaaronsteers
12/30/2022, 9:08 PMgot it connecting to BQ (w pipx inject) but getting an alembic error about enums :SGotcha. Yeah, that is helpful and somewhat expected. Rather than 'provider not available', the next round of compat issues would be on features that BigQuery doesn't implement, or implements differently. We've had internal discussions around moving off of `enum`s, so there's probably a path forward in the future that would get around that issue. I can't say though, if it's worth the investment or if we'd run into more compat issues behind after resolving that one. It's a good discussion though and in the future I'm sure someone will search Slack and find this thread. 🙂