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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to