alexander_butler
01/29/2023, 12:21 AMaaronsteers
01/29/2023, 1:12 AMaaronsteers
01/29/2023, 1:16 AMinfer_schema there. That's pretty critical and a nice solution to not require manually managed catalog schema.aaronsteers
01/29/2023, 1:36 AMinfer_schema were not available or not enabled) is to allow an option where the top-level property names are deterministic and one or more are just complex/variable in their contents, something like:
• document_id (corresponds to internal _id if one is declared)
• the replication key by name, if one is declared in catalog.json
• record_data - all the fields besides _id
Curious what you think of this, if you think it would be viable for your use cases.alexander_butler
01/29/2023, 1:40 AMaaronsteers
01/29/2023, 4:21 AMSven Balnojan
01/30/2023, 1:30 PMMatt Menzenski
02/01/2023, 5:25 AMalexander_butler
02/01/2023, 8:41 AMMatt Menzenski
02/01/2023, 12:44 PMnum: num + 1 to { $inc: num }, a new column is added in our analytics db and we have to update the logic there. If we were using change streams, there’d be no change.
Not that this is a criticism of your work! It’s great - it just maybe won’t support my use case.alexander_butler
02/01/2023, 3:53 PMMatt Menzenski
02/01/2023, 6:55 PMAs far as I understand it, change streams are akin to an abstraction over oplogs and when you no longer have data in the oplog beyond a certain date, you are also not able to use change streams before that date from my working with them.That’s correct to my understanding as well. More context on my situation: we currently have a Java application that subscribes to mongodb change streams and publishes that data to a Kafka topic, and then it’s written to S3 by a Confluent S3 Sink connector. Then from S3 we’re starting to use meltano to pull it into AWS Redshift. I’m wondering if it’s feasible to have meltano pull data from the change stream and push to redshift - in theory that’d let us remove the Java application, the kafka topic, and s3 in one fell swoop.
you are also not able to use change streams before that date from my working with them.This is my understanding as well, although I’ve been unable to find clear/conclusive documentation that says this. This is something that our current Java service provides an abstraction over: the change streams are configured to return the full document, not just the changed fields. And the java application supports restarting the changestream from arbitrary points (to do a full initial load, for instance) by just returning documents from the collection based on the timestamp in the
_id ObjectId field.
But for your use case you would ideally want _____?ideally for me, I think it’d be “provide change stream data (with the change stream configured to return the full document), unless you are requesting data from a time period where there is no change stream data available, then provide a stream of documents from `.find`”
alexander_butler
02/02/2023, 12:24 AMAnd the java application supports restarting the changestream from arbitrary points (to do a full initial load, for instance) by just returning documents from the collection based on the timestamp in theThis is basically what I imagined we could do in the tap too. I just didn't implement it yet because the complexity vs the benefits for us personally wasn't there. But I am happy to take and collaborate on a PR if you're invested enough because the tap isn't far off from being able to do the same thing. Otherwise you can file an issue and I'll backlog it and tackle it when I have time 🙂 There are some edge cases to think through I think but otherwise it may not be too bad.ObjectId field._id
Matt Menzenski
02/02/2023, 12:34 AMMatt Menzenski
02/02/2023, 12:34 AMalexander_butler
02/02/2023, 9:08 AMRE: This is something that our current Java service provides an abstraction over: the change streams are configured...
RE: ideally for me, I think it’d be “provide change stream data (with the change stream configured to return the full document), unless you are requesting data from a time period where there is no change stream data available, then provide a stream of documents fromI think I can take the lead on a PR and open it up to collaboration after hacking a bit. Also totally open if you fork the repo and take the lead. Either or, will collab in either case..find
alexander_butler
02/02/2023, 9:09 AMalexander_butler
02/13/2023, 4:53 PMraw = leave document as-is with permissive schema for jsonl / blob targets
envelope = wrap document in document key so the target can interpret it as a variant/json column (what you suggested)
infer = schema inference from configurable sample sizeaaronsteers
02/13/2023, 6:59 PMnick_hamlin
03/10/2023, 3:13 PMtap-dynamodb in the works? We’re considering adding that to our implementation, but most of the existing variants appear to have some quirks and don’t look to be particularly actively maintained. If Meltano itself is considering rolling out a new version in the near future that might fill some of those gaps, that’d be super helpful to know - thanks!aaronsteers
03/10/2023, 4:21 PMaaronsteers
03/10/2023, 4:22 PMnick_hamlin
03/10/2023, 4:41 PMnick_hamlin
03/10/2023, 4:41 PMaaronsteers
03/10/2023, 4:46 PMnick_hamlin
03/10/2023, 4:47 PMnick_hamlin
03/10/2023, 4:47 PMschema to the tap yaml file achieve the same thing? That’s what I’ve done so far and (so far) it seems ok?aaronsteers
03/10/2023, 4:49 PMmeltano.yml? Yes, if so. That basically sends your provided info into the catalog as overrides.nick_hamlin
03/10/2023, 4:50 PMmeltano.yml from getting unwieldy, but yes)aaronsteers
03/10/2023, 4:50 PMaaronsteers
03/10/2023, 4:50 PMaaronsteers
03/10/2023, 4:51 PMnick_hamlin
03/10/2023, 4:53 PMINCREMENTAL replication, that would also be awesome 🙂aaronsteers
03/10/2023, 4:54 PMLOG_BASED replication from Singer's implementation. That option uses DynamoDB Streams to implement CDC without data loss if your incremental column is unreliable (which most inevitably are).aaronsteers
03/10/2023, 4:55 PMnick_hamlin
03/10/2023, 4:56 PMaaronsteers
03/10/2023, 5:00 PMabhishek_ajmera
04/17/2023, 5:13 PMnick_hamlin
04/17/2023, 5:19 PMabhishek_ajmera
04/17/2023, 5:21 PMnick_hamlin
04/17/2023, 5:24 PMmeltano.yml for this:
plugins:
extractors:
- name: tap-dynamodb
variant: singer-io
capabilities:
- catalog
- discover
- state
config:
account_id: <REDACTED>
external_id: <REDACTED>
role_name: <REDACTED>
region_name: <REDACTED>
metadata:
my_dynamo_table:
replication-method: FULL_TABLE
schema:
my_dynamo_table:
PK:
type: string
SK:
type: string
field_1:
type: number
field_2:
type: string
field_3:
type: number
select:
- my_dynamo_table.*abhishek_ajmera
04/17/2023, 5:30 PM