1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5935],{71167:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>r,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>c,toc:()=>m});var t=a(85893),o=a(11151);const s={id:"information_schema",title:"Information Schema",sidebar_label:"Information Schema",slug:"/mekadb/information_schema"},i=void 0,c={id:"mekadb/information_schema",title:"Information Schema",description:"MekaDB supports showing metadata about the tables and views available. This information can be accessed using the views of the ISO SQL information_schema schema or the MekaDB specific SHOW TABLES and SHOW COLUMNS commands.",source:"@site/src/markdown/mekadb/information_schema.md",sourceDirName:"mekadb",slug:"/mekadb/information_schema",permalink:"/docs/mekadb/information_schema",draft:!1,unlisted:!1,editUrl:"https://github.com/hypi-universe/website/tree/main/packages/create-docusaurus/templates/shared/src/markdown/mekadb/information_schema.md",tags:[],version:"current",frontMatter:{id:"information_schema",title:"Information Schema",sidebar_label:"Information Schema",slug:"/mekadb/information_schema"},sidebar:"docs",previous:{title:"Aggregate Functions",permalink:"/docs/mekadb/aggregate_functions"},next:{title:"EXPLAIN",permalink:"/docs/mekadb/explain"}},r={},m=[];function l(e){const n={a:"a",admonition:"admonition",code:"code",p:"p",pre:"pre",...(0,o.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["MekaDB supports showing metadata about the tables and views available. This information can be accessed using the views of the ISO SQL ",(0,t.jsx)(n.code,{children:"information_schema"})," schema or the MekaDB specific ",(0,t.jsx)(n.code,{children:"SHOW TABLES"})," and ",(0,t.jsx)(n.code,{children:"SHOW COLUMNS"})," commands."]}),"\n",(0,t.jsxs)(n.p,{children:["To show tables in the MekaDB catalog, use the ",(0,t.jsx)(n.code,{children:"SHOW TABLES"})," command or the ",(0,t.jsx)(n.code,{children:"information_schema.tables"})," view:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sql",children:"> show tables;\nor\n> select * from information_schema.tables;\n+---------------+--------------------+------------+------------+\n| table_catalog | table_schema | table_name | table_type |\n+---------------+--------------------+------------+------------+\n| datafusion | public | t | BASE TABLE |\n| datafusion | information_schema | tables | VIEW |\n| datafusion | information_schema | views | VIEW |\n| datafusion | information_schema | columns | VIEW |\n+---------------+--------------------+------------+------------+\n\n"})}),"\n",(0,t.jsxs)(n.p,{children:["To show the schema of a table in MekaDB, use the ",(0,t.jsx)(n.code,{children:"SHOW COLUMNS"})," command or the ",(0,t.jsx)(n.code,{children:"information_schema.columns"})," view:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sql",children:"> show columns from t;\nor\n> select table_catalog, table_schema, table_name, column_name, data_type, is_nullable from information_schema.columns;\n+---------------+--------------+------------+-------------+-----------+-------------+\n| table_catalog | table_schema | table_name | column_name | data_type | is_nullable |\n+---------------+--------------+------------+-------------+-----------+-------------+\n| datafusion | public | t | Int64(1) | Int64 | NO |\n+---------------+--------------+------------+-------------+-----------+-------------+\n"})}),"\n",(0,t.jsxs)(n.p,{children:["To show the current session configuration options, use the ",(0,t.jsx)(n.code,{children:"SHOW ALL"})," command or the ",(0,t.jsx)(n.code,{children:"information_schema.df_settings"})," view:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sql",children:"\u276f select * from information_schema.df_settings;\n\n+-------------------------------------------------+---------+\n| name | setting |\n+-------------------------------------------------+---------+\n| datafusion.execution.batch_size | 8192 |\n| datafusion.execution.coalesce_batches | true |\n| datafusion.execution.time_zone | UTC |\n| datafusion.explain.logical_plan_only | false |\n| datafusion.explain.physical_plan_only | false |\n| datafusion.optimizer.filter_null_join_keys | false |\n| datafusion.optimizer.skip_failed_rules | true |\n+-------------------------------------------------+---------+\n"})}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["Large portions of this page is copied from the ",(0,t.jsx)(n.a,{href:"https://github.com/apache/arrow-datafusion/tree/main/docs/source/user-guide/sql",children:"Apache Datafusion documentation"})," on January 26th 2024 - where there have been customisations to match Hypi's deployment this has been noted. Apache Datafusion and the Apache name are the property of the Apache Foundation and licensed under the ",(0,t.jsx)(n.a,{href:"https://github.com/apache/arrow-datafusion/blob/main/LICENSE.txt",children:"Apache V2 license"})," ."]})})]})}function d(e={}){const{wrapper:n}={...(0,o.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},11151:(e,n,a)=>{a.d(n,{Z:()=>c,a:()=>i});var t=a(67294);const o={},s=t.createContext(o);function i(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.