Skip to content

Instantly share code, notes, and snippets.

@nsivabalan
Created August 5, 2021 20:32
Show Gist options
  • Save nsivabalan/a264d701a25c5a45b33c546a38f06737 to your computer and use it in GitHub Desktop.
Save nsivabalan/a264d701a25c5a45b33c546a38f06737 to your computer and use it in GitHub Desktop.
create table hudi_test2 (id int, name string, price double, ts long) using hudi options(precombineField = 'ts') partitioned by (name) location 'file:///tmp/hudi_testing/hudi_test2';
insert into hudi_test2 values(1, 100.0, 100000010, "abc");
insert into hudi_test2 values(1, 200.0, 200000010, "abc");
insert into hudi_test2 values(1, 300.0, 300000010, "abc");
insert into hudi_test2 values(1, 100.0, 100000010, "def");
insert into hudi_test2 values(1, 200.0, 200000010, "def");
insert into hudi_test2 values(1, 300.0, 300000010, "def");
select * from hudi_test2 limit 2;
20210805163030 20210805163030_0_19 0c025df2-8c95-43a2-8e8e-cb301005c42e name=abc 5ba65147-c5e8-4470-9492-b0b181b638a2-0_0-380-13890_20210805163030.parquet 1 100.100000010 abc
20210805163032 20210805163032_0_20 2b843053-6c44-43d7-89b8-63b90be3df06 name=abc 5ba65147-c5e8-4470-9492-b0b181b638a2-0_0-392-13901_20210805163032.parquet 1 200.200000010 abc
// ls of hudi table path
ls /tmp/hudi_testing/hudi_test2/
name=abc name=def
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment