Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of supported data types for dimensions in Druid?

I cannot seem to find any particular tutorial/doc page on the Druid website which has a list of all supported data types in Druid for the dimensions. From how much I've read, I know that long, float and string are definitely supported, but I have next to zero information about the other supported types.

Any help on this would be appreciated, thanks!

like image 347
Tarun Verma Avatar asked Jul 14 '17 09:07

Tarun Verma


People also ask

What type of column is essential in a Druid table?

Metrics. Metrics are columns that Druid stores in an aggregated form. Metrics are most useful when you enable rollup. If you specify a metric, you can apply an aggregation function to each row during ingestion.

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

Rollup. When ingesting data, we must consider whether we wish to use rollup or not. If rollup is enabled, we will need to separate the input columns into two categories, "dimensions" and "metrics". "Dimensions" are the grouping columns for rollup, while "metrics" are the columns that will be aggregated.

Does Druid use SQL?

Apache Druid (incubating) supports two query languages: Druid SQL and [native queries](querying. html), which SQL queries are planned into, and which end users can also issue directly.

How do you add columns to a Druid?

Go to the Tasks menu in druid console. From the listed datasources, go to the 'Actions' column in the last of the datasource in which you want to add the column. There will be a magnifying glass like button, click on that to copy the existing payload.


2 Answers

Druid natively supports five basic column types: "long" (64 bit signed int), "float" (32 bit float), "double" (64 bit float) "string" (UTF-8 encoded strings), and "complex" (catch-all for more exotic data types like hyperUnique and approxHistogram columns). Timestamps (including the __time column) are stored as longs, with the value being the number of milliseconds since 1 January 1970 UTC.

I found this page that contains a list of supported types: https://druid.apache.org/docs/latest/querying/sql.html#data-types

like image 163
Rob Wu Avatar answered Nov 02 '22 10:11

Rob Wu


Dimensions are fields that can be filtered on or grouped by. They are always single Strings, arrays of Strings, single Longs, single Doubles or single Floats.

like image 27
RahulAggarwal Avatar answered Nov 02 '22 10:11

RahulAggarwal