From 479c196aa4358b5a720a5fee81ac5a08a8983526 Mon Sep 17 00:00:00 2001 From: Igal Levy Date: Wed, 29 Oct 2014 12:32:24 -0700 Subject: [PATCH 1/3] Added section on union data sources --- docs/content/DataSource.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/content/DataSource.md b/docs/content/DataSource.md index 49c583561ba..771832627e5 100644 --- a/docs/content/DataSource.md +++ b/docs/content/DataSource.md @@ -1,10 +1,13 @@ --- layout: doc_page --- -A data source is the Druid equivalent of a database table. However, a query can also masquerade as a data source, providing subquery-like functionality. Query data sources are currently only supported by [GroupBy](GroupByQuery.html) queries. + +## Datasources + +A data source is the Druid equivalent of a database table. However, a query can also masquerade as a data source, providing subquery-like functionality. Query data sources are currently supported only by [GroupBy](GroupByQuery.html) queries. ### Table Data Source -The table data source the most common type. It's represented by a string, or by the full structure: +The table data source is the most common type. It's represented by a string, or by the full structure: ```json { @@ -13,6 +16,16 @@ The table data source the most common type. It's represented by a string, or by } ``` +### Union Data Source +This data source unions two table data sources. + +```json +{ + "type": "union", + "dataSources": ["", "string_value2>"] +} +``` + ### Query Data Source ```json { From e07b02f54b0371f6d257d3abc40fbde239c08c0a Mon Sep 17 00:00:00 2001 From: Igal Levy Date: Fri, 31 Oct 2014 11:07:55 -0700 Subject: [PATCH 2/3] fixed typo and added info that union can take any number of dataSources --- docs/content/DataSource.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/DataSource.md b/docs/content/DataSource.md index 771832627e5..9c9fb017631 100644 --- a/docs/content/DataSource.md +++ b/docs/content/DataSource.md @@ -17,12 +17,12 @@ The table data source is the most common type. It's represented by a string, or ``` ### Union Data Source -This data source unions two table data sources. +This data source unions two or more table data sources. ```json { "type": "union", - "dataSources": ["", "string_value2>"] + "dataSources": ["", "", "", ... ]] } ``` From de7fb5a69051021a0cb743c39eee5d8a6ad39738 Mon Sep 17 00:00:00 2001 From: Igal Levy Date: Tue, 11 Nov 2014 11:56:22 -0800 Subject: [PATCH 3/3] fixed typo, added note on matching schema requirement for unioned data sources --- docs/content/DataSource.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/content/DataSource.md b/docs/content/DataSource.md index 9c9fb017631..bfbe1c6b4d9 100644 --- a/docs/content/DataSource.md +++ b/docs/content/DataSource.md @@ -12,7 +12,7 @@ The table data source is the most common type. It's represented by a string, or ```json { "type": "table", - "name": + "name": "" } ``` @@ -22,10 +22,13 @@ This data source unions two or more table data sources. ```json { "type": "union", - "dataSources": ["", "", "", ... ]] + "dataSources": ["", "", "", ... ] } ``` +Note that the data sources being unioned should have the same schema. + + ### Query Data Source ```json {