Datastream for BigQuery Preview
cloud.google.com
cloud.google.com
[1]: https://techcrunch.com/2019/02/19/google-acquires-cloud-migr...
I highly recommend teams not rolling out their own solutions because of all these edge cases. My boss refused to pay a vendor solution because it was a 'easy problem' according to him. Denied whole team promotion because we spent lot of time solving 'easy problem' , outright asked us 'whats so hard about it that it deserves promotion' . Worst person i've ever worked for.
- Data type mismatches between systems
- Differences in handling ambiguous or bad data (e.g., null characters)
- Handling backfills
- Handling table schema changes
- Writing merge queries to handle deletes/updates in a cost-effective way
- Scrubbing the binlog of PII or other information that shouldn't make its way into the data warehouse
- Determining which tables to replicate, and which to leave behind
- Ability to replay the log from a point-in-time in case of an outage or other incident
And I'm sure there are a lot more I'm not thinking of. None of these are terribly difficult in isolation, but there's a long tail of issues like these that need to be solved.
Keeping track of updates without a dedicated column.
Ditto for deletes.
Schema drift.
Managing datatype differences. I.e., Postgres supports complex datatypes that other DBs do not.
Stored procedures.
Basically any features of a DB that are beyond the bare minimum necessary to call something a relation database is an edge case.
I rolled a solution for Postgres -> BQ by hand and it was much more involved than I expected. I had to set up a read-only replica and completely copying over the databases each run, which is only possible because they are so tiny.
And if your instance is on a private IP, you can’t use GCP’s CLI to query it, either.
The workaround ? We spun up a “bastion” GCE instance to run PSQL queries from.
So seeing this to potentially replace the kafka connect bigquery connector looked appealing. However, according to the docs and listed limitations (https://cloud.google.com/datastream/docs/sources-postgresql) it does not handle schema changes well nor postgres array types. Not that any of these tools handle this well, but given the open source bigquery connector, we've been able to work around this with customizations to the code. Hopefully they'll continue to iterate on the product and I'll be keeping an eye out.
(case when string then varchar(4000/max))
and similar. It looks like a relatively easy thing to incrementally improve.
A couple things that do pop to mind as it relates to debezium include better capabilities around backup + restores and disaster recovery, and any further hints around schema changes. Admittedly I haven't looked at these areas for 6+ months so they may be improved.
Can anyone suggest why they might have chosen null and not a wkt/text cast?
Edit. Link to announcement: https://techcrunch.com/2022/09/15/salesforce-snowflake-partn...
I use AWS DMS to replica data from RDS => Redshift and it's a never-ending source of pain.
I am building an e-commerce product on AWS PostgresSQL. Everyday, I want to be able to do analytics on order volume, new customers, etc. - For us to track internally: we fire client and backend events into Amplitude - For sellers to track: we directly query PostgressQL to export
Now with this, I am thinking of constantly streaming our SQL table to BigQuery. And any analysis can be done on top of this BigQuery instance across both internal tracking and external export.
Is RedShift the AWS equivalent of this?
That said the closest thing is Amazon Athena.
The architecture would basically be Kinesis -> S3 <- Athena where S3 is your data lake or you can do it like AWS DMS -> S3 <- Athena.
To accomplish this or the redshift solution you need to implement change data capture from your relational DB, for that you can sue AWS Database Migration Service like this for redshift: https://aws.amazon.com/blogs/apn/change-data-capture-from-on...
Like this for kinesis: https://aws.amazon.com/blogs/big-data/stream-change-data-to-...
The reason you may want to use Kinesis is because you can use Flink in Kinesis Data Analytics just like you can use DataFlow in GCP to aggregate some metrics before dumping them into your data lake/warehouse.
Is it microsecond, millisecond, seconds, minutes, hours ... ?
Basically you could use BigQuery to build tools supporting human-in-the-loop processes (BI reports, exec dashboards), and you could call those "real-time" to the humans involved. But it will not support transactional workloads, and it does not provide SLAs to support that. I don't know about this particular feature, I'm guessing seconds but maybe minutes.
> When using the default stream settings, the latency from reading the data in the source to streaming it into the destination is between 10 and 120 seconds.
I'd be curious to know how it handles the wrinkles Fivetran effectively solves (schema drift, logging, general performance) and if it does so at a much cheaper price.
- Startup that's running analytics off their production Postgres DB can use this as a gateway drug to try out BigQuery. Bonus for not having to ETL the data themselves or pay FiveTran / host Airbyte to do it
- Replace existing internally maintained sync job / ETL pipelines with this, if you're somewhat all-in on BigQuery / GCP for analytics (BQ is quite popular in analytics because of the pricing structure)