jon-wei commented on a change in pull request #6119: Add docs for virtual
columns and transform specs
URL: https://github.com/apache/incubator-druid/pull/6119#discussion_r208762761
##########
File path: docs/content/querying/virtual-columns.md
##########
@@ -0,0 +1,59 @@
+---
+layout: doc_page
+---
+
+# Virtual Columns
+
+Virtual columns are queryable column "views" created from a set of columns
during a query.
+
+A virtual column can potentially draw from multiple underlying columns,
although a virtual column always presents itself as a single column.
+
+Virtual columns can be used as dimensions or as inputs to aggregators.
+
+Each Druid query can accept a list of virtual columns as a parameter. The
following scan query is provided as an example:
+
+```
+{
+ "queryType": "scan",
+ "dataSource": "page_data",
+ "columns":[],
+ "virtualColumns": [
+ {
+ "type": "expression",
+ "name": "fooPage",
+ "expression": "concat('foo' + page)",
+ "outputType": "STRING"
+ },
+ {
+ "type": "expression",
+ "name": "tripleWordCount",
+ "expression": "wordCount * 3",
+ "outputType": "LONG"
+ }
+ ],
+ "intervals": [
+ "2013-01-01/2019-01-02"
+ ]
+}
+```
+
+## Expression virtual column
+
+Druid currently has one type of virtual column, the expression virtual column.
Review comment:
I updated this part to have a "virtual column types" section header and put
"expression" under there without additional comments
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]