You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/11/28 07:13:36 UTC

[GitHub] [incubator-druid] himanshushukla254 opened a new issue #8966: Issue while updating the data in Datasource

himanshushukla254 opened a new issue #8966: Issue while updating the data in Datasource
URL: https://github.com/apache/incubator-druid/issues/8966
 
 
   I am currently using the druid-Incubating-0.16.0 version.  As mentioned in [https://druid.apache.org/docs/latest/tutorials/tutorial-update-data.html](https://druid.apache.org/docs/latest/tutorials/tutorial-update-data.html) tutorial link, we can use combining firehose to update and merge the data for a data source.
   
   **Step : 1**
   I am using the same sample data with initial structure as 
   ```
   ┌──────────────────────────┬──────────┬───────┬────────┐
   │ __time                   │ animal   │ count │ number │
   ├──────────────────────────┼──────────┼───────┼────────┤
   │ 2018-01-01T01:01:00.000Z │ tiger    │     1 │    100 │
   │ 2018-01-01T03:01:00.000Z │ aardvark │     1 │     42 │
   │ 2018-01-01T03:01:00.000Z │ giraffe  │     1 │  14124 │
   └──────────────────────────┴──────────┴───────┴────────┘
   
   ```
   Step 2:
   I updated the data for **tiger** with **{"timestamp":"2018-01-01T01:01:35Z","animal":"tiger", "number":30} with appendToExisting = false and rollUp = true** and found the result 
   ```
   ┌──────────────────────────┬──────────┬───────┬────────┐
   │ __time                   │ animal   │ count │ number │
   ├──────────────────────────┼──────────┼───────┼────────┤
   │ 2018-01-01T01:01:00.000Z │ tiger    │     2 │    130 │
   │ 2018-01-01T03:01:00.000Z │ aardvark │     1 │     42 │
   │ 2018-01-01T03:01:00.000Z │ giraffe  │     1 │  14124 │
   └──────────────────────────┴──────────┴───────┴────────┘
   ```
   Step 3:
   Now i am updating **giraffe** with **{"timestamp":"2018-01-01T03:01:35Z","animal":"giraffe", "number":30} with appendToExisting = false and rollUp = true** and getting the following result
   ┌──────────────────────────┬──────────┬───────┬────────┐
   		│ __time                   │ animal   │ count │ number │
   		├──────────────────────────┼──────────┼───────┼────────┤
   		│ 2018-01-01T01:01:00.000Z │ tiger    │     1 │    130 │
   		│ 2018-01-01T03:01:00.000Z │ aardvark │     1 │     42 │
   		│ 2018-01-01T03:01:00.000Z │ giraffe  │     2 │  14154 │
   		└──────────────────────────┴──────────┴───────┴────────┘
   
   My doubt is, **In step 3 the count of tiger is getting decreased by 1 but i think it should not be changed since there are no changes in step 2 for tiger.** 
   
   Please clarify.
   
   

----------------------------------------------------------------
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@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org