Skip to content

Instantly share code, notes, and snippets.

@nfarah86
Created July 20, 2023 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nfarah86/4248e689536806315b61d38defba7815 to your computer and use it in GitHub Desktop.
Save nfarah86/4248e689536806315b61d38defba7815 to your computer and use it in GitHub Desktop.
-- CREATE TABLE statement
CREATE TABLE demo (
id int,
name string,
ts timestamp
)
USING hudi
OPTIONS (
primaryKey = "id",
preCombineField = "ts",
hoodie.precommit.validators = "org.apache.hudi.client.validator.SqlQuerySingleResultPreCommitValidator",
hoodie.precommit.validators.single.value.sql.queries = "SELECT COUNT(*) FROM <TABLE_NAME> WHERE name IS NULL#0"
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment