You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/03/30 10:18:25 UTC

[GitHub] [incubator-doris] worker24h commented on issue #3124: Load json data into Doris by json-path

worker24h commented on issue #3124: Load json data into Doris by json-path
URL: https://github.com/apache/incubator-doris/issues/3124#issuecomment-605913770
 
 
   I has completed this function. 
   PR:  ```https://github.com/apache/incubator-doris/pull/3230```
   
   For example:
   ```
   CREATE TABLE `test_json_price`(
     `category` varchar(32),
     `author` varchar(32),
     `title` varchar(32),
     `price` double  SUM
   
   ) ENGINE=OLAP
   AGGREGATE KEY(category, author, title)
   DISTRIBUTED BY HASH(category, author, title) BUCKETS 32
   PROPERTIES ("storage_type"="column","replication_num" = "1");
   
   
   CREATE ROUTINE LOAD mediavad.test_json_price_label001 ON test_json_price
   COLUMNS(category, author, title, price)
   PROPERTIES
   (
       "desired_concurrent_number"="3",
       "max_batch_interval" = "20",
       "max_batch_rows" = "300000",
       "max_batch_size" = "209715200",
       "strict_mode" = "false",
       "format" = "json",
       "jsonpath" = "{\"jsonpath\":[{\"column\":\"category\",\"value\":\"$.store.book.category\"},{\"column\":\"author\",\"value\":\"$.store.book.author\"},{\"column\":\"title\",\"value\":\"$.store.book.title\"},{\"column\":\"price\",\"value\":\"$.store.book.price\"}]}"
   )
   FROM KAFKA
   (
       "kafka_broker_list" = "192.168.125.110:9092,192.168.125.120:9092,192.168.125.130:9092",
       "kafka_topic" = "KafkaLoadJsonForDoris",
       "kafka_partitions" = "0,1,2",
       "kafka_offsets" = "0,0,0"
   );
   ```
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org