1"use strict";(self.webpackChunkstarrocks=self.webpackChunkstarrocks||[]).push([[2961],{14273:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>i,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>n,toc:()=>a});let n=JSON.parse('{"id":"sql-reference/sys/object_dependencies","title":"object_dependencies","description":"You can view the dependency relationship of asynchronous materialized views by querying the view object_dependencies.","source":"@site/versioned_docs/version-4.0/sql-reference/sys/object_dependencies.md","sourceDirName":"sql-reference/sys","slug":"/sql-reference/sys/object_dependencies","permalink":"/docs/4.0/sql-reference/sys/object_dependencies","draft":false,"unlisted":false,"editUrl":"https://github.com/StarRocks/starrocks/edit/main/docs/en/sql-reference/sys/object_dependencies.md","tags":[],"version":"4.0","frontMatter":{"displayed_sidebar":"docs"},"sidebar":"docs","previous":{"title":"grants_to_users","permalink":"/docs/4.0/sql-reference/sys/grants_to_users"},"next":{"title":"policy_references","permalink":"/docs/4.0/sql-reference/sys/policy_references"}}');var c=s(74848),d=s(28453);let r={displayed_sidebar:"docs"},o="object_dependencies",i={},a=[];function l(e){let t={code:"code",h1:"h1",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(t.header,{children:(0,c.jsx)(t.h1,{id:"object_dependencies",children:"object_dependencies"})}),"\n",(0,c.jsxs)(t.p,{children:["You can view the dependency relationship of asynchronous materialized views by querying the view ",(0,c.jsx)(t.code,{children:"object_dependencies"}),"."]}),"\n",(0,c.jsxs)(t.p,{children:["The following fields are provided in ",(0,c.jsx)(t.code,{children:"object_dependencies"}),":"]}),"\n",(0,c.jsxs)(t.table,{children:[(0,c.jsx)(t.thead,{children:(0,c.jsxs)(t.tr,{children:[(0,c.jsx)(t.th,{children:(0,c.jsx)(t.strong,{children:"Field"})}),(0,c.jsx)(t.th,{children:(0,c.jsx)(t.strong,{children:"Description"})})]})}),(0,c.jsxs)(t.tbody,{children:[(0,c.jsxs)(t.tr,{children:[(0,c.jsx)(t.td,{children:"object_id"}),(0,c.jsx)(t.td,{children:"ID of the object."})]}),(0,c.jsxs)(t.tr,{children:[(0,c.jsx)(t.td,{children:"object_name"}),(0,c.jsx)(t.td,{children:"The name of the object."})]}),(0,c.jsxs)(t.tr,{children:[(0,c.jsx)(t.td,{children:"object_database"}),(0,c.jsx)(t.td,{children:"The Database where the object is located."})]}),(0,c.jsxs)(t.tr,{children:[(0,c.jsx)(t.td,{children:"object_catalog"}),(0,c.jsxs)(t.td,{children:["The catalog where the object is located. This field is always ",(0,c.jsx)(t.code,{children:"default_catalog"}),"."]})]}),(0,c.jsxs)(t.tr,{children:[(0,c.jsx)(t.td,{children:"object_type"}),(0,c.jsxs)(t.td,{children:["The type of the object. This field is always ",(0,c.jsx)(t.code,{children:"MATERIALIZED_VIEW"}),"."]})]}),(0,c.jsxs)(t.tr,{children:[(0,c.jsx)(t.td,{children:"ref_object_id"}),(0,c.jsx)(t.td,{children:"ID of the referenced object."})]}),(0,c.jsxs)(t.tr,{children:[(0,c.jsx)(t.td,{children:"ref_object_name"}),(0,c.jsx)(t.td,{children:"The name of the referenced object."})]}),(0,c.jsxs)(t.tr,{children:[(0,c.jsx)(t.td,{children:"ref_object_database"}),(0,c.jsx)(t.td,{children:"The database where the referenced object is located."})]}),(0,c.jsxs)(t.tr,{children:[(0,c.jsx)(t.td,{children:"ref_object_catalog"}),(0,c.jsx)(t.td,{children:"The catalog where the referenced object is located."})]}),(0,c.jsxs)(t.tr,{children:[(0,c.jsx)(t.td,{children:"ref_object_type"}),(0,c.jsx)(t.td,{children:"The type of the referenced object."})]})]})]}),"\n",(0,c.jsx)(t.p,{children:"Example:"}),"\n",(0,c.jsx)(t.pre,{children:(0,c.jsx)(t.code,{className:"language-Plain",children:"MySQL > SELECT * FROM sys.object_dependencies\\G\n*************************** 1. row ***************************\n object_id: 11115\n object_name: mv2\n object_database: test_db\n object_catalog: default_catalog\n object_type: MATERIALIZED_VIEW\n ref_object_id: 11092\n ref_object_name: mv1\nref_object_database: test_db\
1n ref_object_catalog: default_catalog\n ref_object_type: MATERIALIZED_VIEW\n*************************** 2. row ***************************\n object_id: 11092\n object_name: mv1\n object_database: test_db\n object_catalog: default_catalog\n object_type: MATERIALIZED_VIEW\n ref_object_id: 11074\n ref_object_name: test_tbl\nref_object_database: test_db\n ref_object_catalog: default_catalog\n ref_object_type: OLAP\n"})}),"\n",(0,c.jsxs)(t.p,{children:["The above example indicates that the materialized view ",(0,c.jsx)(t.code,{children:"mv1"})," is created based on the StarRocks internal table ",(0,c.jsx)(t.code,{children:"test_tbl"}),", and the materialized view ",(0,c.jsx)(t.code,{children:"mv2"})," is created based on the materialized view ",(0,c.jsx)(t.code,{children:"mv1"}),"."]})]})}function h(e={}){let{wrapper:t}={...(0,d.R)(),...e.components};return t?(0,c.jsx)(t,{...e,children:(0,c.jsx)(l,{...e})}):l(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>r,x:()=>o});var n=s(96540);let c={},d=n.createContext(c);function r(e){let t=n.useContext(d);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:r(e.components),n.createElement(d.Provider,{value:t},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.