Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

how to Hazelcast jet JDBC continues source get data when new record insert or existing record updated in a database table? #170

Open
nuriozalp opened this issue Feb 1, 2019 · 5 comments
Labels

Comments

@nuriozalp
Copy link

please urgent help,about how to Hazelcast jet JDBC continues source get data when new record insert or existing record updated in a database table?

@viliam-durina
Copy link
Contributor

These are batch sources, they read records in the table and quit. Read operations in SQL databases typically read one consistent snapshot of the table.

@nuriozalp
Copy link
Author

nuriozalp commented Feb 1, 2019 via email

@viliam-durina
Copy link
Contributor

JDBC doesn't provide a standardized way for listeners. There are many possible workarounds, such as using triggers, polling, db-specific ways. Therefore it's not easy to provide one-size-fits-all out-of-the-box solution. You can use SourceBuilder or, if you need feature that's not covered by it, implement a Processor directly.

Also, Jet absolutely is very close to real-time inside. But it also supports batch processing, which is the case for the bundled JDBC connector.

@nuriozalp
Copy link
Author

yes but there are a few most common database and each of them can be seperated by db name. and in framework can decide whiich one should it to use. i wanna know how can i write any task in pipeline and acording to my windows sliding i will ger my source sql query (new record and only updated record between specific time.) i want to use same structure of jet pipeline and source and join and sink structure but somehow i need to trigger this job with new input arguments? can show help for it ? maybe some code sample?

@cangencer
Copy link
Contributor

cangencer commented Feb 13, 2019

@nuriozalp you could use a custom source / SourceBuilder to achieve this. A code sample which polls a HTTP endpoint is available here: https://github.com/hazelcast/hazelcast-jet-code-samples/tree/0.7-maintenance/source-builder

Instead of the HTTP endpoint you would be polling your SQL database.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants