You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/11/22 17:26:24 UTC

[GitHub] [hudi] kazdy commented on issue #7274: [SUPPORT] How to create a hudi table without suffix in snapshot read mode using SparkSQL

kazdy commented on issue #7274:
URL: https://github.com/apache/hudi/issues/7274#issuecomment-1324016597

   Hi, 
   
   Table (base one without suffix)  must exist before _ro or _rt table is created with sql DDL.
   
   This works if I create first table without suffix and not use `hoodie.query.as.ro.table` and once that's done I can create _ro and _rt tables:
   
   ```
   // create base table
   create table hudi_mor_tst (
     uuid int,
     name string,
     price double,
     ts int
   ) using hudi
   location '/tmp/default/hudi_mor_tst'
   tblproperties (primaryKey = 'uuid', type = 'mor', preCombineField = 'ts')
   
   // create _ro table
   create table hudi_mor_tst_ro (
     uuid int,
     name string,
     price double,
     ts int
   ) using hudi
   location '/tmp/default/hudi_mor_tst'
   tblproperties (primaryKey = 'uuid', type = 'mor', preCombineField = 'ts', 'hoodie.query.as.ro.table' = 'true');
   
   // create _rt table
   create table hudi_mor_tst_rt (
     uuid int,
     name string,
     price double,
     ts int
   ) using hudi
   location '/tmp/default/hudi_mor_tst'
   tblproperties (primaryKey = 'uuid', type = 'mor', preCombineField = 'ts', 'hoodie.query.as.ro.table' = 'false');
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org