How to add dimensions

I am a beginner from Beijing, English is not very good, please forgive me.

I am having a problem now.

I now want to add new fields to the newly added data. How can I achieve this?

For example: using the spec in updates-init-index.json will create a table with an “animal” field.

If you add new data, you need to add the “alias” field, how to operate?

thank

eg:old data

{“timestamp”:“2018-01-01T07:01:35Z”,“animal”:“octopus”, “location”:1, “number”:100}

new data

{“timestamp”:“2018-01-01T07:01:35Z”,“animal”:“octopus”, “location”:1 ,“nickname”:“sweetPo”,number":100}

Hi user,

Assuming your data resides in Druid itself, you may use the ingest segment firehose to reindex your existing data.

http://druid.io/docs/latest/ingestion/firehose.html

谢谢您的回复

也许我没有清楚地表达我的意思。

我想在访问新数据时添加字段

现在使用“https://support.imply.io/hc/en-us/articles/360004050913-How-to-create-a-new-dimension-and-fill-the-column-with-default-value-during “摄取”方法,你已经可以添加新字段了,但是会有默认值,而不是我要添加的数据,请详细教,谢谢

在 2019年3月14日星期四 UTC+8下午7:35:03,Swapneel Datta写道:

thank you for your reply

Maybe I didn’t express my meaning clearly.

I want to add fields when accessing new data

Now use “https://support.imply.io/hc/en-us/articles/360004050913-How-to-create-a-new-dimension-and-fill-the-column-with-default-value-during -ingestion” method, you can already add new fields, but there will be default values, instead of the data I will add, please also teach in detail, thank you

在 2019年3月15日星期五 UTC+8上午10:09:55,2900…@qq.com写道:

Hi

If I understand the problem correctly, you want to add dimensions(fields) to the new data you are going to ingest in Druid. You don’t want to transform the data already ingested in Druid with the default values for the newly added field.

If this is the requirement, you can just update the ingestion spec for the new segments you are going to create in Druid with the new fields.

Otherwise, if ask is for updating the already ingested data, then you have to follow the https://support.imply.io/hc/en-us/articles/360004050913-How-to-create-a-new-dimension-and-fill-the-column-with-default-value-during.

Thanks

Himanshu

Hello,
whatever ingestion mechanism you use, as described here, the ingestionSpec property describe what is going to be ingested, you can see more details here. To mention also that if you need schema less ingestion dimension property is not required otherwise concrete schema must be provided. Examples:

Event:

{“timestamp”:“2018-01-01T07:01:35Z”,“animal”:“octopus”, “location”:1, “number”:100}

``

Ingestion spec schema less:

“dimensionsSpec”: {
“dimensions”: ,
},

``

or in your case:

Hello,
whatever ingestion mechanism you use, as described here, the ingestionSpec property describe what is going to be ingested, you can see more details here. To mention also that if you need schema less ingestion dimension property is not required otherwise concrete schema must be provided. Examples:

Event:

{“timestamp”:“2018-01-01T07:01:35Z”,“animal”:“octopus”, “location”:1, “number”:100}

``

Ingestion spec schema less:

“dimensionsSpec”: {
“dimensions”: ,
},

``

or in your case:

“dimensionsSpec”: {
“dimensions”: [
“location”,
“nickname”,
“sweetPo”
],
},

``

I am a beginner from Beijing, English is not very good, please forgive me.

I am having a problem now.

I now want to add new fields to the newly added data. How can I achieve this?

For example: using the spec in updates-init-index.json will create a table with an “animal” field.

If you add new data, you need to add the “alias” field, how to operate?

thank

eg:old data

{“timestamp”:“2018-01-01T07:01:35Z”,“animal”:“octopus”, “location”:1, “number”:100}

new data

{“timestamp”:“2018-01-01T07:01:35Z”,“animal”:“octopus”, “location”:1 ,“nickname”:“sweetPo”,number":100}