Created
May 14, 2024 06:42
-
-
Save ad1happy2go/c3fc69d3f6716998820362c23e2aa372 to your computer and use it in GitHub Desktop.
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
DROP TABLE issue_11212; | |
set hoodie.spark.sql.insert.into.operation=bulk_insert; | |
CREATE TABLE issue_11212 ( | |
ts BIGINT, | |
uuid STRING, | |
rider STRING, | |
driver STRING, | |
fare DOUBLE, | |
city STRING | |
) USING HUDI | |
OPTIONS( | |
'hoodie.datasource.write.recordkey.field'='uuid', | |
'hoodie.datasource.write.precombine.field'='ts', | |
'hoodie.datasource.write.operation'='bulk_insert' | |
); | |
INSERT INTO issue_11212 | |
VALUES | |
(1695159649087,'334e26e9-8355-45cc-97c6-c31daf0df330','rider-A','driver-K',19.10,'san_francisco'); | |
INSERT INTO issue_11212 | |
VALUES | |
(1695159649087,'334e26e9-8355-45cc-97c6-c31daf0df330','rider-C','driver-L',19.10,'san_francisco'); | |
select * from issue_11212 where uuid = '334e26e9-8355-45cc-97c6-c31daf0df330'; | |
SELECT * FROM issue_11212 WHERE uuid = '334e26e9-8355-45cc-97c6-c31daf0df330' and _hoodie_commit_seqno = '20240514121123361_0_10'; | |
DELETE FROM issue_11212 WHERE uuid = '334e26e9-8355-45cc-97c6-c31daf0df330' and _hoodie_commit_seqno = '20240514121123361_0_10' | |
select * from issue_11212 where uuid = '334e26e9-8355-45cc-97c6-c31daf0df330'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment