-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(iceberg): support iceberg connection #20189
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
002bf5b
support iceberg connection
chenzl25 39365e7
support iceberg connection
chenzl25 f346ed5
fmt
chenzl25 adaf9e1
Merge branch 'main' into dylan/support_iceberg_connection
chenzl25 f219598
fmt
chenzl25 7a0cd5a
increase iceberg sink timeout test
chenzl25 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
support iceberg connection
- Loading branch information
commit 39365e7f792336ab8986fc7cff6b83a05e1faebf
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
statement ok | ||
set streaming_parallelism=4; | ||
|
||
statement ok | ||
CREATE TABLE s1 (i1 int, i2 varchar, i3 varchar); | ||
|
||
statement ok | ||
CREATE CONNECTION CONN WITH ( | ||
type = 'iceberg', | ||
catalog.name = 'demo', | ||
catalog.type = 'storage', | ||
warehouse.path = 's3a://hummock001/iceberg-data', | ||
s3.endpoint = 'http://127.0.0.1:9301', | ||
s3.region = 'us-east-1', | ||
s3.access.key = 'hummockadmin', | ||
s3.secret.key = 'hummockadmin' | ||
); | ||
|
||
statement ok | ||
CREATE SINK sink1 from s1 WITH ( | ||
connector = 'iceberg', | ||
type = 'upsert', | ||
database.name = 'demo_db', | ||
table.name = 'test_connection_table', | ||
connection = conn, | ||
create_table_if_not_exists = 'true', | ||
commit_checkpoint_interval = 1, | ||
primary_key = 'i1,i2', | ||
); | ||
|
||
statement ok | ||
INSERT INTO s1 (i1, i2, i3) values(1,'1','1'),(2,'2','2'),(3,'3','3'),(4,'4','4'),(5,'5','5'); | ||
|
||
statement ok | ||
flush | ||
|
||
statement ok | ||
CREATE SOURCE iceberg_t1_source | ||
WITH ( | ||
connector = 'iceberg', | ||
connection = conn, | ||
database.name = 'demo_db', | ||
table.name = 'test_connection_table', | ||
); | ||
|
||
sleep 2s | ||
|
||
query I | ||
select * from iceberg_t1_source order by i1 limit 5; | ||
---- | ||
1 1 1 | ||
2 2 2 | ||
3 3 3 | ||
4 4 4 | ||
5 5 5 | ||
|
||
statement ok | ||
DROP SINK sink1; | ||
|
||
statement ok | ||
DROP SOURCE iceberg_t1_source; | ||
|
||
statement ok | ||
DROP TABLE s1 cascade; | ||
|
||
statement ok | ||
DROP CONNECTION conn; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
init_sqls = [ | ||
'CREATE SCHEMA IF NOT EXISTS demo_db', | ||
'DROP TABLE IF EXISTS demo_db.test_connection_table', | ||
] | ||
|
||
slt = 'test_case/iceberg_connection.slt' | ||
|
||
drop_sqls = [ | ||
'DROP TABLE IF EXISTS demo_db.test_connection_table', | ||
'DROP SCHEMA IF EXISTS demo_db', | ||
] | ||
iceberg_connection | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There appears to be a stray
iceberg_connection
line at the end of this TOML file that should be removed. This line isn't valid TOML syntax and could interfere with proper file parsing.Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.