Source Connector ์ค๋ฅ
์ฃผ์ ๋ก๊ทธ ํ๋จ์ ๋ณด์๋ฉด ๋ค์๊ณผ ๊ฐ์ด ๋์จ ๋ถ๋ถ์ ๋ณผ ์ ์์ต๋๋ค. config to include exactly one table in each of the tables listed below. [["mydb"."users", "performance_schema"."users"]] at io.confluent.connect.jdbc.source.TableMonitorThread.tables(TableMonitorThread.java:152) ... 14 more์ฆ users ํ
์ด๋ธ์ ๋ช
์์ ์ผ๋ก ์ ์ด๋ผ ๋ผ๋ ๋ด์ฉ์
๋๋ค. ์ด ๋ง์ ์ด๋ฏธ DBMS ์์ users ๋ผ๋ ํ
์ด๋ธ์ด ์ด๋ฏธ ์กด์ฌํ๊ธฐ ๋๋ฌธ์
๋๋ค.https://docs.actian.com/psql/psqlv13/index.html#page/sqlref%2Fsqlkword.htm%23ww78995์ ๋ฌธ์๋ ๊ด๊ณํ DBMS ์ ์กด์ฌํ๋ ์์ฝ์ด๋ค์ ๋์ดํด๋ ์ฌ์ดํธ์ธ๋ฐ, ๋ณด์๋ฉด USERS ๋ ์ด๋ฏธ ์ฌ์ฉ์ค์ธ ์์ฝ์ด์์ ์ ์ ์์ต๋๋ค.๊ทธ๋์ ๋ณดํต USERS ๋ผ๋ ํ
์ด๋ธ ๋ช
๋์ ์ ๋ค๋ฅธ ์์ฝ์ด๋ฅผ ์ฐ๊ธฐ๋ ํ๊ณ ์. ์๋ฌ๋ก๊ทธ์์ ๋ณด๋ฉด [["mydb"."users", "performance_schema"."users"]]performance_schema ๋ผ๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค์ users ๋ผ๋ ํ
์ด๋ธ์ด ์กด์ฌํจ์ ํ์ธํ ์ ์์ต๋๋ค. ๋ฐ๋ผ์ ๋ค๋ฅธ ๋ถ์ด ๋ง์ํด์ฃผ์ ๊ฒ์ฒ๋ผ mydb.users ๋ผ๊ณ ๋ช
์์ ์ผ๋ก mydb ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์กด์ฌํ๋ users ๋ฅผ ๋ช
์ํ๊ธฐ์ด๋ฏธ ๊ฐ์๋๋ก ๋ฐ๋ผํ์
จ๋ค๋ฉด PUT http://localhost:8083/connectors/my-source-connect/config ์ url๊ณผ ์๋์ ๋ด์ฉ์ body ๋ก ๋จ๋์
์ ๋ณด๋ด์๋ฉด ์ค์ ์์ ๋ฉ๋๋ค! { "connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector", "connection.url": "jdbc:mariadb://localhost:3306/mydb", ์ด ๋ถ๋ถ๋ ์ง๊ธ ๋ฒ์ ์์๋ mariadb ๋ผ๊ณ ํด์ผ ์ธ์ํ๋๋ผ๊ตฌ์ ใ
"connection.user": "root", "connection.password": "test1357", "mode": "incrementing", "incrementing.column.name": "id", "table.whitelist": "mydb.users", "topic.prefix": "my_topic_", "tasks.max": "1" }mydb ์์ users ๋ผ๋ ํ
์ด๋ธ ์ด๋ฆ์ ์์ ํ๊ธฐ๋ฐ์ ๋ถ์ users1 ๋ก ์์ ํ์
์ ํด๊ฒฐํ์
จ์ต๋๋ค :)๋ ์ค ์๋ฌด๊ฑฐ๋ ์ ํํ์
๋ ๊ฐ์ ์งํํ๋ ๋ฐ๋ ๋ฌด๋ฆฌ์์ผ์ค๊ฑฐ์์!์ ์ฒ๋ผ ๊ณ ํต๋ฐ์ง ๋ง์๊ธธ ใ