Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How add new column in to existing druid schema?

Tags:

druid

I create a schema and i add 1TB data to druid schema. then the log file version was upgraded and new two columns was added. then i want to add that data to druid schema. but couldn't yet.

like image 319
sujith kulasekara Avatar asked Jun 12 '19 07:06

sujith kulasekara


People also ask

How do I update my Druid data?

Adding new data to existing datasources Druid can insert new data to an existing datasource by appending new segments to existing segment sets. It can also add new data by merging an existing set of segments with new data and overwriting the original set. Druid does not support single-record updates by primary key.

Which of the following column is required when inserting data into Druid?

Druid supports the following column types: String, Long, Float, Double.

How do you consume Druid data?

You initiate data loading in Druid by submitting an ingestion task spec to the Druid Overlord. You can write ingestion specs by hand or using the data loader built into the Druid console. The Quickstart shows you how to use the data loader to build an ingestion spec.

How does Apache Druid store data?

Druid stores data in files called segments. Historical processes cache data segments on local disk and serve queries from that cache as well as from an in-memory cache. This means that Druid never needs to access deep storage during a query, helping it offer the best query latencies possible.


1 Answers

In order to add a new column to existing datasource you need to follow the below steps:

  1. Go to the Tasks menu in druid console.
  2. From the listed datasources, go to the 'Actions' column in the last of the datasource in which you want to add the column.
  3. There will be a magnifying glass like button, click on that to copy the existing payload.
  4. Copy the payload in notepad and add the 2 columns to "dimensions" array.
  5. Copy the updated payload and submit it via Submit Supervisor button.

You'll find the new columns in the datasource which you can verify by querying the datasource in query section of druid.

like image 130
CodeBRKR Avatar answered Oct 21 '22 09:10

CodeBRKR