You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by dh...@apache.org on 2018/05/09 16:32:12 UTC
[4/8] impala git commit: IMPALA-783: [DOCS] Document SHOW CREATE VIEW
IMPALA-783: [DOCS] Document SHOW CREATE VIEW
Change-Id: Ia656c51d41fe7dbf08803313effc0baae680fce0
Reviewed-on: http://gerrit.cloudera.org:8080/10313
Reviewed-by: Alex Behm <al...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/4337c109
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/4337c109
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/4337c109
Branch: refs/heads/2.x
Commit: 4337c10921e870b9726d31a7402f1878f202fc8b
Parents: b19868f
Author: Alex Rodoni <ar...@cloudera.com>
Authored: Fri May 4 15:20:35 2018 -0700
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Wed May 9 01:50:16 2018 +0000
----------------------------------------------------------------------
docs/topics/impala_show.xml | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/impala/blob/4337c109/docs/topics/impala_show.xml
----------------------------------------------------------------------
diff --git a/docs/topics/impala_show.xml b/docs/topics/impala_show.xml
index bd58d61..323d0a4 100644
--- a/docs/topics/impala_show.xml
+++ b/docs/topics/impala_show.xml
@@ -47,6 +47,7 @@ SHOW SCHEMAS [[LIKE] '<varname>pattern</varname>'] - an alias for SHOW DATABASES
SHOW TABLES [IN <varname>database_name</varname>] [[LIKE] '<varname>pattern</varname>']
<ph rev="1.2.0">SHOW [AGGREGATE | ANALYTIC] FUNCTIONS [IN <varname>database_name</varname>] [[LIKE] '<varname>pattern</varname>']</ph>
<ph rev="1.2.1">SHOW CREATE TABLE [<varname>database_name</varname>].<varname>table_name</varname></ph>
+<ph rev="1.2.1">SHOW CREATE VIEW [<varname>database_name</varname>].<varname>view_name</varname></ph>
<ph rev="1.2.1">SHOW TABLE STATS [<varname>database_name</varname>.]<varname>table_name</varname></ph>
<ph rev="1.2.1">SHOW COLUMN STATS [<varname>database_name</varname>.]<varname>table_name</varname></ph>
<ph rev="1.4.0">SHOW PARTITIONS [<varname>database_name</varname>.]<varname>table_name</varname></ph>
@@ -738,6 +739,16 @@ show tables like '*dim*|t*';
to change things such as the database name, <codeph>LOCATION</codeph> field, and so on that might be
different on the destination system.
</p>
+ <p>
+ If you specify a view name in the <codeph>SHOW CREATE TABLE</codeph>,
+ it returns a <codeph>CREATE VIEW</codeph> statement with column names
+ and the original SQL statement to reproduce the view. You need the
+ <codeph>VIEW_METADATA</codeph> privilege on the view and
+ <codeph>SELECT</codeph> privilege on all underlying views and tables to
+ successfully run the <codeph>SHOW CREATE VIEW</codeph> statement for a
+ view. The <codeph>SHOW CREATE VIEW</codeph> is available as an alias for
+ <codeph>SHOW CREATE TABLE</codeph>.
+ </p>
<p conref="../shared/impala_common.xml#common/security_blurb"/>
@@ -864,6 +875,22 @@ show create table show_create_table_demo;
</p>
</conbody>
</concept>
+ <concept id="show_create_view">
+ <title>SHOW CREATE VIEW Statement</title>
+ <conbody>
+ <p> The <codeph>SHOW CREATE VIEW</codeph>, it returns a <codeph>CREATE
+ VIEW</codeph> statement with column names and the original SQL
+ statement to reproduce the view. You need the
+ <codeph>VIEW_METADATA</codeph> privilege on the view and
+ <codeph>SELECT</codeph> privilege on all underlying views and tables to
+ successfully run the <codeph>SHOW CREATE VIEW</codeph> statement for a
+ view. </p>
+ <p>
+ The <codeph>SHOW CREATE VIEW</codeph> is an alias for <codeph>SHOW
+ CREATE TABLE</codeph>.
+ </p>
+ </conbody>
+ </concept>
<concept id="show_table_stats">