1"use strict";(self.webpackChunkdaxstudio_docusaurus=self.webpackChunkdaxstudio_docusaurus||[]).push([["2213"],{46974(e,n,t){t.r(n),t.d(n,{metadata:()=>s,default:()=>h,frontMatter:()=>a,contentTitle:()=>o,toc:()=>d,assets:()=>c});var s=JSON.parse('{"id":"features/comment-script/connect","title":"CONNECT","description":"Comment Script is a preview feature and is only available in the DAX Studio preview build. Its syntax and behavior may change before the final release.","source":"@site/docs/features/comment-script/connect.md","sourceDirName":"features/comment-script","slug":"/features/comment-script/connect","permalink":"/docs/features/comment-script/connect","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":2,"frontMatter":{"title":"CONNECT","sidebar_position":2},"sidebar":"tutorialSidebar","previous":{"title":"Comment Script","permalink":"/docs/features/comment-script/"},"next":{"title":"USE","permalink":"/docs/features/comment-script/use"}}'),r=t(74848),i=t(28453);let a={title:"CONNECT",sidebar_position:2},o,c={},d=[{value:"Syntax",id:"syntax",level:2}];function l(e){let n={a:"a",admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.admonition,{title:"Preview Feature",type:"warning",children:(0,r.jsxs)(n.p,{children:["Comment Script is a ",(0,r.jsx)(n.strong,{children:"preview"})," feature and is only available in the DAX Studio ",(0,r.jsx)(n.a,{href:"/preview-downloads",children:"preview build"}),". Its syntax and behavior may change before the final release."]})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"CONNECT"})," connects without opening the connection dialog."]}),"\n",(0,r.jsx)(n.h2,{id:"syntax",children:"Syntax"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-dax",children:"--\x3e CONNECT SERVER <server-name>\n--\x3e CONNECT DESKTOP <report-name-or-pbix-path>\n--\x3e CONNECT SSDT <workspace-name>\n"})}),"\n",(0,r.jsx)(n.p,{children:"Quote a target that contains spaces. Unquoted targets may also contain spaces and continue to the end of the command line."}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Target"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"SERVER"})}),(0,r.jsx)(n.td,{children:"An Analysis Services or Power BI XMLA endpoint"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"DESKTOP"})}),(0,r.jsxs)(n.td,{children:["The report name shown by a running Power BI Desktop instance, or a full ",(0,r.jsx)(n.code,{children:".pbix"})," path"]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"SSDT"})}),(0,r.jsx)(n.td,{children:"The name of an open SSDT workspace"})]})]})]}),"\n",(0,r.jsxs)(n.p,{children:["When ",(0,r.jsx)(n.code,{children:"DESKTOP"})," receives a ",(0,r.jsx)(n.code,{children:".pbix"})," path, DAX Studio looks for a running instance with the same file name. If one is not running, it opens the file in Power BI Desktop, waits for it to load, and connects."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-dax",children:'--\x3e CONNECT SERVER localhost\\tabular\n--\x3e CONNECT DESKTOP "C:\\Reports\\Sales.pbix"\n'})}),"\n",(0,r.jsxs)(n.p,{children:["The target supports ",(0,r.jsxs)(n.a,{href:"/docs/features/comment-script/set",children:[(0,r.jsx)(n.code,{children:"SET"})," variable expansion"]}),"."]})]})}function h(e={}){let{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},28453(e,n,t){t.d(n,{R:()=>a,x:()=>o});var s=t(96540);let r={},i=s.createContext(r);function a(e){let n=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(i.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.