This message was deleted.
# general
s
This message was deleted.
g
I think the console may have been redesigned since then
right thing to do depends on your ingestion method
if it's a realtime stream (kafka/kinesis) then you can use "open in data loader" here:
and then edit and resubmit
m
@Gian Merlino yeah i actually did that, we are doing batch data so i already have a sample data wanted to add another column, so i open in data loader and added the column in dimensions but its failing i don't why
g
for batch you should be able to do the same thing you did originally (data loader, task submit, API, etc) with the addition of the new columns
each batch load declares its own columns, so there's nothing else to do beyond that
m
no can't i add new column to the same datasource?
should the data be there along with the column mentioned? for example in csv file? or just column can be added maybe in next batch we get the data
v
Druid stores all data in segments that are immutable. You can not just add a column to an existing segment. Any data modification is made by creating new segments that overshadow the old segments. So if you previously ingested a CSV file and it had, say, 10 columns, and now you have a new CSV file with 11 columns and you want the data in Druid to reflect that you can just ingest the new CSV file again with the same datasource name (make sure "Append to existing" is set to False):
👍 1
g
an incremental, new ingest can absolutely add new columns though
when the new columns are queried, we treat those columns as null in any previously-ingested data
v
Oh yes. Absolutely ☝️ . I was just imagining reloading the same data with more columns and was 100% focused on that in my answer.
m
ok Thanks got it
why can't we add the new column to the already ingested data, why is druid built like that that we have to drop that segment and reload again with the new column.
v
because Druid assumes that segments are immutable and, once generated, can not be changed. This allows Druid to offer best-in-class scaling abilities. Imagine a single segment being loaded on 3 servers (because maybe you want to support HUGE query load). You want each server to be able to answer queries on top of that segment. These 3 segments have to be identical and not change. If you want to change anything you get Druid to create new segments (that are also immutable) and have these new segments overshadow the previous versions.
👍 1
g
there is a video here about how the storage format works: https://imply.io/videos/inside-apache-druids-storage-and-query-engine/. long story short: the immutability of segments plays a huge part in performance and scalability
👍 1