"use strict";(self.webpackChunk_infuseai_piperider_ui=self.webpackChunk_infuseai_piperider_ui||[]).push([[836],{6836:function(e,n,t){t.r(n),t.d(n,{default:function(){return C}});var r=t(9439),i=t(4190),l=t(7094),a=t(8625),s=t(2791),o=t(8039),c=t(8693),u=t(5650),d=t(1573),x=t(8982),m=t(2104),h=t(1892),j=t(8493),b=t(4304),p=t(4494),f=t(7677),g=t(1364),v=t(4749),S=t(5761),y=t(184);function C(e){var n,t=e.data,C=e.columnName,w=e.tableName;(0,f.jr)("Single Report: Table Column Details"),(0,f.Lp)({eventName:f.mk.PAGE_VIEW,eventProperties:{type:f.ll,page:"column-details-page"}});var P=(0,a.TH)(),R=(0,r.Z)(P,2)[1],O=(0,s.useState)(0),_=(0,r.Z)(O,2),D=_[0],k=_[1];(0,v.n)((function(e){return e.setReportRawData}))({base:t});var N=v.n.getState(),A=N.tableColumnsOnly,H=void 0===A?[]:A,T=N.assertionsOnly,E=H.find((function(e){return(0,r.Z)(e,1)[0]===w})),F=0===C.length,Q=t.tables[w],I=Q.columns[C],K=(0,f.SR)((null===T||void 0===T||null===(n=T.base)||void 0===n?void 0:n.filter((function(e){return(null===e||void 0===e?void 0:e.table)===w})))||[]),M=K.failed,W=K.total,Y=I||{},Z=Y.type,z=Y.histogram,G=Y.schema_type,L=(0,b.MM)(I),q=L.backgroundColor,B=L.icon;if(!w||!Q||!E)return(0,y.jsx)(o.o,{isSingleReport:!0,children:(0,y.jsx)(j.J,{text:"No profile data found for table name: ".concat(w)})});var J=(0,S.gq)(w,C),V=(0,b.hG)(Z);return(0,y.jsx)(o.o,{isSingleReport:!0,maxHeight:d.t4,children:(0,y.jsxs)(i.rj,{width:"inherit",templateColumns:"1fr 2fr",children:[(0,y.jsx)(i.P4,{colSpan:3,children:(0,y.jsx)(f.Qu,{breadcrumbList:J})}),(0,y.jsx)(i.P4,{overflowY:"scroll",maxHeight:d.t4,children:(0,y.jsx)(m._,{tableColEntry:E,currentTable:w,currentColumn:C,onSelect:function(e){var n=e.tableName,t=e.columnName;k(0),R("/tables/".concat(n,"/columns/").concat(t))},singleOnly:!0})}),F?(0,y.jsxs)(i.P4,{maxHeight:d.t4,overflowY:"auto",p:10,children:[(0,y.jsx)(g.Q,{title:Q.name,subtitle:"Table",mb:5}),(0,y.jsxs)(l.mQ,{defaultIndex:0,children:[(0,y.jsxs)(l.td,{children:[(0,y.jsx)(l.OK,{children:"Overview"}),(0,y.jsx)(l.OK,{children:"Assertions"}),(0,y.jsx)(l.OK,{children:"Schema"})]}),(0,y.jsxs)(l.nP,{children:[(0,y.jsx)(l.x4,{children:(0,y.jsxs)(i.rj,{templateColumns:"1fr 1px 1fr",gap:3,children:[(0,y.jsx)(p.m,{tableDatum:Q}),(0,y.jsx)(i.iz,{orientation:"vertical"}),(0,y.jsx)(p.a,{description:Q.description})]})}),(0,y.jsxs)(l.x4,{children:[Number(W)>0&&(0,y.jsx)(i.kC,{mb:5,children:(0,y.jsx)(f.FC,{total:W,failed:M})}),(0,y.jsx)(f.Ox,{filterString:Q.name,caseSensitiveFilter:!0,comparableAssertions:T,singleOnly:!0,tableSize:"sm"})]}),(0,y.jsx)(l.x4,{children:(0,y.jsx)(f.rH,{baseTableEntryDatum:null===E||void 0===E?void 0:E[1].base,singleOnly:!0,onSelect:function(){}})})]})]})]}):(0,y.jsxs)(i.rj,{templateColumns:"1fr 1fr",templateRows:"8em 1fr 1fr ".concat(V?"1fr":""),gridAutoFlow:"column",width:"100%",pb:5,maxHeight:d.t4,overflowY:"auto",children:[(0,y.jsx)(i.P4,{colSpan:2,p:6,children:(0,y.jsx)(g.Q,{title:C,subtitle:G,p:2,borderBottom:d.dx,icon:B,iconColor:q})}),(0,y.jsx)(i.P4,{colSpan:1,px:10,bg:"gray.50",borderRight:d.dx,children:(0,y.jsx)(c.t,{columnDatum:I,hasAnimation:!0})}),(0,y.jsx)(i.P4,{gridRow:"auto",px:10,bg:"gray.50",borderRight:d.dx,children:(0,b.jl)(Z)&&(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(h.E,{columnDatum:I})})}),V&&z&&(0,y.jsx)(i.P4,{bg:"gray.50",minWidth:"1px",borderRight:d.dx,children:(0,y.jsx)(x.M,{columnDatum:I})}),(0,y.jsx)(i.P4,{colSpan:1,rowSpan:V?3:2,minWidth:0,px:10,bg:"gray.50",children:(0,y.jsx)(u.r,{baseColumnDatum:I,hasAnimation:!0,tabIndex:D,onSelectTab:function(e){return k(e)}})})]})]})})}}}]);
//# sourceMappingURL=836.1e0e4334.chunk.js.map