Refer:
The list of available options output_format= :
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=psql
+---------------+--------------+-------------+
| TABLE_CATALOG | TABLE_SCHEMA | TABLE_OWNER |
|---------------+--------------+-------------|
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
+---------------+--------------+-------------+
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=plain
TABLE_CATALOG TABLE_SCHEMA TABLE_OWNER
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=simple
TABLE_CATALOG TABLE_SCHEMA TABLE_OWNER
------------- ------------ -----------
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=grid
+---------------+--------------+-------------+
| TABLE_CATALOG | TABLE_SCHEMA | TABLE_OWNER |
+===============+==============+=============+
| GINGER | PUBLIC | SYSADMIN |
+---------------+--------------+-------------+
| GINGER | PUBLIC | SYSADMIN |
+---------------+--------------+-------------+
| GINGER | PUBLIC | SYSADMIN |
+---------------+--------------+-------------+
| GINGER | PUBLIC | SYSADMIN |
+---------------+--------------+-------------+
| GINGER | PUBLIC | SYSADMIN |
+---------------+--------------+-------------+
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=fancy_grid
╒═══════════════╤══════════════╤═════════════╕
│ TABLE_CATALOG │ TABLE_SCHEMA │ TABLE_OWNER │
╞═══════════════╪══════════════╪═════════════╡
│ GINGER │ PUBLIC │ SYSADMIN │
├───────────────┼──────────────┼─────────────┤
│ GINGER │ PUBLIC │ SYSADMIN │
├───────────────┼──────────────┼─────────────┤
│ GINGER │ PUBLIC │ SYSADMIN │
├───────────────┼──────────────┼─────────────┤
│ GINGER │ PUBLIC │ SYSADMIN │
├───────────────┼──────────────┼─────────────┤
│ GINGER │ PUBLIC │ SYSADMIN │
╘═══════════════╧══════════════╧═════════════╛
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=orgtbl
| TABLE_CATALOG | TABLE_SCHEMA | TABLE_OWNER |
|---------------+--------------+-------------|
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=rst
============= ============ ===========
TABLE_CATALOG TABLE_SCHEMA TABLE_OWNER
============= ============ ===========
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
============= ============ ===========
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=mediawiki
{| class="wikitable" style="text-align: left;"
|+ <!-- caption -->
|-
! TABLE_CATALOG !! TABLE_SCHEMA !! TABLE_OWNER
|-
| GINGER || PUBLIC || SYSADMIN
|-
| GINGER || PUBLIC || SYSADMIN
|-
| GINGER || PUBLIC || SYSADMIN
|-
| GINGER || PUBLIC || SYSADMIN
|-
| GINGER || PUBLIC || SYSADMIN
|}
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=html
<table>
<tr><th>TABLE_CATALOG</th><th>TABLE_SCHEMA</th><th>TABLE_OWNER</th></tr>
<tr><td>GINGER </td><td>PUBLIC </td><td>SYSADMIN </td></tr>
<tr><td>GINGER </td><td>PUBLIC </td><td>SYSADMIN </td></tr>
<tr><td>GINGER </td><td>PUBLIC </td><td>SYSADMIN </td></tr>
<tr><td>GINGER </td><td>PUBLIC </td><td>SYSADMIN </td></tr>
<tr><td>GINGER </td><td>PUBLIC </td><td>SYSADMIN </td></tr>
</table>
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=latex
\begin{tabular}{lll}
\hline
TABLE\_CATALOG & TABLE\_SCHEMA & TABLE\_OWNER \\
\hline
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
\hline
\end{tabular}
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=latex_booktabs
\begin{tabular}{lll}
\toprule
TABLE\_CATALOG & TABLE\_SCHEMA & TABLE\_OWNER \\
\midrule
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
\bottomrule
\end{tabular}
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=pipe
| TABLE_CATALOG | TABLE_SCHEMA | TABLE_OWNER |
|:--------------|:-------------|:------------|
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=tsv
TABLE_CATALOG TABLE_SCHEMA TABLE_OWNER
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=csv
"TABLE_CATALOG","TABLE_SCHEMA","TABLE_OWNER"
"GINGER","PUBLIC","SYSADMIN"
"GINGER","PUBLIC","SYSADMIN"
"GINGER","PUBLIC","SYSADMIN"
"GINGER","PUBLIC","SYSADMIN"
"GINGER","PUBLIC","SYSADMIN"
USER@SERVER$
The list of available options output_format= :
Examples:snowsql -q 'select...' -o output_format=psql snowsql -q 'select...' -o output_format=plain snowsql -q 'select...' -o output_format=simple snowsql -q 'select...' -o output_format=grid snowsql -q 'select...' -o output_format=fancy_grid snowsql -q 'select...' -o output_format=orgtbl snowsql -q 'select...' -o output_format=rst snowsql -q 'select...' -o output_format=mediawiki snowsql -q 'select...' -o output_format=html snowsql -q 'select...' -o output_format=latex snowsql -q 'select...' -o output_format=latex_booktabs snowsql -q 'select...' -o output_format=pipe snowsql -q 'select...' -o output_format=tsv snowsql -q 'select...' -o output_format=csv
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=psql
+---------------+--------------+-------------+
| TABLE_CATALOG | TABLE_SCHEMA | TABLE_OWNER |
|---------------+--------------+-------------|
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
+---------------+--------------+-------------+
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=plain
TABLE_CATALOG TABLE_SCHEMA TABLE_OWNER
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=simple
TABLE_CATALOG TABLE_SCHEMA TABLE_OWNER
------------- ------------ -----------
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=grid
+---------------+--------------+-------------+
| TABLE_CATALOG | TABLE_SCHEMA | TABLE_OWNER |
+===============+==============+=============+
| GINGER | PUBLIC | SYSADMIN |
+---------------+--------------+-------------+
| GINGER | PUBLIC | SYSADMIN |
+---------------+--------------+-------------+
| GINGER | PUBLIC | SYSADMIN |
+---------------+--------------+-------------+
| GINGER | PUBLIC | SYSADMIN |
+---------------+--------------+-------------+
| GINGER | PUBLIC | SYSADMIN |
+---------------+--------------+-------------+
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=fancy_grid
╒═══════════════╤══════════════╤═════════════╕
│ TABLE_CATALOG │ TABLE_SCHEMA │ TABLE_OWNER │
╞═══════════════╪══════════════╪═════════════╡
│ GINGER │ PUBLIC │ SYSADMIN │
├───────────────┼──────────────┼─────────────┤
│ GINGER │ PUBLIC │ SYSADMIN │
├───────────────┼──────────────┼─────────────┤
│ GINGER │ PUBLIC │ SYSADMIN │
├───────────────┼──────────────┼─────────────┤
│ GINGER │ PUBLIC │ SYSADMIN │
├───────────────┼──────────────┼─────────────┤
│ GINGER │ PUBLIC │ SYSADMIN │
╘═══════════════╧══════════════╧═════════════╛
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=orgtbl
| TABLE_CATALOG | TABLE_SCHEMA | TABLE_OWNER |
|---------------+--------------+-------------|
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=rst
============= ============ ===========
TABLE_CATALOG TABLE_SCHEMA TABLE_OWNER
============= ============ ===========
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
============= ============ ===========
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=mediawiki
{| class="wikitable" style="text-align: left;"
|+ <!-- caption -->
|-
! TABLE_CATALOG !! TABLE_SCHEMA !! TABLE_OWNER
|-
| GINGER || PUBLIC || SYSADMIN
|-
| GINGER || PUBLIC || SYSADMIN
|-
| GINGER || PUBLIC || SYSADMIN
|-
| GINGER || PUBLIC || SYSADMIN
|-
| GINGER || PUBLIC || SYSADMIN
|}
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=html
<table>
<tr><th>TABLE_CATALOG</th><th>TABLE_SCHEMA</th><th>TABLE_OWNER</th></tr>
<tr><td>GINGER </td><td>PUBLIC </td><td>SYSADMIN </td></tr>
<tr><td>GINGER </td><td>PUBLIC </td><td>SYSADMIN </td></tr>
<tr><td>GINGER </td><td>PUBLIC </td><td>SYSADMIN </td></tr>
<tr><td>GINGER </td><td>PUBLIC </td><td>SYSADMIN </td></tr>
<tr><td>GINGER </td><td>PUBLIC </td><td>SYSADMIN </td></tr>
</table>
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=latex
\begin{tabular}{lll}
\hline
TABLE\_CATALOG & TABLE\_SCHEMA & TABLE\_OWNER \\
\hline
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
\hline
\end{tabular}
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=latex_booktabs
\begin{tabular}{lll}
\toprule
TABLE\_CATALOG & TABLE\_SCHEMA & TABLE\_OWNER \\
\midrule
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
GINGER & PUBLIC & SYSADMIN \\
\bottomrule
\end{tabular}
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=pipe
| TABLE_CATALOG | TABLE_SCHEMA | TABLE_OWNER |
|:--------------|:-------------|:------------|
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
| GINGER | PUBLIC | SYSADMIN |
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=tsv
TABLE_CATALOG TABLE_SCHEMA TABLE_OWNER
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
GINGER PUBLIC SYSADMIN
USER@SERVER$ snowsql -q 'select table_catalog,table_schema,table_owner from information_schema.tables limit 5' -o output_format=csv
"TABLE_CATALOG","TABLE_SCHEMA","TABLE_OWNER"
"GINGER","PUBLIC","SYSADMIN"
"GINGER","PUBLIC","SYSADMIN"
"GINGER","PUBLIC","SYSADMIN"
"GINGER","PUBLIC","SYSADMIN"
"GINGER","PUBLIC","SYSADMIN"
USER@SERVER$
This comment has been removed by the author.
ReplyDelete