<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0">

<channel>
	<title>Olivier Travers</title>
	<atom:link href="https://www.oliviertravers.com/feed/" rel="self" type="application/rss+xml"/>
	<link>https://www.oliviertravers.com</link>
	<description>Internet publishing entrepreneur and long-term expat. Rants on software + content, self-ownership, eclectic music and more.</description>
	<lastBuildDate>Wed, 20 Aug 2025 21:31:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>

<image>
	<url>https://www.oliviertravers.com/wp-content/uploads/2019/01/cropped-Olivier-Travers-500-32x32.jpg</url>
	<title>Olivier Travers</title>
	<link>https://www.oliviertravers.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">119046757</site>	<xhtml:meta content="noindex" name="robots" xmlns:xhtml="http://www.w3.org/1999/xhtml"/><item>
		<title>Running AI Image Generation on Your Windows PC: Beginner-Friendly Starter Pack (Summer 2025 Update)</title>
		<link>https://www.oliviertravers.com/running-ai-image-generation-on-your-windows-pc-beginner-friendly-starter-pack/</link>
					<comments>https://www.oliviertravers.com/running-ai-image-generation-on-your-windows-pc-beginner-friendly-starter-pack/#respond</comments>
		
		<dc:creator><![CDATA[otravers]]></dc:creator>
		<pubDate>Wed, 20 Aug 2025 21:01:29 +0000</pubDate>
				<category><![CDATA[cool tools]]></category>
		<category><![CDATA[software]]></category>
		<guid isPermaLink="false">https://www.oliviertravers.com/?p=11322</guid>

					<description><![CDATA[<p>I started making images with AI web services back when MidJourney beta was just a Discord server, mostly to illustrate blog posts, presentation decks, and landing pages, as I hate... <a href="https://www.oliviertravers.com/running-ai-image-generation-on-your-windows-pc-beginner-friendly-starter-pack/">Read more &#187;</a></p>
<p>The post <a href="https://www.oliviertravers.com/running-ai-image-generation-on-your-windows-pc-beginner-friendly-starter-pack/">Running AI Image Generation on Your Windows PC: Beginner-Friendly Starter Pack (Summer 2025 Update)</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>I started making images with AI web services back when MidJourney beta was <a href="https://hoeijmakers.net/start-with-midjourney/" title="">just a Discord server</a>, mostly to illustrate blog posts, presentation decks, and landing pages, as I hate lazy stock art with a fiery passion. There&#8217;s now a plethora of AI image tools, so why bother using local software? My high-level goals are the same for text and image generation: produce useful content in an environment less constrained by Big-Corp black boxes of censorship and bias. I get that huge corporations want to manage their reputational risk, as that&#8217;s what I sell in my day job, but I don&#8217;t want my pen to second-guess whether I&#8217;m writing or drawing things it doesn&#8217;t like.</p>



<p>Don&#8217;t get me wrong, online services such as Sora (video) or ChatGPT/Bing/Designer (DALL·E 3 and now GPT-4o image) are very convenient and have their place, and they&#8217;re usually several steps ahead of what&#8217;s possible locally. But to learn any technology, nothing replaces tinkering on your own hardware and software stack. If you don&#8217;t understand how AI works, it will feel like magic and you won&#8217;t be able to find workarounds to its shortcomings. Then you risk downplaying the technology&#8217;s full potential because of your own lack of knowledge. This entry goes hand in hand with my post on <a href="https://www.oliviertravers.com/running-llms-locally-the-getting-started-windows-stack/" title="">running LLMs locally for text generation and research</a>.</p>



<p>As AI has steadily improved, I&#8217;ve started generating images not only for work but also just for entertainment, to be used as wallpapers, webcam backgrounds for <a href="https://www.oliviertravers.com/how-add-dynamic-outline-odd-webcam-shape-obs-nvidia-broadcast/" title="How to Add a Dynamic Outline to an Odd Webcam Shape in OBS">OBS</a>, or simply to experiment and see what&#8217;s possible. If you want to learn, have fun, generate great images, and ultimately control your stack outside of the confines of online services, you&#8217;re in the right place.</p>



<p>By the end of this entry, you&#8217;ll know the main concepts, local models, and tools to get going. I won&#8217;t spell out every installation detail, but I selected the best YouTube videos that break it down to the last click.</p>



<h1 class="wp-block-heading">1. Getting Starting with Diffusion Models and Tackling the Issues They Commonly Face</h1>



<h2 class="wp-block-heading">1.1. What&#8217;s the State of the Art and Where to Start?</h2>



<p>For a while the most popular open-source models came from <a href="https://stability.ai/news/stable-diffusion-public-release" title="">Stable Diffusion</a>, and this is where I started with local image gen around mid 2023. However, the company behind that project botched their SD3 release, and was effectively displaced by <a href="https://blackforestlabs.ai/#get-flux" title="">Flux.1</a> in August 2024. In fact, many people at Black Forest Labs, the company behind Flux, actually come from Stability AI. I&#8217;m oversimplifying here as SDXL continues to have an active user community because of its broader stylistic range (including NSFW, ahem, flexibility), but by and large, community buzz moved on.</p>



<p>The local AI image generation space then felt stagnant for almost a year, especially in comparison with the insane pace seen with LLMs. Meanwhile, after seemingly neglecting Dall-E, OpenAI <a href="https://openai.com/index/introducing-4o-image-generation/" title="">took the world by storm</a> in March 2025 with 4o&#8217;s amazing prompt adherence to more complex compositions.</p>



<p>But things have been picking up again in the open-source world, and as of August 2025 new, interesting entrants include:</p>



<ul class="wp-block-list">
<li><a href="https://github.com/QwenLM/Qwen-Image" title="">Qwen-Image</a> &#8211; my current favorite
<ul class="wp-block-list">
<li><a href="https://www.youtube.com/watch?v=erj5YlR9hvE" title="">Tutorial</a></li>



<li><a href="https://github.com/ModelTC/Qwen-Image-Lightning/" title="">Qwen-Image Lightning</a> (faster distilled version as a LORA)</li>



<li><a href="https://docs.comfy.org/tutorials/image/qwen/qwen-image-edit" title="">Qwen-Image-Edit</a> </li>
</ul>
</li>



<li><a href="https://huggingface.co/black-forest-labs/FLUX.1-Krea-dev" title="">Flux.1 Krea</a> (<a href="https://www.youtube.com/watch?v=Iuq1ne_Cnd4" title="">video)</a></li>



<li><a href="https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev" title="">Flux.1 Kontext</a> (<a href="https://www.youtube.com/watch?v=9-onDeEWWvU" title="">video)</a></li>



<li><a href="https://www.youtube.com/watch?v=i9BcQ4GwVv4" title="">Wan 2.2</a> &amp; <a href="https://www.youtube.com/watch?v=bJtdVaKLdns" title="">2.2 Lightning</a> fast model &#8211; a video generator also good for images</li>



<li><a href="https://huggingface.co/lodestones/Chroma" title="">Chroma</a></li>
</ul>



<p>Like with local LLMs, investigate first what can reasonably run on your hardware, starting with your graphics card and how much VRAM it has. If the model has to swap out workloads out of GPU/VRAM to CPU/RAM, processing will end up an order of magnitude slower. Different models excel at different things and go from almost instant to taking several minutes to compute a single image.</p>



<figure class="wp-block-image size-large"><a href="https://www.oliviertravers.com/wp-content/uploads/2025/08/ComfyUI_temp_zhiey_00009_-1.png"><img fetchpriority="high" decoding="async" width="1024" height="580" src="https://www.oliviertravers.com/wp-content/uploads/2025/08/ComfyUI_temp_zhiey_00009_-1-1024x580.png?_t=1755722987" alt="" class="wp-image-11900" srcset="https://www.oliviertravers.com/wp-content/uploads/2025/08/ComfyUI_temp_zhiey_00009_-1-1024x580.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2025/08/ComfyUI_temp_zhiey_00009_-1-300x170.png 300w, https://www.oliviertravers.com/wp-content/uploads/2025/08/ComfyUI_temp_zhiey_00009_-1-768x435.png 768w, https://www.oliviertravers.com/wp-content/uploads/2025/08/ComfyUI_temp_zhiey_00009_-1-1536x870.png 1536w, https://www.oliviertravers.com/wp-content/uploads/2025/08/ComfyUI_temp_zhiey_00009_-1-624x354.png 624w, https://www.oliviertravers.com/wp-content/uploads/2025/08/ComfyUI_temp_zhiey_00009_-1.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Insane progress in just a few years (at least in the image generation space, not sure I&#8217;m a fan of trade wars.) </figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://www.oliviertravers.com/wp-content/uploads/2025/08/ComfyUI_00008_.png"><img decoding="async" width="1024" height="578" src="https://www.oliviertravers.com/wp-content/uploads/2025/08/ComfyUI_00008_-1024x578.png" alt="" class="wp-image-11899" srcset="https://www.oliviertravers.com/wp-content/uploads/2025/08/ComfyUI_00008_-1024x578.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2025/08/ComfyUI_00008_-300x169.png 300w, https://www.oliviertravers.com/wp-content/uploads/2025/08/ComfyUI_00008_-768x434.png 768w, https://www.oliviertravers.com/wp-content/uploads/2025/08/ComfyUI_00008_-624x352.png 624w, https://www.oliviertravers.com/wp-content/uploads/2025/08/ComfyUI_00008_.png 1360w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Qwen-Image-Edit at work. Bipartisan jabs will either placate everyone, or more likely piss off everyone. Lighten up people!</figcaption></figure>



<h2 class="wp-block-heading">1.2. What Are All These Files?!</h2>



<p>Some models are self-contained in a single checkpoint file (sometimes as a <a href="https://www.perplexity.ai/search/what-is-a-gguf-file-VRUk4p3oQPa8mqxiPgvczw" title="">GGUF file</a>), for maximum control you&#8217;ll want to use separate files for different purposes:</p>



<ul class="wp-block-list">
<li><a href="https://www.perplexity.ai/search/what-s-a-unet-in-stable-diffus-9yaMSOcES_KujaK6Q1J.3w" title=""><strong>UNet</strong></a> &#8211; Checkpoint that provides the core (U-shaped) encoder-decoder logic in image genAI software. Just like with LLMs, some <a href="https://www.youtube.com/watch?v=UcwDgsMgTu4" title="">quantized, pruned, or distilled</a> versions (e.g. FLUX.1-dev-fp8) were created to reduce the memory footprint at the cost of (hopefully only slightly) lower quality. You&#8217;ll often hear about parameters or <a href="https://www.perplexity.ai/search/what-are-weights-in-llms-and-i-wWYqbn8VRS2W5eLQjrnFSg" title="">weights</a> to describe models, which roughly determines how many ingredients were thrown in and how they were connected to each other. <a href="https://github.com/nunchaku-tech/nunchaku?tab=readme-ov-file" title="">Nunchaku</a> (<a href="https://www.youtube.com/watch?v=eATIu4lkOl0" title="">video</a>) in particular is bringing an interesting approach to performance optimization.</li>



<li><a href="https://www.perplexity.ai/search/what-s-a-clip-in-stable-diffus-VsNb9KVKQqyrEV.vFAZ.Aw" title=""><strong>CLIP</strong></a> &#8211; <a href="https://www.perplexity.ai/search/what-s-a-clip-in-stable-diffus-VsNb9KVKQqyrEV.vFAZ.Aw" title="">Contrastive Language-Image Pretraining</a> to encode text. More on that at the end of this entry.</li>



<li><a href="https://www.perplexity.ai/search/what-s-a-vae-diffusion-Uq8LgRcPTf.ITGm9RFGbfA" title=""><strong>VAE</strong></a> &#8211; <a href="https://www.perplexity.ai/search/what-s-a-vae-diffusion-Uq8LgRcPTf.ITGm9RFGbfA" title="">Variational Autoencoder</a> to improve image quality.</li>



<li><strong>LORA</strong> &#8211; <a href="https://www.perplexity.ai/search/what-s-a-lora-in-stable-diffus-.P0Rdsz5Quu15tzaKYG8pw" title="">Low-Rank Adaptation</a> for finetuning, placed between the checkpoint and the prompt.</li>



<li><a href="https://www.perplexity.ai/search/what-is-the-role-of-a-control-dC1iAiC5SPKaSvkf4OChiA" title=""><strong>ControlNet</strong></a> &#8211; control conditioning to help with composition and quality, including detailers, upscalers, or edge detection (canny/edge, depth, etc).</li>



<li><a href="https://www.perplexity.ai/search/what-is-an-ipadapter-for-diffu-BpESDkJRQr2H7pwOteVWWA" title=""><strong>IPAdapter</strong></a> &#8211; use images as prompts.</li>



<li>Re-usable <a href="https://www.perplexity.ai/search/comfyui-workflow-ImtNoAFbRxePWs8PH_dC3w" title=""><strong>workflows</strong></a> to chain all of the above as well as many other help functions.</li>



<li>Some of the above are delivered using the <a href="https://www.perplexity.ai/search/what-are-safetensors-PzKCXZ9cQU2GOk01eeh4xQ" title="">safetensors</a> format to improve security and speed.</li>



<li>The extras like ControlNets or LORAs only work for a specific base model, i.e. SDXL LoRAs/ControlNets aren’t plug-compatible with Flux and vice-versa.</li>
</ul>



<p>There are other concepts you&#8217;ll need to understand such as denoising steps, cfg/guidance (how strictly the text prompt will be followed), sampler and scheduler types, <a href="https://www.perplexity.ai/search/what-is-max-and-base-shift-in-5xPvGpmNQcyLny9qqEx60w" title="">base and max shift</a>, etc. The video below will get you situated:</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="ComfyUI: Advanced Understanding (Part 1)" width="625" height="352" src="https://www.youtube.com/embed/_C7kR2TFIX0?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Part 1 of three good tutorials</figcaption></figure>



<p>To get going, create accounts on the following key websites where you&#8217;ll find the relevant artifacts:</p>



<ul class="wp-block-list">
<li><a href="https://www.github.com/" title="">Github</a> (also make sure to install Git locally)</li>



<li><a href="https://huggingface.co/models?pipeline_tag=image-to-text&amp;sort=trending" title="">Hugging Face</a> &#8211; you can test many models for free on <a href="https://huggingface.co/spaces?category=image-generation" title="">Hugging Spaces</a> </li>



<li><a href="https://civitai.com/" title="">Civitai</a> </li>
</ul>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="ComfyUI Tutorial Series: Ep01 - Introduction and Installation" width="625" height="352" src="https://www.youtube.com/embed/Zko_s2LO9Wo?list=PL-pohOSaL8P9kLZP8tQ1K1QWdZEgwiBM0" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Well explained Like I&#8217;m 5 &#8211; <a href="https://www.youtube.com/@pixaroma" title="">Pixaroma</a> is probably the best no-hype explainer in this space </figcaption></figure>



<h2 class="wp-block-heading">1.3. Common Challenges &amp; Limitations</h2>



<p>Like LLMs, all these image generators have a lot in common and beyond the initial wow factor, tend to struggle with the same challenges:</p>



<ul class="wp-block-list">
<li>Lack of precision in executing complex prompts, especially with regards to composition and positioning</li>



<li>Prompt bleed, where attributes of one object in the prompt end up being applied to another one</li>



<li>Botched human anatomy (eyes, hands, wrong proportions)</li>



<li>Repetition of subjects when requesting custom image resolutions</li>



<li>Inaccurate text generation</li>



<li>Poor details and visual glitches</li>
</ul>



<p>Advances in this space are extremely fast, and Flux.1 made DALL-E&#8217;s 2021 initial release look like ancient history. I have some images from that era on my blog that I&#8217;m keeping for hilarity. That said, you&#8217;ll still run into the issues above. The 2025 cohort brought another leap in prompt adherence, with Qwen already standing out as one of the best models at rendering complex prompts and text.</p>



<p>To get the best results, the art of prompting is equally as important for image and text generation. Flux.1 and more recent models respond well to detailed prompts, going from the generic to the specific. You can run batches of images with different parameters to understand better their impact on prompt adherence. This power comes at the cost of being much slower (as in, seconds per iteration and minutes per image), making the case for a &#8220;batch and forget&#8221; approach once you&#8217;ve polished your prompt.</p>



<p>All these AI tools are probabilistic (stochastic is the fancier word) in nature and one should still expect to have to play &#8220;prompt roulette&#8221; to some extent in order to get results closest to your intent.</p>



<figure class="wp-block-image size-large is-resized"><a href="https://www.oliviertravers.com/wp-content/uploads/2024/08/image-2.png"><img loading="lazy" decoding="async" width="1024" height="500" src="https://www.oliviertravers.com/wp-content/uploads/2024/08/image-2-1024x500.png" alt="" class="wp-image-11343" style="width:797px;height:auto" srcset="https://www.oliviertravers.com/wp-content/uploads/2024/08/image-2-1024x500.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-2-300x147.png 300w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-2-768x375.png 768w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-2-624x305.png 624w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-2.png 1419w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Reviewing a batch of 10 images with the same prompt with Conditioning set at 10 guidance and 20 steps.</figcaption></figure>



<h1 class="wp-block-heading">2. User Interface &amp; Workflows</h1>



<p>There&#8217;s a variety of UIs that let you apply diffusion models, not just for text to image, but also for image to image and other use cases. Here are some of the most popular:</p>



<h2 class="wp-block-heading">2.1. Noob Friendly Options &#8211; Start Here Only If You&#8217;re Really Tech Averse</h2>



<p><em>2025 update</em>: I&#8217;m keeping these for reference but they&#8217;re mostly tools from the SD era, I recommend you skip these, bite the bullet, and learn ComfyUI.</p>



<ul class="wp-block-list">
<li><a href="https://github.com/lllyasviel/Fooocus" title="">Foocus</a> &#8211; Easy but basic, start here if you&#8217;re intimidated by new tech and want the closest local equivalent to a SaaS product. It&#8217;s stuck with Stable Diffusion XL and won&#8217;t see new work beyond bug fixes, so it&#8217;s not the best long term choice.</li>



<li><a href="https://github.com/AUTOMATIC1111/stable-diffusion-webui" title="">Automatic1111</a> &#8211; More powerful than Foocus, not too complex, not updated since February 2025 so probably also not a long term option.</li>



<li><a href="https://github.com/lllyasviel/stable-diffusion-webui-forge" title="">Forge</a> &#8211; A fork of Automatic1111 that offers a good mix of ease of use and power and can run Flux. A good place to start at the moment if you want a prompt-and-click experience. People also use it for specific tasks such as inpainting.</li>



<li><a href="https://github.com/mcmonkeyprojects/SwarmUI" title="">SwarmUI</a> &#8211; can make a pool with several GPUs and has a beginner-friendly user interface.</li>
</ul>



<h2 class="wp-block-heading">2.2. ComfyUI &#8211; Don&#8217;t Be Scared &amp; Take It One Step At A Time</h2>



<p><a href="https://www.comfy.org/" title="">ComfyUI</a> is very powerful but not as newbie friendly. If you want to create elaborate workflows, this is the tool to do so, but don&#8217;t start here unless you&#8217;re willing to invest hours into it. If you want to use the latest and greatest models, you don&#8217;t have much of a choice. ComfyUI workflows are plug-and-play recipes where each node does a useful thing—load a model, add a style LoRA, guide composition, inpaint/outpaint, upscale, swap samplers, batch runs—so you can mix and reuse these capabilities to get consistent, repeatable results.</p>



<h2 class="wp-block-heading">2.2.1. Install &amp; Dependencies</h2>



<p>You can either maintain a system-wide Python ecosystem on your PC, <a href="https://www.perplexity.ai/search/comfyui-portable-or-not-5SzAnL3BRdqhBpzEZwfwqw" title="">install the portable version</a> which has an embedded Python environment, or follow the instructions in the video below to install ComfyUI via Git, set up a <a href="https://docs.python.org/3/library/venv.html" title="">Python virtual environment</a>, and install <a href="https://github.com/woct0rdho/triton-windows" title="">Triton</a> and <a href="https://github.com/woct0rdho/SageAttention" title="">SageAttention</a> for better performance for the Windows/CUDA (i.e. NVIDIA) combo:</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Install ComfyUI on Windows w/ Triton and SageAttention | FAST, Error-Free, AI Setup!" width="625" height="352" src="https://www.youtube.com/embed/Ms2gz6Cl6qo?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Ignore the stupid thumbnail, this is a good tutorial to get ComfyUI installed with performance optimizations</figcaption></figure>



<h2 class="wp-block-heading">2.2.2. Extra Nodes</h2>



<p>Must-have extras include:</p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<ul class="wp-block-list">
<li><a href="https://github.com/ltdrdata/ComfyUI-Manager" title="">ComfyUI-Manager</a> for easy custom node and installation (here&#8217;s a good <a href="https://comfy.icu/node/" title="">search engine</a> for these)</li>



<li><a href="https://github.com/willmiao/ComfyUI-Lora-Manager" title="">Lora Manager</a></li>



<li><a href="https://github.com/crystian/ComfyUI-Crystools" title="">Crystools</a> &#8211; resource monitor and more.</li>
</ul>
</div></div>



<p>There are very intricate nodes such as the <a href="https://github.com/chflame163/ComfyUI_LayerStyle?tab=readme-ov-file" title="">ComfyUI_LayerStyle</a>, but be careful, some people have a tendency to create bloated workflows. There are also poorly maintained nodes that can brick your ComfyUI install by overwriting dependencies, so don&#8217;t install things randomly. You can load the underlying workflow from an image by dragging it in the Comfy canvas, provided the metadata was preserved by the author (in Civitai it will say &#8220;workflow included&#8221;).</p>



<p>Whatever the tool you choose, don&#8217;t rush and follow their installation instructions to the letter or you&#8217;ll run into countless issues. Then use the built-in upgrade scripts often.</p>



<h2 class="wp-block-heading">2.2.3. Model Centralization</h2>



<p>You can load your models in a shared folder that several UIs will access in one place. For a while I was using Forge and ComfyUI that way:</p>



<ul class="wp-block-list">
<li><a href="https://github.com/lllyasviel/stable-diffusion-webui-forge/discussions/1168" title="">For Forge, edit web-user.bat</a></li>



<li>For ComfyUI, <a href="https://medium.com/xrlo-extended-reality-lowdown/sharing-models-and-custom-nodes-in-comfyui-0965ef7f1485" title="">edit extra_models_paths.yaml</a> (use forward paths on Windows). You can also use symlinks.</li>
</ul>



<p>Similarly to how Ollama packages functionality to speed up the download/install cycle for LLMs, there are management apps for diffusion models such as <a href="https://lykos.ai/" title="">Stability Matrix</a> or <a href="https://pinokio.computer/" title="">Pinokio</a> (the latter also covers LLMs). They provide a quick way to get you going but don&#8217;t be surprised if you run into <a href="https://www.reddit.com/r/StableDiffusion/comments/1ed5fl7/stability_matrix_forge_install_error/" title="">installation snags</a> or performance issues.</p>



<h1 class="wp-block-heading">3. Image Models and LLMs Together</h1>



<p>Basic CLIP-only pipelines (e.g., SD1.5/SDXL) truncate prompts to ~77 tokens and mainly align keywords to visuals, whereas T5+CLIP pipelines (e.g., Flux, SD3) add a T5-XXL language encoder with a longer context window to parse natural-language structure and text, vastly improving composition/text rendering.</p>



<p>To stick to a completely local stack, you can use ComfyUI and Ollama together to generate prompts for you. That&#8217;s an interesting approach to a) generate prompt structure that&#8217;s optimized for the target image model (e.g. comma-separated vs. natural language) and b) stays within its token constraints, as well as getting broader prompt variety automatically when you run batches.</p>



<p>Warning: this can get pretty compute intensive, but it&#8217;s very fun to instruct a model how to instruct another model. See my <a href="https://www.oliviertravers.com/running-llms-locally-the-getting-started-windows-stack/" title="Running LLMs Locally for Text Generation and Research: The Getting Started Windows Stack">LLM entry</a> for a deeper dive.</p><p>The post <a href="https://www.oliviertravers.com/running-ai-image-generation-on-your-windows-pc-beginner-friendly-starter-pack/">Running AI Image Generation on Your Windows PC: Beginner-Friendly Starter Pack (Summer 2025 Update)</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.oliviertravers.com/running-ai-image-generation-on-your-windows-pc-beginner-friendly-starter-pack/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">11322</post-id>	</item>
		<item>
		<title>My Microsoft Fabric Musings Published Elsewhere</title>
		<link>https://www.oliviertravers.com/my-microsoft-fabric-musings-published-elsewhere/</link>
					<comments>https://www.oliviertravers.com/my-microsoft-fabric-musings-published-elsewhere/#respond</comments>
		
		<dc:creator><![CDATA[otravers]]></dc:creator>
		<pubDate>Mon, 04 Aug 2025 22:51:11 +0000</pubDate>
				<category><![CDATA[Power BI & Fabric]]></category>
		<guid isPermaLink="false">https://www.oliviertravers.com/?p=11843</guid>

					<description><![CDATA[<p>I&#8217;ve had less time than I&#8217;d like to write on my own blog in the past couple of years, but if you like my writing about the data software market... <a href="https://www.oliviertravers.com/my-microsoft-fabric-musings-published-elsewhere/">Read more &#187;</a></p>
<p>The post <a href="https://www.oliviertravers.com/my-microsoft-fabric-musings-published-elsewhere/">My Microsoft Fabric Musings Published Elsewhere</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve had less time than I&#8217;d like to write on my own blog in the past couple of years, but if you like my writing about the data software market at large, and the Microsoft stack specifically, then check out my writing elsewhere:</p>



<ul class="wp-block-list">
<li><a href="https://lumel.com/blog/powertable/microsoft-fabric-business-application-workload/">PowerTable: Microsoft Fabric&#8217;s Missing Business Application Workload</a> (Lumel, August 2025)</li>



<li><a href="https://lumel.com/blog/data-management/microsoft-fabric-database-engines-powertable-guide/" title="">From OLTP to AI: Choosing Your Microsoft Fabric Database Engine</a> (Lumel, July 2025)</li>



<li><a href="https://lumel.com/blog/powertable/taking-apps-to-where-data-lives-the-powertable-approach-to-microsoft-fabric/" title="">Taking Apps to Where Data Lives: The PowerTable Approach to Microsoft Fabric</a> (Lumel, July 2025)</li>



<li><a href="https://www.ilink-digital.com/insights/blog/event-based-data-platform-for-everyone-microsoft-fabric/" title="">Real Time Intelligence for the Rest of Us with Microsoft Fabric</a> (iLink Digital, December 2024)</li>



<li><a href="https://www.ilink-digital.com/insights/blog/citizen-developers-can-scale-work-with-it-pros-like-never-before-with-microsoft-fabric/" title="">Citizen Developers Can Scale &amp; Work with IT Pros Like Never Before with Microsoft Fabric</a> (iLink Digital, September 2024)</li>
</ul>



<p>The tone is as you&#8217;d expect from a corporate blog more neutral than what I&#8217;d post here, but those entries are otherwise my usual grounded and considered takes, if I may say so myself.</p>



<p>I have several follow ups lined up for what will become a comprehensive architectural series on the Lumel blog, so stay tuned. And if time allows, I&#8217;ll try to add the occasional companion piece here on my own site as I need an outlet for my sardonic tendencies!</p><p>The post <a href="https://www.oliviertravers.com/my-microsoft-fabric-musings-published-elsewhere/">My Microsoft Fabric Musings Published Elsewhere</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.oliviertravers.com/my-microsoft-fabric-musings-published-elsewhere/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">11843</post-id>	</item>
		<item>
		<title>How to Add a Dynamic Outline to an Odd Webcam Shape in OBS</title>
		<link>https://www.oliviertravers.com/how-add-dynamic-outline-odd-webcam-shape-obs-nvidia-broadcast/</link>
					<comments>https://www.oliviertravers.com/how-add-dynamic-outline-odd-webcam-shape-obs-nvidia-broadcast/#respond</comments>
		
		<dc:creator><![CDATA[otravers]]></dc:creator>
		<pubDate>Tue, 04 Mar 2025 14:32:46 +0000</pubDate>
				<category><![CDATA[cool tools]]></category>
		<guid isPermaLink="false">https://www.oliviertravers.com/?p=11721</guid>

					<description><![CDATA[<p>Nvidia Broadcast comes with a filter that can be applied directly in OBS for background removal (similarly to what MS Teams does) without requiring a green screen. Since I often... <a href="https://www.oliviertravers.com/how-add-dynamic-outline-odd-webcam-shape-obs-nvidia-broadcast/">Read more &#187;</a></p>
<p>The post <a href="https://www.oliviertravers.com/how-add-dynamic-outline-odd-webcam-shape-obs-nvidia-broadcast/">How to Add a Dynamic Outline to an Odd Webcam Shape in OBS</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.nvidia.com/en-us/geforce/broadcasting/broadcast-sdk/resources/" title="">Nvidia Broadcast</a> comes with a filter that can be applied directly in OBS for background removal (similarly to what MS Teams does) without requiring a green screen. Since I often use flashy <a href="https://www.oliviertravers.com/running-ai-image-generation-on-your-windows-pc-beginner-friendly-starter-pack/" title="Running AI Image Generation on Your Windows PC: Beginner-Friendly Starter Pack">AI-generated backgrounds</a>, I wanted to add an outline and a semitransparent shadow to the webcam shape post-background removal. I don&#8217;t want to use a static image since I move around on my seat, so I wanted something dynamic. Not to speak of the extra work required to generate an outline image.</p>



<p>After struggling to get a working solution using Perplexity and ChatGPT, Claude Sonnet 3.7 one shot the code to use as a <a href="https://obsproject.com/forum/resources/obs-shaderfilter.1736/" title="">user-defined shader</a>. Here&#8217;s a sample you can adapt to your needs:</p>



<pre class="wp-block-code"><code>float4 mainImage(VertData v_in) : TARGET
{
    float2 uv = v_in.uv;
    float4 color = image.Sample(textureSampler, uv);
    
    // Define outline properties
    float outlineThickness = 0.002; // Adjust thickness as needed
    float shadowOffset = 0.003; // How far the shadow is offset
    float4 outlineColor = float4(1.0, 0.0, 0.0, 1.0); // Red outline (RGBA)
    float4 shadowColor = float4(0.3, 0.3, 0.3, 0.7); // Gray shadow with some transparency
    
    // Sample neighboring pixels for outline detection
    float2 offsets&#091;4] = {
        float2(outlineThickness, 0.0),
        float2(-outlineThickness, 0.0),
        float2(0.0, outlineThickness),
        float2(0.0, -outlineThickness)
    };
    
    // Check for edges (areas where alpha changes significantly)
    bool isEdge = false;
    for (int i = 0; i &lt; 4; i++) {
        float4 sampleColor = image.Sample(textureSampler, uv + offsets&#091;i]);
        // If this neighboring pixel has significantly different alpha, we&#039;re at an edge
        if (abs(sampleColor.a - color.a) &gt; 0.1) {
            isEdge = true;
            break;
        }
    }
    
    // Sample for shadow detection (slightly offset from the edge)
    float2 shadowOffsets&#091;4] = {
        float2(shadowOffset, shadowOffset),
        float2(-shadowOffset, shadowOffset),
        float2(shadowOffset, -shadowOffset),
        float2(-shadowOffset, -shadowOffset)
    };
    
    // Check if we should draw a shadow
    bool isShadow = false;
    if (color.a &lt; 0.1) { // If current pixel is transparent
        for (int i = 0; i &lt; 4; i++) {
            float4 shadowSample = image.Sample(textureSampler, uv - shadowOffsets&#091;i]);
            // If a nearby pixel is opaque, we should draw shadow here
            if (shadowSample.a &gt; 0.1) {
                isShadow = true;
                break;
            }
        }
    }
    
    // If we&#039;re at an edge, show the red outline
    if (isEdge &amp;&amp; color.a &gt; 0.1) {
        return outlineColor;
    }
    // If we should draw a shadow, return shadow color
    else if (isShadow) {
        return shadowColor;
    }
    
    // Otherwise return the original color
    return color;
}</code></pre>



<p>Below is a screenshot with a thicker blue border and more obvious shadow, just for the sake of illustration:</p>



<figure class="wp-block-image size-full"><a href="https://www.oliviertravers.com/wp-content/uploads/2025/03/image-2.png"><img loading="lazy" decoding="async" width="731" height="407" src="https://www.oliviertravers.com/wp-content/uploads/2025/03/image-2.png" alt="" class="wp-image-11723" srcset="https://www.oliviertravers.com/wp-content/uploads/2025/03/image-2.png 731w, https://www.oliviertravers.com/wp-content/uploads/2025/03/image-2-300x167.png 300w, https://www.oliviertravers.com/wp-content/uploads/2025/03/image-2-624x347.png 624w" sizes="auto, (max-width: 731px) 100vw, 731px" /></a><figcaption class="wp-element-caption">Background removal + dynamic border and shadow, using just two OBS filters.</figcaption></figure>



<p>And here&#8217;s fancier code, also courtesy of Claude Sonnet, for a more dynamic pulsating feel:</p>



<pre class="wp-block-code"><code>// User-configurable parameters
uniform float speed = 1.0;         // Animation speed multiplier (0.1 - 3.0)
uniform float thickness = 3.0;     // Base outline thickness (1.0 - 10.0)
uniform float ripple_amount = 1.0; // Ripple effect intensity (0.0 - 2.0)
uniform float pulse_amount = 1.0;  // Breathing/pulse effect intensity (0.0 - 2.0)
uniform float shadow_size = 4.0;   // Shadow size multiplier (0.0 - 10.0)
uniform float shadow_alpha = 0.7;  // Shadow opacity (0.0 - 1.0)
uniform float color_speed = 1.0;   // Color cycling speed (0.0 - 3.0)
uniform float color_intensity = 0.3; // Color intensity (0.0 - 1.0)
uniform float aa_amount = 1.0;     // Anti-aliasing amount (0.0 - 2.0)

float4 mainImage(VertData v_in) : TARGET
{
    float2 uv = v_in.uv;
    float4 color = image.Sample(textureSampler, uv);

    // Time-based variables for animation - now affected by speed control
    float time = elapsed_time * speed;
    float colorCycle = (sin(time * color_speed) + 1.0) * 0.5;

    // Enhanced breathing effect for outline thickness - now with configurable intensity
    float breathePrimary = sin(time * 0.7) * 0.4 * pulse_amount;
    float breatheSecondary = sin(time * 1.1) * 0.2 * pulse_amount;
    float breathe = 1.0 + breathePrimary + breatheSecondary;

    // Width oscillation - with configurable pulse amount
    float pulseIntensity = 0.5 * pulse_amount;
    float widthPulseH = 1.0 + sin(time * 0.8) * pulseIntensity;
    float widthPulseV = 1.0 + sin(time * 0.6) * pulseIntensity;

    // Ripple effect - configurable intensity
    float rippleSpeed = 1.0 * speed; 
    float rippleFreq = 5.0;
    float ripple = sin(time * rippleSpeed + length(uv - 0.5) * rippleFreq) * 0.5 * ripple_amount + 0.5;

    // Define outline properties with dynamic effects and user-defined thickness
    float baseThickness = 0.001 * thickness;
    float outlineThicknessH = baseThickness * breathe * widthPulseH;
    float outlineThicknessV = baseThickness * breathe * widthPulseV;
    float shadowOffset = 0.001 * shadow_size * (1.0 + ripple * 0.3);

    // Enhanced color cycling with configurable intensity
    float r = 0.7 + color_intensity * sin(time * 0.6 * color_speed);
    float g = 0.7 + color_intensity * sin(time * 0.8 * color_speed + 2.0);
    float b = 0.7 + color_intensity * sin(time * 0.7 * color_speed + 4.0);
    float4 outlineColor = float4(r, g, b, 1.0);

    // Dynamic shadow color with configurable alpha
    float4 shadowColor = float4(b * 0.3, r * 0.3, g * 0.3, shadow_alpha);

    // Anti-aliased edge detection using soft transitions instead of hard edges
    float edgeStrength = 0.0;
    float threshold = 0.1;
    float smoothAmount = 0.02 * aa_amount; // Adjustable smoothing amount
    
    // Sample in 8 directions
    float4 sampleN = image.Sample(textureSampler, uv + float2(0, outlineThicknessV));
    float4 sampleS = image.Sample(textureSampler, uv - float2(0, outlineThicknessV));
    float4 sampleE = image.Sample(textureSampler, uv + float2(outlineThicknessH, 0));
    float4 sampleW = image.Sample(textureSampler, uv - float2(outlineThicknessH, 0));
    float4 sampleNE = image.Sample(textureSampler, uv + float2(outlineThicknessH, outlineThicknessV) * 0.7);
    float4 sampleSE = image.Sample(textureSampler, uv + float2(outlineThicknessH, -outlineThicknessV) * 0.7);
    float4 sampleSW = image.Sample(textureSampler, uv + float2(-outlineThicknessH, -outlineThicknessV) * 0.7);
    float4 sampleNW = image.Sample(textureSampler, uv + float2(-outlineThicknessH, outlineThicknessV) * 0.7);
    
    // Calculate edge strength using smoothstep for each sample direction
    edgeStrength = max(edgeStrength, smoothstep(threshold - smoothAmount, threshold + smoothAmount, abs(sampleN.a - color.a)));
    edgeStrength = max(edgeStrength, smoothstep(threshold - smoothAmount, threshold + smoothAmount, abs(sampleS.a - color.a)));
    edgeStrength = max(edgeStrength, smoothstep(threshold - smoothAmount, threshold + smoothAmount, abs(sampleE.a - color.a)));
    edgeStrength = max(edgeStrength, smoothstep(threshold - smoothAmount, threshold + smoothAmount, abs(sampleW.a - color.a)));
    edgeStrength = max(edgeStrength, smoothstep(threshold - smoothAmount, threshold + smoothAmount, abs(sampleNE.a - color.a)));
    edgeStrength = max(edgeStrength, smoothstep(threshold - smoothAmount, threshold + smoothAmount, abs(sampleSE.a - color.a)));
    edgeStrength = max(edgeStrength, smoothstep(threshold - smoothAmount, threshold + smoothAmount, abs(sampleSW.a - color.a)));
    edgeStrength = max(edgeStrength, smoothstep(threshold - smoothAmount, threshold + smoothAmount, abs(sampleNW.a - color.a)));
    
    // Only consider it an edge if the alpha in the current pixel is significant
    edgeStrength = edgeStrength * step(0.1, color.a);
    
    // Determine if it&#039;s an edge for later use
    bool isEdge = edgeStrength &gt; 0.0;

    // Dynamic shadow with configurable offset
    bool isShadow = false;
    float shadowDir = time * 0.5; // Rotating shadow direction
    float2 shadowVector = float2(cos(shadowDir), sin(shadowDir)) * shadowOffset * (1.0 + 0.2 * sin(time * 1.0));

    if (color.a &lt; 0.1) {
        float4 shadowSample = image.Sample(textureSampler, uv - shadowVector);
        if (shadowSample.a &gt; 0.1) {
            isShadow = true;
        }
    }

    // Apply effects with anti-aliasing
    if (edgeStrength &gt; 0.0 &amp;&amp; color.a &gt; 0.1) {
        // Blend between original color and outline color based on edge strength
        return lerp(color, outlineColor, edgeStrength);
    }
    else if (isShadow) {
        // For shadows, we can also make them smoother
        float4 sampledColor = image.Sample(textureSampler, uv - shadowVector * 0.5);
        float shadowStrength = smoothstep(0.0, 0.1 * aa_amount, sampledColor.a);
        return lerp(color, shadowColor, shadowStrength * shadow_alpha);
    }

    return color;
}</code></pre>



<p>This even comes with user-selectable inputs at the bottom of the filter pane:</p>



<figure class="wp-block-image size-full"><a href="https://www.oliviertravers.com/wp-content/uploads/2025/03/image-3.png"><img loading="lazy" decoding="async" width="936" height="368" src="https://www.oliviertravers.com/wp-content/uploads/2025/03/image-3.png" alt="" class="wp-image-11729" srcset="https://www.oliviertravers.com/wp-content/uploads/2025/03/image-3.png 936w, https://www.oliviertravers.com/wp-content/uploads/2025/03/image-3-300x118.png 300w, https://www.oliviertravers.com/wp-content/uploads/2025/03/image-3-768x302.png 768w, https://www.oliviertravers.com/wp-content/uploads/2025/03/image-3-624x245.png 624w" sizes="auto, (max-width: 936px) 100vw, 936px" /></a></figure><p>The post <a href="https://www.oliviertravers.com/how-add-dynamic-outline-odd-webcam-shape-obs-nvidia-broadcast/">How to Add a Dynamic Outline to an Odd Webcam Shape in OBS</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.oliviertravers.com/how-add-dynamic-outline-odd-webcam-shape-obs-nvidia-broadcast/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">11721</post-id>	</item>
		<item>
		<title>The Art of High-Stakes Negotiation: An AI-Powered Analysis of the Trump-Zelenskyy-Vance White House Meeting, Feb. 28 2025</title>
		<link>https://www.oliviertravers.com/art-high-stakes-negotiation-ai-analysis-trump-zelenskyy-vance-white-house-2025/</link>
					<comments>https://www.oliviertravers.com/art-high-stakes-negotiation-ai-analysis-trump-zelenskyy-vance-white-house-2025/#comments</comments>
		
		<dc:creator><![CDATA[otravers]]></dc:creator>
		<pubDate>Sat, 01 Mar 2025 21:12:30 +0000</pubDate>
				<category><![CDATA[best & worst practices]]></category>
		<category><![CDATA[cool tools]]></category>
		<guid isPermaLink="false">https://www.oliviertravers.com/?p=11704</guid>

					<description><![CDATA[<p>This post is an experiment and demonstration of where state of the art LLMs are currently at, and the type of use cases I use them for, though my stakes... <a href="https://www.oliviertravers.com/art-high-stakes-negotiation-ai-analysis-trump-zelenskyy-vance-white-house-2025/">Read more &#187;</a></p>
<p>The post <a href="https://www.oliviertravers.com/art-high-stakes-negotiation-ai-analysis-trump-zelenskyy-vance-white-house-2025/">The Art of High-Stakes Negotiation: An AI-Powered Analysis of the Trump-Zelenskyy-Vance White House Meeting, Feb. 28 2025</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>This post is an experiment and demonstration of where state of the art LLMs are currently at, and the type of use cases I use them for, though my stakes are not quite as high!</p>



<p>If this is what an LLM can do just a few years into this technology being invented, imagine what we&#8217;ll be able to do as their multimodal capabilities grow. Look at the nonverbal communication in the picture above, add analysis of voice tone and other inputs, and infinite context&#8230; with such capabilities becoming closer every day, we&#8217;ll soon live in a very different world.</p>



<p>This is also supporting material for my own growth. I often role play situations like this in my head to hone my own negotiation skills and learn from the mistakes made by others. What would I have done differently? Would I have picked up on the critical elements likely to lead to a fruitful outcome? Is a negotiation about scoring points and &#8220;being right&#8221; or about reaching an ulterior goal? Would I navigate multicultural and multilingual aspects with the required finesse and understanding?</p>



<p>Let&#8217;s please keep any conversation in the comments about AI as a tool, not whether you have Trump Derangement Syndrome, Biden Derangement Syndrome, or any other similar syndrome! I&#8217;m using AI as a tool to take distance from my own biases and blindspots and help me look at difficult subjects more objectively, so let&#8217;s keep it civil.</p>



<h1 class="wp-block-heading">1. Methodology</h1>



<p>I first generated a transcript from the entire 50-minute meeting from YouTube recording since I could find only partial transcripts and nothing official, using <a href="https://github.com/kimtaeyoon83/mcp-server-youtube-transcript" title="">this MCP</a>.</p>



<p>I then ran in Claude Sonnet 3.7 a meeting analysis prompt I use for business meetings, slightly edited to 1) adding international diplomacy to the agent’s expertise, and 2) asking it to limit its analysis to the transcript without tapping any of its preconceived knowledge of the participants, an instruction I have no way of knowing whether it followed, but you’ll see that the model’s answers do seem grounded on the transcript.</p>



<p>I then continued prompting in the same chat (i.e. with accruing context). This was done on March 1<sup>st</sup> using Claude Desktop on Windows, I have a paid subscription to the entire context window was preserved.</p>



<p>Update: Alibaba released <a href="https://github.com/HumanMLLM/R1-Omni">R1-Omni: Explainable Omni-Multimodal Emotion Recognition with Reinforcement Learning</a>, &#8220;the industry’s first application of Reinforcement Learning with Verifiable Reward (RLVR) to an Omni-multimodal large language model. We focus on emotion recognition, a task where both visual and audio modalities play crucial roles, to validate the potential of combining RLVR with Omni model.&#8221;</p>



<h1 class="wp-block-heading">2. Summary Analysis</h1>



<h2 class="wp-block-heading">2.1. Executive Summary</h2>



<p>The meeting between Donald Trump and Volodymyr Zelenskyy primarily focused on negotiating an agreement regarding rare earth minerals from Ukraine and discussing potential peace negotiations to end the Russia-Ukraine conflict. The meeting was moderately productive in confirming an agreement to be signed but largely inconclusive regarding concrete peace terms.</p>



<h2 class="wp-block-heading">2.2. Major Constraints and Concerns</h2>



<ul class="wp-block-list">
<li>Security guarantees for Ukraine (Zelenskyy insisted these are essential; Trump considered them &#8220;2% of the problem&#8221;)</li>



<li>Casualty figures: 2,000-3,000 soldiers dying weekly according to Trump</li>



<li>Financial burden: $350 billion in US aid mentioned by Trump</li>



<li>Historical context: Zelenskyy noted Russia has broken ceasefires 25 times since 2014</li>



<li>Russian abduction of 20,000 Ukrainian children mentioned by Zelenskyy</li>



<li>US concerns about Ukrainian gratitude for military aid</li>
</ul>



<h2 class="wp-block-heading">2.3. Key Numbers</h2>



<ul class="wp-block-list">
<li>$350 billion in US aid to Ukraine under Biden administration (Trump&#8217;s claim)</li>



<li>4,000+ Ukrainian prisoners exchanged/released</li>



<li>700,000 Russian casualties claimed by Zelenskyy</li>



<li>25 broken ceasefires since 2014 claimed by Zelenskyy</li>



<li>20,000 Ukrainian children allegedly taken to Russia</li>
</ul>



<p>The meeting started diplomatically but deteriorated into a tense exchange, concluding with demands that Zelenskyy express more gratitude for US support.</p>



<h2 class="wp-block-heading">2.4. Action Items</h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><td><strong>Item</strong></td><td><strong>Owner</strong></td><td><strong>Timeframe</strong></td><td><strong>Dependencies</strong></td></tr></thead><tbody><tr><td>Sign rare earth minerals agreement</td><td>Trump &amp; Zelenskyy</td><td>Immediate (&#8220;after lunch&#8221;)</td><td>None mentioned</td></tr><tr><td>Continue Russia-Ukraine peace negotiations</td><td>Trump</td><td>Ongoing (Trump mentioned recent call with Putin)</td><td>Cooperation from Putin</td></tr><tr><td>Establish LNG terminals in Ukraine</td><td>Mentioned in framework</td><td>Future (post-agreement)</td><td>Agreement signing</td></tr><tr><td>Exchange drone technology licenses</td><td>US &amp; Ukraine</td><td>Future (mentioned as intent)</td><td>None specified</td></tr><tr><td>Secure European security guarantees</td><td>Trump with European allies</td><td>After deal negotiation</td><td>Participation from France &amp; UK</td></tr><tr><td>Continue military aid to Ukraine</td><td>US</td><td>Ongoing (Trump confirmed this would continue)</td><td>None specified</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">2.5. Decision Makers</h2>



<ul class="wp-block-list">
<li>Donald Trump (US position and peace negotiations with Putin)</li>



<li>Volodymyr Zelenskyy (Ukrainian requirements)</li>



<li>Vladimir Putin (not present, but mentioned as key to any deal)</li>



<li>European allies (France and UK mentioned as potential security guarantors)</li>
</ul>



<h2 class="wp-block-heading">2.6. Sentiment Analysis</h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><td><strong>Participant</strong></td><td><strong>Motives</strong></td><td><strong>Enthusiasm</strong></td><td><strong>Major Reservations</strong></td></tr></thead><tbody><tr><td>Donald Trump</td><td>End the war quickly; secure rare earth minerals; appear as peacemaker superior to Biden; reduce US financial burden</td><td>High for deal-making; moderate for continued aid</td><td>Cost of supporting Ukraine; perceived lack of gratitude; believes security guarantees are secondary</td></tr><tr><td>Volodymyr Zelenskyy</td><td>Secure continued US support; obtain firm security guarantees; protect Ukraine&#8217;s territorial integrity</td><td>High for technology exchange and joint security arrangements</td><td>Strong concerns about Russia breaking ceasefires; worried about insufficient security guarantees; concerned about territorial compromise</td></tr><tr><td>JD Vance</td><td>Support Trump&#8217;s position; question Ukraine&#8217;s appreciation of US aid</td><td>Low for unconditional support of Ukraine</td><td>Critical of Ukraine&#8217;s war conduct; suspicious of Ukrainian propaganda; concerned about US being drawn further into conflict</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">2.7. Interpersonal Dynamics</h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><td><strong>Participant</strong></td><td><strong>Position</strong></td><td><strong>Interruption Behavior</strong></td><td><strong>Question vs Statement</strong></td><td><strong>Repetition Patterns</strong></td><td><strong>Speaking Time</strong></td><td><strong>Talk:Listen Ratio</strong></td></tr></thead><tbody><tr><td>Donald Trump</td><td>Clearly positioned as in charge; frames himself as mediator between Ukraine and Russia</td><td>Frequently interrupts Zelenskyy, especially when discussing Russian untrustworthiness</td><td>Makes statements more than asks questions; questions are often rhetorical</td><td>Repeatedly states &#8220;if I were president this war would have never happened&#8221;; emphasizes Ukraine &#8220;doesn&#8217;t have the cards&#8221;; repeats deal-making abilities</td><td>Dominant (approximately 60%)</td><td>3:1</td></tr><tr><td>Volodymyr Zelenskyy</td><td>Positioned as supplicant but attempts to assert Ukraine&#8217;s agency</td><td>Rarely interrupts Trump; attempts to complete thoughts when interrupted</td><td>Asks few questions; primarily makes statements about Ukraine&#8217;s situation</td><td>Repeatedly emphasizes security concerns and Russia&#8217;s history of breaking agreements</td><td>Secondary (approximately 35%)</td><td>1:2</td></tr><tr><td>JD Vance</td><td>Positioned as supporting Trump</td><td>Interrupts Zelenskyy multiple times in final exchange</td><td>Makes statements rather than asks questions; uses rhetorical questions to attack</td><td>Repeats demands for gratitude</td><td>Brief but impactful (approximately 5%)</td><td>4:1</td></tr></tbody></table></figure>



<p><strong>Power dynamics assessment:</strong> Trump clearly establishes dominance through controlling conversation flow, speaking volume, and repeatedly emphasizing US leverage over Ukraine. The meeting shows deteriorating respect levels, with Trump and Vance openly demanding expressions of gratitude from Zelenskyy by the conclusion.</p>



<h2 class="wp-block-heading">2.8. Rational and Emotional Intelligence Assessment</h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><td><strong>Participant</strong></td><td><strong>Rational Intelligence</strong></td><td><strong>Emotional Intelligence</strong></td></tr></thead><tbody><tr><td>Donald Trump</td><td>Demonstrates strategic thinking about deal-making; focuses on practical outcomes and cost-benefit analysis; sometimes makes absolute statements without nuance</td><td>Limited ability to understand Zelenskyy&#8217;s security concerns; becomes defensive when challenged; struggles to maintain diplomatic tone when frustrated; shows transactional approach to relationships</td></tr><tr><td>Volodymyr Zelenskyy</td><td>Shows detailed understanding of historical context and regional security dynamics; presents logical arguments about Russia&#8217;s past behavior; articulates complex national security concerns</td><td>Displays emotion when discussing Ukrainian casualties and children; attempts to manage deteriorating conversation dynamics; shows restraint in increasingly hostile environment; struggles to adapt approach when meeting turns confrontational</td></tr><tr><td>JD Vance</td><td>Makes focused arguments about US support and diplomatic approach; frames issues in terms of concrete national interests</td><td>Shows limited empathy for Ukraine&#8217;s security concerns; adopts confrontational stance; appears uninterested in de-escalating tension; prioritizes ideological position over relationship-building</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">2.9. Speaking Style and Language Proficiency Analysis</h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><td><strong>Speaker</strong></td><td><strong>English Proficiency</strong></td><td><strong>Speaking Style</strong></td><td><strong>Educational Level</strong></td><td><strong>Words/Minute</strong></td><td><strong>Articulation</strong></td><td><strong>Filler Words</strong></td><td><strong>Engagement</strong></td></tr></thead><tbody><tr><td>Donald Trump</td><td>Native speaker</td><td>Informal, conversational; repetitive phrasing; simple sentence structure; frequent use of superlatives; stream-of-consciousness tangents</td><td>Undergraduate level communication; sophisticated in negotiation tactics</td><td>Moderate-high rate with many repetitions</td><td>Variable clarity; makes absolute statements; uses simple vocabulary with occasional specialized terms</td><td>&#8220;Very,&#8221; &#8220;tremendous,&#8221; &#8220;great,&#8221; &#8220;a lot&#8221;</td><td>Uses humor, provocative statements, and personal anecdotes to maintain attention</td></tr><tr><td>Volodymyr Zelenskyy</td><td>Advanced non-native</td><td>Direct; logical progression; some grammatical errors typical of Slavic speakers; struggles when emotional</td><td>Educated professional communication with occasional limitations due to language</td><td>Slower than native speakers; more deliberate</td><td>Generally clear despite language limitations; uses simpler vocabulary but expresses complex ideas</td><td>&#8220;Yes,&#8221; &#8220;really,&#8221; &#8220;of course,&#8221; &#8220;you know&#8221;</td><td>Relies on concrete examples and emotional appeals</td></tr><tr><td>JD Vance</td><td>Native speaker</td><td>Formal; structured; direct; confrontational</td><td>Advanced education evident in vocabulary and sentence structure</td><td>High rate of information delivery</td><td>Clear and precise; uses more complex vocabulary and structured arguments</td><td>Few filler words; disciplined speech</td><td>Uses pointed questions and challenges</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">2.10. Personality Type Assessment</h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><td><strong>Participant</strong></td><td><strong>Enneagram Type</strong></td><td><strong>Myers-Briggs Type</strong></td></tr></thead><tbody><tr><td>Donald Trump</td><td><a href="https://www.enneagraminstitute.com/type-8">Type 8: The Challenger</a> &#8211; Assertive, protective of interests, desires control, confrontational when challenged</td><td><a href="https://www.myersbriggs.org/my-mbti-personality-type/mbti-basics/the-16-mbti-types.htm">ESTP: The Entrepreneur</a> &#8211; Action-oriented, pragmatic, direct, present-focused</td></tr><tr><td>Volodymyr Zelenskyy</td><td><a href="https://www.enneagraminstitute.com/type-6">Type 6: The Loyalist</a> &#8211; Security-focused, anticipates problems, concerned with loyalty and commitments</td><td><a href="https://www.myersbriggs.org/my-mbti-personality-type/mbti-basics/the-16-mbti-types.htm">ENFJ: The Protagonist</a> &#8211; People-oriented, value-driven, concerned with long-term outcomes</td></tr><tr><td>JD Vance</td><td><a href="https://www.enneagraminstitute.com/type-1">Type 1: The Reformer</a> &#8211; Principled, critical, focused on right/wrong judgments</td><td><a href="https://www.myersbriggs.org/my-mbti-personality-type/mbti-basics/the-16-mbti-types.htm">ISTJ: The Inspector</a> &#8211; Logical, factual, direct, tradition-oriented</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">2.11. Most Frequently Used Words</h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><td><strong>Word</strong></td><td><strong>Trump</strong></td><td><strong>Zelenskyy</strong></td><td><strong>Vance</strong></td><td><strong>Total</strong></td></tr></thead><tbody><tr><td>deal</td><td>29</td><td>4</td><td>1</td><td>34</td></tr><tr><td>going/gonna</td><td>28</td><td>5</td><td>0</td><td>33</td></tr><tr><td>people/soldiers</td><td>15</td><td>16</td><td>1</td><td>32</td></tr><tr><td>Russia/Putin</td><td>16</td><td>14</td><td>0</td><td>30</td></tr><tr><td>security</td><td>15</td><td>11</td><td>0</td><td>26</td></tr><tr><td>Ukraine/Ukrainian</td><td>5</td><td>18</td><td>2</td><td>25</td></tr><tr><td>think</td><td>18</td><td>6</td><td>1</td><td>25</td></tr><tr><td>want/wanted</td><td>16</td><td>7</td><td>0</td><td>23</td></tr><tr><td>stop/end</td><td>12</td><td>9</td><td>1</td><td>22</td></tr><tr><td>great/tremendous</td><td>19</td><td>2</td><td>0</td><td>21</td></tr><tr><td>America/US/United States</td><td>6</td><td>7</td><td>6</td><td>19</td></tr><tr><td>war</td><td>7</td><td>9</td><td>2</td><td>18</td></tr><tr><td>thank/thankful</td><td>10</td><td>5</td><td>2</td><td>17</td></tr><tr><td>cards</td><td>12</td><td>1</td><td>0</td><td>13</td></tr><tr><td>broken/broke</td><td>2</td><td>9</td><td>0</td><td>11</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">2.12. Meeting Productivity Assessment</h2>



<p>The meeting achieved limited productivity with significant missed opportunities:</p>



<h3 class="wp-block-heading">2.12.1. Possible Improvements</h3>



<ol start="1" class="wp-block-list">
<li><strong>Donald Trump</strong> could have acknowledged Zelenskyy&#8217;s security concerns more substantively instead of dismissing them as secondary. His focus on gratitude undermined relationship-building necessary for complex negotiations.</li>



<li><strong>Volodymyr Zelenskyy</strong> could have more explicitly acknowledged US support earlier in the meeting to establish goodwill before presenting concerns. His direct criticism of potential ceasefire without guarantees created defensive reactions.</li>



<li><strong>JD Vance&#8217;s</strong> confrontational approach escalated tensions rather than facilitating productive dialogue.</li>
</ol>



<p>The meeting lacked:</p>



<ul class="wp-block-list">
<li>A clear, shared agenda</li>



<li>Established ground rules for discussion</li>



<li>Balance between relationship-building and substantive negotiation</li>



<li>Mediating presence to manage emerging tensions</li>
</ul>



<h2 class="wp-block-heading">2.13. Subtext and Unstated Elements</h2>



<h3 class="wp-block-heading">2.13.1. Left Unsaid But Inferred</h3>



<ul class="wp-block-list">
<li>Trump appears motivated by positioning himself as a superior deal-maker to Biden rather than addressing Ukraine&#8217;s specific security concerns</li>



<li>Zelenskyy seems concerned about being pressured into a disadvantageous peace agreement that would threaten Ukraine&#8217;s territorial integrity</li>



<li>Significant divergence in how each side defines &#8220;winning&#8221; in the conflict</li>



<li>Fundamental disconnect in how each values the relationship: Trump views it transactionally while Zelenskyy seeks partnership</li>
</ul>



<h3 class="wp-block-heading">2.13.2. Manipulative Language Patterns</h3>



<ul class="wp-block-list">
<li>Trump&#8217;s repeated emphasis that Ukraine &#8220;doesn&#8217;t have the cards&#8221; establishes power differential and applies pressure</li>



<li>Trump&#8217;s personalization of diplomatic relations with Putin (&#8220;he respects me&#8221;) sidesteps institutional concerns</li>



<li>Framing of gratitude as prerequisite for continued support creates leverage</li>



<li>Positioning Zelenskyy as &#8220;ungrateful&#8221; undermines his legitimate security concerns</li>



<li>Trump&#8217;s use of &#8220;we&#8221; when referring to Ukrainian casualties creates false equivalence</li>
</ul>



<h2 class="wp-block-heading">2.14. Interaction Matrix</h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><td><strong>Participant</strong></td><td><strong>Trump</strong></td><td><strong>Zelenskyy</strong></td><td><strong>Vance</strong></td></tr></thead><tbody><tr><td><strong>Trump</strong></td><td>&#8211;</td><td>9</td><td>3</td></tr><tr><td><strong>Zelenskyy</strong></td><td>9</td><td>&#8211;</td><td>5</td></tr><tr><td><strong>Vance</strong></td><td>3</td><td>5</td><td>&#8211;</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">2.15. Perception Matrix</h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><td><strong>How X views →</strong></td><td><strong>Trump</strong></td><td><strong>Zelenskyy</strong></td><td><strong>Vance</strong></td></tr></thead><tbody><tr><td><strong>Trump</strong></td><td>&#8211;</td><td>Ungrateful but with brave soldiers; in weak position needing US help</td><td>Supportive ally</td></tr><tr><td><strong>Zelenskyy</strong></td><td>Potential ally with leverage who misunderstands security situation</td><td>&#8211;</td><td>Hostile, dismissive of Ukraine&#8217;s struggles</td></tr><tr><td><strong>Vance</strong></td><td>Leader to support and reinforce</td><td>Ungrateful for US support; manipulative</td><td>&#8211;</td></tr></tbody></table></figure>



<h1 class="wp-block-heading">3. Deal-Making Intentions of Each Party</h1>



<p>Based solely on the transcript, each participant showed different levels of commitment to making a deal, with significant variations in what they considered an acceptable agreement:</p>



<h2 class="wp-block-heading">3.1. Donald Trump</h2>



<h3 class="wp-block-heading">3.1.1. Evidence of Genuine Deal-making Interest</h3>



<ul class="wp-block-list">
<li>Repeatedly emphasized his desire to &#8220;get it over with&#8221; and stop the fighting</li>



<li>Presented himself as uniquely qualified: &#8220;I know pretty good&#8230; my whole life is deals&#8221;</li>



<li>Claimed to have spoken with Putin &#8220;a couple of days ago&#8221; about making a deal</li>



<li>Expressed concern about casualties: &#8220;2,000-3,000 a week&#8230; I don&#8217;t want to have that&#8221;</li>



<li>Stated &#8220;We&#8217;re going to sign the agreement at the conference in the East Room&#8221;</li>
</ul>



<h3 class="wp-block-heading">3.1.2. Contradictory Signals</h3>



<ul class="wp-block-list">
<li>Showed limited patience for negotiating complex security arrangements: &#8220;I don&#8217;t want to talk about security yet because I want to get the deal done&#8230; security is so easy that&#8217;s about 2% of the problem&#8221;</li>



<li>Issued conditional ultimatum: &#8220;You&#8217;re either going to make a deal or we&#8217;re out&#8221;</li>



<li>Focused more on Ukraine&#8217;s expression of gratitude than addressing their security concerns</li>



<li>Emphasized the transactional nature of support: &#8220;Without us you don&#8217;t have any cards&#8221;</li>



<li>Used the meeting to criticize Biden rather than advancing specific deal parameters</li>
</ul>



<p><strong>Assessment:</strong> Trump appeared primarily interested in securing the rare earth minerals agreement (which was apparently ready to sign) and claiming a diplomatic achievement. His interest in a comprehensive Russia-Ukraine peace deal seemed genuine but conditional on minimal US security commitments and rapid conclusion. His approach suggested preference for a deal on his terms rather than addressing the complex security concerns that would make a sustainable agreement possible.</p>



<h2 class="wp-block-heading">3.2. Volodymyr Zelenskyy</h2>



<h3 class="wp-block-heading">3.2.1. Evidence of Genuine Deal-making Interest</h3>



<ul class="wp-block-list">
<li>Explicitly stated: &#8220;Ukraine more than ukrainians nobody want to stop this war&#8221;</li>



<li>Expressed hope that the document would be &#8220;first step to real security guarantees&#8221;</li>



<li>Showed flexibility in offering to share drone technology licenses with the US</li>



<li>Displayed willingness to discuss LNG terminals and energy cooperation</li>



<li>Demonstrated willingness to engage with Trump despite increasingly hostile exchanges</li>
</ul>



<h3 class="wp-block-heading">3.2.2. Contradictory Signals</h3>



<ul class="wp-block-list">
<li>Firmly stated: &#8220;No compromises with the killer about our territories&#8221;</li>



<li>Repeatedly emphasized that security guarantees are essential: &#8220;ceasefire will not never work without security guarantees&#8221;</li>



<li>Expressed fundamental distrust of Putin: &#8220;he broken 25 times his own signature&#8221;</li>



<li>Presented evidence of Russian atrocities against POWs, suggesting deep skepticism about Russian intentions</li>



<li>Insisted: &#8220;This document maybe other documents it&#8217;s a very good Star very good but it will not enough to stop this person [Putin]&#8221;</li>
</ul>



<p><strong>Assessment:</strong> Zelenskyy appeared genuinely interested in ending the war but not at any cost. His conception of an acceptable deal absolutely required robust security guarantees and protection of Ukrainian sovereignty. His position was consistent that a simple ceasefire without enforcement mechanisms would fail based on historical precedent. He was prepared to make the rare earth minerals deal but saw it as insufficient for resolving the broader conflict.</p>



<h2 class="wp-block-heading">3.3. JD Vance</h2>



<h3 class="wp-block-heading">3.3.1. Evidence of Genuine Deal-making Interest</h3>



<ul class="wp-block-list">
<li>Defended diplomatic engagement with Russia: &#8220;The path to peace and the path to Prosperity is maybe engaging in diplomacy&#8221;</li>



<li>Criticized previous administration&#8217;s approach as ineffective</li>



<li>Supported Trump&#8217;s diplomatic efforts verbally</li>
</ul>



<h3 class="wp-block-heading">3.3.2. Contradictory Signals</h3>



<ul class="wp-block-list">
<li>Showed minimal engagement with the actual terms of any deal</li>



<li>Focused criticism on Ukraine rather than advancing compromise positions</li>



<li>Accused Ukraine of propaganda and conscription problems rather than discussing deal parameters</li>



<li>Most interventions centered on demanding gratitude rather than substantive negotiation</li>
</ul>



<p><strong>Assessment:</strong> Vance appeared more interested in supporting Trump&#8217;s position and criticizing Ukraine than in the specific parameters of any deal. His contributions didn&#8217;t advance substantive discussion of what a workable agreement might entail.</p>



<h2 class="wp-block-heading">3.4. Overall Deal Dynamic</h2>



<p>The transcript reveals fundamental disconnects in what each party considered a viable deal:</p>



<ol start="1" class="wp-block-list">
<li><strong>Trump</strong> wanted a quick agreement that would end the fighting and reduce US financial burden, with minimal ongoing security commitments, while securing rare earth mineral access.</li>



<li><strong>Zelenskyy</strong> wanted a sustainable peace with strong security guarantees that would prevent Russia from attacking again, protect Ukrainian sovereignty, and ensure continued US support.</li>



<li>The <strong>rare earth minerals agreement</strong> appeared to be ready for signing, representing a tangible economic deal both parties supported.</li>



<li>The <strong>broader peace deal</strong> remained aspirational with major unresolved differences regarding security guarantees, territorial issues, and enforcement mechanisms.</li>
</ol>



<p>These divergent expectations created significant tension, particularly as Trump insisted on Ukraine&#8217;s gratitude while being unwilling to provide the security assurances Zelenskyy considered essential. This fundamental misalignment in priorities suggests that while both Trump and Zelenskyy genuinely wanted &#8220;a deal,&#8221; they had very different conceptions of what that deal should entail, making a comprehensive agreement unlikely without significant compromise from one or both parties.</p>



<h1 class="wp-block-heading">4. Who Needs Who: Power Dynamics Analysis</h1>



<p>Based solely on the transcript, the dependency relationship is asymmetric but more complex than it initially appears:</p>



<h2 class="wp-block-heading">4.1. Short-Term Power Dynamics</h2>



<h3 class="wp-block-heading">4.1.1. Ukraine&#8217;s Immediate Dependency on the US</h3>



<p>The transcript clearly shows Ukraine&#8217;s critical short-term dependency on the US:</p>



<ul class="wp-block-list">
<li><strong>Military survival:</strong> Trump: &#8220;If you didn&#8217;t have our military equipment this war would have been over in two weeks in three days&#8221;</li>



<li><strong>Financial support:</strong> Trump referenced &#8220;$350 billion&#8221; in US aid</li>



<li><strong>Diplomatic leverage:</strong> Trump positioned himself as the mediator with Putin: &#8220;I&#8217;ve spoken with President Putin and I think&#8230; I feel very strongly that they&#8217;re very serious about it&#8221;</li>



<li><strong>Existential threat:</strong> Trump: &#8220;You don&#8217;t have the cards&#8230; if we&#8217;re out you&#8217;ll fight it out I don&#8217;t think it&#8217;s going to be pretty&#8221;</li>
</ul>



<p>Trump and Vance repeatedly emphasized this dependency, demanding expressions of gratitude and positioning Ukraine as the supplicant in the relationship.</p>



<h3 class="wp-block-heading">4.1.2. US&#8217;s Strategic Interests in Ukraine</h3>



<p>Despite the power imbalance, the transcript reveals several US needs:</p>



<ul class="wp-block-list">
<li><strong>Rare earth minerals:</strong> Trump: &#8220;We needed what they had&#8230; we don&#8217;t have raw Earth&#8230; this has just about every component of the raw Earth that we need for computers for all of the things we do&#8221;</li>



<li><strong>Drone technology:</strong> Zelenskyy: &#8220;We have very good drones production I think the best one in the world for today&#8230; we&#8217;re open to share the licenses&#8221;</li>



<li><strong>Geopolitical achievement:</strong> Trump repeatedly framed ending the war as a major achievement that would distinguish him from Biden</li>
</ul>



<h2 class="wp-block-heading">4.2. Long-Term Strategic Considerations</h2>



<h3 class="wp-block-heading">4.2.1. European Security Framework</h3>



<p>Zelenskyy attempted to reframe the dependency as mutual by emphasizing Ukraine&#8217;s role in European security:</p>



<ul class="wp-block-list">
<li><strong>Forward defense line:</strong> &#8220;We really defend Europe&#8230; all Europeans are really recognized that we are defend in line&#8221;</li>



<li><strong>Future threat:</strong> &#8220;If we will not stay Russia will go further to baltics and to Poland&#8230; when he will go there&#8230; your soldiers will fight&#8221;</li>



<li><strong>Energy security:</strong> &#8220;We have the biggest storage gas storage&#8230; in Europe&#8230; we can help Europe&#8221;</li>
</ul>



<h3 class="wp-block-heading">4.2.2. Prestige and Legacy</h3>



<p>Trump&#8217;s need for a diplomatic achievement was significant:</p>



<ul class="wp-block-list">
<li>Trump: &#8220;This would be a very great achievement if we could get this the war stopped&#8221;</li>



<li>When asked about his legacy: &#8220;I hope I&#8217;ll be known and recognized as a peacemaker&#8221;</li>
</ul>



<h2 class="wp-block-heading">4.3. Conclusion: Asymmetric Interdependence</h2>



<p>The transcript reveals a relationship of asymmetric interdependence:</p>



<ul class="wp-block-list">
<li><strong>Ukraine desperately needs US support</strong> in the immediate term for survival and leverage in any peace negotiations.</li>



<li><strong>The US desires Ukrainian resources and cooperation</strong> but faces fewer immediate consequences if the relationship deteriorates.</li>



<li><strong>Trump personally needs a diplomatic achievement</strong> that would validate his self-perception as a superior deal-maker.</li>
</ul>



<p>The closing exchanges of the meeting reveal Trump&#8217;s attempt to leverage Ukraine&#8217;s greater immediate dependency by demanding expressions of gratitude and threatening withdrawal of support: &#8220;You&#8217;re either going to make a deal or we&#8217;re out.&#8221;</p>



<p>However, Zelenskyy attempted to reframe the relationship by emphasizing Ukraine&#8217;s long-term strategic value to European security and the potential consequences of abandonment, suggesting that while Ukraine&#8217;s need is more urgent, the US and Europe have significant long-term interests at stake.</p>



<p>This power imbalance shapes the entire negotiation dynamic, with Trump repeatedly emphasizing Ukraine&#8217;s dependence while Zelenskyy tries to establish some reciprocity through appeals to broader security concerns and resource sharing.</p>



<h1 class="wp-block-heading">5. Tenability of Positions Given Vital National Interests</h1>



<p>Based solely on the transcript, I&#8217;ll analyze whether each party&#8217;s negotiating position is tenable considering their expressed vital interests:</p>



<h2 class="wp-block-heading">5.1. United States: Partially Untenable Position</h2>



<h3 class="wp-block-heading">5.1.1. Vital Interests Evident from Transcript</h3>



<ol start="1" class="wp-block-list">
<li>Access to Ukrainian rare earth minerals for technology and defense</li>



<li>Reduction of financial burden ($350 billion mentioned)</li>



<li>Quick resolution to the conflict without American casualties</li>



<li>Diplomatic success that contrasts with prior administration</li>



<li>Avoiding potential escalation to &#8220;third world war&#8221;</li>
</ol>



<h3 class="wp-block-heading">5.1.2. Trump&#8217;s Position</h3>



<ul class="wp-block-list">
<li>Push for immediate ceasefire with minimal security guarantees</li>



<li>Secure rare earth minerals agreement</li>



<li>Reduce financial commitment while maintaining some military support</li>



<li>Position as neutral mediator rather than guarantor of Ukraine&#8217;s security</li>
</ul>



<p><strong>Tenability assessment:</strong> This position is <strong>partially untenable</strong> because:</p>



<ul class="wp-block-list">
<li>It achieves the minerals access goal through the ready-to-sign agreement</li>



<li>It potentially reduces financial burden if conflict ends</li>



<li>However, the refusal to address security guarantees undermines the sustainability of any peace deal</li>



<li>If Putin breaks an agreement without robust enforcement mechanisms (as Zelenskyy claims he&#8217;s done 25 times), the conflict would restart, defeating interests #2, #3, and #5</li>



<li>Trump&#8217;s statement: &#8220;If this doesn&#8217;t get solved now it&#8217;s not going to get solved for a long time&#8221; contradicts his approach of deferring security arrangements</li>
</ul>



<p>Trump&#8217;s dismissal of security guarantees as &#8220;2% of the problem&#8221; creates a fundamental contradiction: without mechanisms to secure Ukraine against future Russian aggression, any deal likely becomes unsustainable, undermining his own vital interests in conflict resolution and cost reduction.</p>



<h2 class="wp-block-heading">5.2. Ukraine: Existentially Untenable Position</h2>



<h3 class="wp-block-heading">5.2.1. Vital Interests Evident from Transcript</h3>



<ol start="1" class="wp-block-list">
<li>Survival as a sovereign state</li>



<li>Protection against future Russian aggression</li>



<li>Territorial integrity (&#8220;no compromises with the killer about our territories&#8221;)</li>



<li>Return of prisoners and abducted children</li>



<li>Continued US military support</li>



<li>International coalition backing for security guarantees</li>
</ol>



<h3 class="wp-block-heading">5.2.2. Zelenskyy&#8217;s Position</h3>



<ul class="wp-block-list">
<li>Accept rare earth minerals agreement</li>



<li>Insist on robust security guarantees before accepting ceasefire</li>



<li>Offer drone technology sharing to strengthen relationship</li>



<li>Emphasize Ukraine&#8217;s role in broader European security</li>



<li>Highlight Russia&#8217;s history of breaking agreements</li>
</ul>



<p><strong>Tenability assessment:</strong> This position is <strong>existentially untenable</strong> because:</p>



<ul class="wp-block-list">
<li>Ukraine faces immediate survival challenges without US support</li>



<li>Zelenskyy correctly identifies that without security guarantees, any ceasefire is likely temporary based on historical precedent</li>



<li>However, his firm stance risks alienating Trump, who controls vital military aid</li>



<li>The transcript shows escalating tension as Trump states: &#8220;You&#8217;re either going to make a deal or we&#8217;re out&#8221;</li>



<li>Ukraine lacks alternative sources of support at the scale needed (Zelenskyy: &#8220;without United States they [Europeans] will not be ready to be as strong as we need&#8221;)</li>
</ul>



<p>Zelenskyy&#8217;s insistence on security guarantees is entirely rational given Ukraine&#8217;s vital interests, but the power dynamics revealed in the transcript make this position untenable without Trump&#8217;s cooperation, which appears increasingly unlikely as the meeting progresses.</p>



<h2 class="wp-block-heading">5.3. Russia (as characterized in the transcript)</h2>



<h3 class="wp-block-heading"><strong>5.3.1. Inferred Vital Interests</strong></h3>



<ol start="1" class="wp-block-list">
<li>Reduction of Western sanctions and normalization of relations</li>



<li>Territorial gains in Ukraine</li>



<li>Prevention of Ukraine joining Western security structures</li>



<li>Regime influence in Ukraine</li>
</ol>



<h3 class="wp-block-heading">5.3.2. Putin&#8217;s Position (as described by participants)</h3>



<ul class="wp-block-list">
<li>Willingness to negotiate with Trump</li>



<li>History of breaking previous agreements (according to Zelenskyy)</li>



<li>Continued military pressure during negotiations</li>
</ul>



<p><strong>Tenability assessment:</strong> Russia&#8217;s position appears <strong>highly tenable</strong> in the short term based on the transcript because:</p>



<ul class="wp-block-list">
<li>Trump positions himself as neutral between Ukraine and Russia</li>



<li>Security guarantees are being deferred in negotiations</li>



<li>Ukraine&#8217;s dependency on US support creates leverage for Russia</li>



<li>Trump&#8217;s eagerness for a deal may lead to concessions favorable to Russia</li>
</ul>



<h2 class="wp-block-heading">5.4. Strategic Contradictions</h2>



<p>The core contradiction making these positions untenable is that:</p>



<ol start="1" class="wp-block-list">
<li>Trump wants a quick deal that reduces US costs and brings diplomatic victory</li>



<li>But refuses to address security guarantees that would make such a deal sustainable</li>



<li>Zelenskyy requires security guarantees for Ukraine&#8217;s survival</li>



<li>But lacks leverage to secure them when Trump threatens to withdraw support</li>
</ol>



<p>This creates an impossible negotiating dynamic where:</p>



<ul class="wp-block-list">
<li>A deal without security guarantees won&#8217;t achieve lasting peace (undermining US interests)</li>



<li>But Ukraine can&#8217;t insist on guarantees without risking loss of vital support (undermining Ukrainian interests)</li>
</ul>



<p>The transcript reveals no viable path to reconciling these contradictions, suggesting all parties are pursuing untenable positions relative to their stated vital interests.</p>



<h1 class="wp-block-heading">6. Who Is in the Position to Walk Away: Negotiation Leverage Analysis</h1>



<p>Based solely on the transcript, the ability to walk away from negotiations is dramatically asymmetric:</p>



<h2 class="wp-block-heading">6.1. The United States: Strongest Walk-Away Position</h2>



<h3 class="wp-block-heading">6.1.1. Evidence of Walk-away Power</h3>



<ul class="wp-block-list">
<li>Trump explicitly threatens: &#8220;You&#8217;re either going to make a deal or we&#8217;re out&#8221;</li>



<li>Positions US support as discretionary: &#8220;Hopefully I won&#8217;t have to send very much&#8221;</li>



<li>Frames the relationship as one-sided: &#8220;You don&#8217;t have the cards&#8221;</li>



<li>Demonstrates willingness to accept uncertain outcomes: &#8220;If we can&#8217;t solve it they&#8217;re going to have to fight it out&#8221;</li>



<li>Controls the military aid Ukraine depends on for survival</li>
</ul>



<h3 class="wp-block-heading">6.1.2. Relative Costs of Walking Away</h3>



<ul class="wp-block-list">
<li>Would lose access to rare earth minerals (but this is a future opportunity cost, not an immediate loss)</li>



<li>Potential geopolitical setback if Russia expands influence</li>



<li>Loss of promised Ukrainian drone technology</li>



<li>Possible reputational damage with allies</li>



<li>Trump&#8217;s self-described peacemaker legacy would be damaged</li>
</ul>



<p>These costs are significant but not existential for the US, making Trump&#8217;s walk-away threat credible.</p>



<h2 class="wp-block-heading">6.2. Russia (as characterized in the transcript): Moderate Walk-Away Position</h2>



<h3 class="wp-block-heading">6.2.1. Evidence of Walk-away Power</h3>



<ul class="wp-block-list">
<li>Has sustained conflict for three years despite sanctions</li>



<li>According to Zelenskyy, has broken 25 previous agreements without decisive consequences</li>



<li>Continues military operations during negotiations</li>



<li>Trump acknowledges Putin must agree to any deal: &#8220;I&#8217;ve spoken with President Putin and&#8230; I feel very strongly that they&#8217;re very serious about it&#8221;</li>
</ul>



<h3 class="wp-block-heading">6.2.2. Relative Costs of Walking Away</h3>



<ul class="wp-block-list">
<li>Continued international sanctions</li>



<li>Military casualties (Zelenskyy claims 700,000)</li>



<li>Ongoing war expenditures</li>
</ul>



<p>These are substantial costs, but Russia has demonstrated willingness to bear them for its strategic objectives.</p>



<h2 class="wp-block-heading">6.3. Ukraine: Weakest Walk-Away Position</h2>



<h3 class="wp-block-heading">6.3.1. Evidence of Constrained Walk-away Power</h3>



<ul class="wp-block-list">
<li>Existential dependency on US support: &#8220;If you didn&#8217;t have our military equipment this war would have been over in two weeks&#8221;</li>



<li>No viable alternative source of comparable support</li>



<li>Already suffering severe casualties and destruction</li>



<li>Faces continued Russian aggression if talks fail</li>
</ul>



<h3 class="wp-block-heading">6.3.2. Relative Costs of Walking Away</h3>



<ul class="wp-block-list">
<li>Potential loss of vital military aid</li>



<li>Continued Russian military pressure without adequate defense capabilities</li>



<li>Risk of territorial losses and sovereignty threats</li>



<li>Ongoing civilian casualties and infrastructure destruction</li>
</ul>



<p>The costs for Ukraine are existential, making its walk-away position extremely weak.</p>



<h2 class="wp-block-heading">6.4. Zelenskyy&#8217;s Attempt to Rebalance Leverage</h2>



<p>Despite Ukraine&#8217;s weak position, Zelenskyy attempts to strengthen his walk-away power by:</p>



<ol start="1" class="wp-block-list">
<li>Emphasizing Ukraine&#8217;s strategic value to European security: &#8220;If we will not stay Russia will go further to baltics and to Poland&#8221;</li>



<li>Framing rare earth minerals as mutually beneficial: &#8220;This is important and I think for security of European continent&#8221;</li>



<li>Offering drone technology: &#8220;We have very good drones production I think the best one in the world&#8221;</li>



<li>Warning of reputational costs: &#8220;He broken 25 times&#8230; that&#8217;s why we will never accept just ceasefire&#8221;</li>
</ol>



<p>However, these attempts do little to change the fundamental power imbalance evident throughout the transcript.</p>



<h2 class="wp-block-heading">6.5. Conclusion: Highly Asymmetric Walk-Away Power</h2>



<p>The US holds overwhelming walk-away power in this negotiation, with Trump repeatedly emphasizing this leverage. Ukraine has virtually no viable walk-away option without facing existential threats, creating a fundamentally imbalanced negotiation dynamic where Zelenskyy must attempt to secure vital interests from a position of extreme vulnerability.</p>



<p>This asymmetry explains the transcript&#8217;s increasing tension as Zelenskyy tries to assert core Ukrainian security needs despite lacking the leverage to ensure their inclusion in any agreement.</p>



<h1 class="wp-block-heading">7. Each Party&#8217;s Best Alternative to a Negotiated Agreement</h1>



<p>Based solely on the transcript, here&#8217;s an analysis of each party&#8217;s BATNA (Best Alternative To a Negotiated Agreement) and how it shapes their negotiating leverage:</p>



<h2 class="wp-block-heading">7.1. United States BATNA</h2>



<h3 class="wp-block-heading">7.1.1. If No Deal is Reached, the US Could</h3>



<ul class="wp-block-list">
<li>Continue limited military support to Ukraine (Trump: &#8220;Yeah we&#8217;re going to have arms to Ukraine&#8221;)</li>



<li>Gradually reduce or completely withdraw support (Trump: &#8220;You&#8217;re either going to make a deal or we&#8217;re out&#8221;)</li>



<li>Maintain sanctions on Russia without additional diplomatic engagement</li>



<li>Forgo access to Ukrainian rare earth minerals</li>
</ul>



<h3 class="wp-block-heading">7.1.2. Strength assessment: MODERATE TO STRONG</h3>



<p>Trump&#8217;s statements indicate he views the US BATNA as relatively strong, with limited domestic consequences if talks fail. His explicit threat (&#8220;if we&#8217;re out you&#8217;ll fight it out&#8221;) demonstrates confidence in this position.</p>



<p>Key quote showing BATNA leverage: &#8220;I don&#8217;t think it&#8217;s going to be pretty but you&#8217;ll fight it out but you don&#8217;t have the cards.&#8221;</p>



<h2 class="wp-block-heading">7.2. Ukraine BATNA</h2>



<h3 class="wp-block-heading">7.2.1. If No Deal is Reached, Ukraine Could</h3>



<ul class="wp-block-list">
<li>Continue fighting with uncertain US support levels</li>



<li>Seek increased European assistance (but transcript indicates this is insufficient: &#8220;without United States they will not be ready to be as strong as we need&#8221;)</li>



<li>Eventually face potential territorial losses due to military disadvantage</li>



<li>Attempt to negotiate directly with Russia from a weakened position</li>
</ul>



<h3 class="wp-block-heading">7.2.2. Strength assessment: EXTREMELY WEAK</h3>



<p>Zelenskyy&#8217;s positions throughout reveal awareness of Ukraine&#8217;s catastrophic BATNA, explaining his attempts to emphasize mutual interests despite increasing hostility.</p>



<p>Key quote revealing BATNA weakness: &#8220;If you didn&#8217;t have our military equipment this war would have been over in two weeks in three days.&#8221;</p>



<h2 class="wp-block-heading">7.3. Russia BATNA (as characterized in transcript)</h2>



<h3 class="wp-block-heading">7.3.1. If No Deal is Reached, Russia Could</h3>



<ul class="wp-block-list">
<li>Continue military operations in Ukraine</li>



<li>Wait for Western support to Ukraine to potentially diminish</li>



<li>Maintain territorial gains and political pressure</li>
</ul>



<h3 class="wp-block-heading">7.3.2. Strength assessment: MODERATELY STRONG</h3>



<p>While Putin isn&#8217;t present, the transcript suggests Russia has a sustainable BATNA despite costs. Zelenskyy&#8217;s claim that Putin has broken 25 previous agreements indicates Russia calculates it can weather consequences of failed negotiations.</p>



<p>Key quote indicating Russia&#8217;s BATNA strength: &#8220;Putin today using ballistic on our Hospital schools and Etc ballistic so he knows that we are here and that President Trump is really have good will to stop to stop this war&#8230; so he doesn&#8217;t want to stop.&#8221;</p>



<h2 class="wp-block-heading">7.4. How BATNAs Shape Negotiating Dynamics</h2>



<ol start="1" class="wp-block-list">
<li><strong>US leverage is maximized</strong> by Trump&#8217;s credible portrayal of walking away as acceptable, explaining his dismissal of security guarantees as &#8220;2% of the problem&#8221; and demands for gratitude.</li>



<li><strong>Ukraine&#8217;s negotiating position is fundamentally compromised</strong> by its catastrophic BATNA, creating an impossible situation where Zelenskyy must secure essential security guarantees while lacking leverage to demand them.</li>



<li><strong>Russia benefits from the BATNA imbalance</strong> between US and Ukraine, allowing it to continue military pressure during negotiations without immediate consequences.</li>
</ol>



<p>This BATNA analysis explains the transcript&#8217;s core tension: Zelenskyy desperately needs guarantees Ukraine&#8217;s BATNA cannot secure, while Trump negotiates from the comfort of a viable alternative if talks fail. This fundamental asymmetry makes the increasingly confrontational tone inevitable as Zelenskyy attempts to overcome his structurally weak position through appeals to shared interests and historical precedent.</p>



<h1 class="wp-block-heading">8. Strategic Assessment: Did Parties Optimize Their Approach?</h1>



<p>Based solely on the transcript, here&#8217;s an analysis of how effectively each party pursued their goals and what adjustments might have improved their outcomes:</p>



<h2 class="wp-block-heading">8.1. Donald Trump / United States</h2>



<p><strong>Stated goals:</strong> Sign rare earth minerals agreement; position himself as successful peacemaker; reduce US financial burden; achieve quick conflict resolution; demonstrate superiority to previous administration</p>



<p><strong>Effectiveness assessment:</strong> <strong>PARTIALLY EFFECTIVE</strong></p>



<p><strong>What worked:</strong></p>



<ul class="wp-block-list">
<li>Successfully positioned to sign the minerals agreement (&#8220;We&#8217;re going to sign the agreement at the conference in the East Room&#8221;)</li>



<li>Maintained negotiating leverage by emphasizing Ukraine&#8217;s dependency</li>



<li>Clearly established himself as the central mediator between Ukraine and Russia</li>
</ul>



<p><strong>What undermined his goals:</strong></p>



<ul class="wp-block-list">
<li>Focusing on demanding gratitude rather than substantive security arrangements made a sustainable deal less likely</li>



<li>Antagonistic approach toward Zelenskyy created unnecessary tension that complicated negotiations</li>



<li>Dismissing security concerns as &#8220;2% of the problem&#8221; contradicted his goal of sustainable peace</li>



<li>The increasingly hostile exchange undermined his image as an effective peacemaker</li>
</ul>



<p><strong>Alternative approach:</strong> Trump could have maintained leverage while still acknowledging legitimate security concerns. By saying: &#8220;We&#8217;ll address security guarantees after the basic framework, and I understand why they matter given your experience,&#8221; he could have kept his position while building rapport. Focusing on the shared win of the minerals agreement before addressing contentious issues would have maintained a more productive atmosphere. Instead, his approach made Zelenskyy defensive rather than cooperative.</p>



<h2 class="wp-block-heading">8.2. Volodymyr Zelenskyy / Ukraine</h2>



<p><strong>Stated goals:</strong> Secure continued US support; obtain security guarantees; protect territorial integrity; return prisoners; prevent future Russian aggression</p>



<p><strong>Effectiveness assessment:</strong> <strong>LARGELY INEFFECTIVE</strong></p>



<p><strong>What worked:</strong></p>



<ul class="wp-block-list">
<li>Successfully conveyed Ukraine&#8217;s security concerns with specific historical examples</li>



<li>Effectively highlighted Russia&#8217;s pattern of breaking agreements</li>



<li>Made concrete offers of technology sharing to strengthen relationship</li>



<li>Maintained composure during increasingly hostile exchanges</li>
</ul>



<p><strong>What undermined his goals:</strong></p>



<ul class="wp-block-list">
<li>Failed to explicitly acknowledge US support before raising concerns</li>



<li>Did not adapt approach when meeting tone deteriorated</li>



<li>Directly contradicted Trump multiple times rather than finding areas of agreement first</li>



<li>Did not effectively leverage Ukraine&#8217;s strategic value and rare earth resources</li>
</ul>



<p><strong>Alternative approach:</strong> Given Ukraine&#8217;s weak BATNA, Zelenskyy needed to prioritize relationship-building before substantive demands. Starting with explicit gratitude and emphasizing shared interests in the minerals agreement would have built goodwill. Framing security guarantees as protecting US investment rather than challenging Trump&#8217;s approach might have been more effective. For example: &#8220;We&#8217;re grateful for your support which has been crucial. The minerals agreement is excellent, and to protect that investment, we need to ensure Russia doesn&#8217;t violate the ceasefire as they&#8217;ve done before.&#8221;</p>



<h2 class="wp-block-heading">8.3. JD Vance</h2>



<p><strong>Stated goals:</strong> Support Trump&#8217;s position; emphasize US interests; contrast current approach with previous administration</p>



<p><strong>Effectiveness assessment:</strong> <strong>COUNTERPRODUCTIVE</strong></p>



<p><strong>What worked:</strong></p>



<ul class="wp-block-list">
<li>Successfully reinforced Trump&#8217;s position</li>



<li>Clearly articulated contrast with previous administration&#8217;s approach</li>
</ul>



<p><strong>What undermined larger US goals:</strong></p>



<ul class="wp-block-list">
<li>Confrontational approach toward Zelenskyy escalated tensions unnecessarily</li>



<li>Accusations (&#8220;propaganda tour,&#8221; demanding gratitude) hardened positions rather than facilitating agreement</li>



<li>Focus on criticism rather than constructive proposal development</li>



<li>Created impression of US disunity in approach to Ukraine</li>
</ul>



<p><strong>Alternative approach:</strong> Vance could have more effectively supported US interests by facilitating mutual understanding rather than escalating confrontation. Acknowledging Ukraine&#8217;s security concerns while reinforcing the importance of practical steps would have maintained leverage while reducing tension. Example: &#8220;We understand your security concerns, and that&#8217;s why making progress on this initial agreement is so important as a foundation for addressing those broader issues.&#8221;</p>



<h2 class="wp-block-heading">8.4. Overall Strategic Assessment</h2>



<p>The transcript reveals a fundamentally mismanaged negotiation from all parties:</p>



<ol start="1" class="wp-block-list">
<li><strong>Trump&#8217;s approach</strong> prioritized short-term displays of dominance at the expense of the sustainable agreement he claimed to want.</li>



<li><strong>Zelenskyy&#8217;s approach</strong> failed to effectively work within his weak BATNA constraints by not building relationship capital before making demands.</li>



<li><strong>Vance&#8217;s interventions</strong> created additional obstacles rather than facilitating progress.</li>
</ol>



<p>All parties demonstrated a failure to separate relationship dynamics from substantive issues, allowing emotional responses to undermine strategic interests. The rare earth minerals agreement appeared ready for signing, but the groundwork for broader conflict resolution was actively damaged by the counterproductive approaches revealed in the transcript.</p>



<h1 class="wp-block-heading">9. Trust and Respect Analysis: Interpersonal Dynamics</h1>



<p>Based solely on the transcript, the levels of trust and respect between participants appear strikingly low, with notable variations in how they manifested:</p>



<h2 class="wp-block-heading">9.1. Trust Dynamics</h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><td><strong>Relationship</strong></td><td><strong>Trust Level</strong></td><td><strong>Supporting Evidence</strong></td></tr></thead><tbody><tr><td>Trump toward Zelenskyy</td><td><strong>Very Low</strong></td><td>• &#8220;You&#8217;re not acting at all thankful&#8221; • Repeated emphasis that security guarantees can wait, indicating distrust of Ukraine&#8217;s priorities • &#8220;If we can&#8217;t solve it they&#8217;re going to have to fight it out&#8221; • Constant framing of Ukraine as dependent rather than as partner</td></tr><tr><td>Zelenskyy toward Trump</td><td><strong>Cautious/Declining</strong></td><td>• Initially expresses hope: &#8220;I really count on your strong position&#8221; • Willingness to share sensitive information about POW treatment • Growing wariness as meeting progresses • Emphasis on needing guarantees rather than just promises</td></tr><tr><td>Trump toward Putin (not present)</td><td><strong>Surprisingly High</strong></td><td>• &#8220;I&#8217;ve known him for a long time&#8221; • &#8220;I feel very strongly that they&#8217;re very serious about it&#8221; • &#8220;He didn&#8217;t break him with me he wants to make a deal&#8221; • Defends Putin regarding &#8220;Russia hoax&#8221;</td></tr><tr><td>Zelenskyy toward Putin (not present)</td><td><strong>None</strong></td><td>• &#8220;He broken 25 times his own signature&#8221; • &#8220;He hate ukrainians&#8221; • Displays evidence of POW mistreatment • &#8220;He is a kid and terrorist&#8221;</td></tr><tr><td>Trump toward Vance</td><td><strong>High</strong></td><td>• Defers to Vance for elaboration on UK speech issues • Allows Vance to take confrontational role • No correction of Vance&#8217;s approaches</td></tr><tr><td>Vance toward Zelenskyy</td><td><strong>None</strong></td><td>• &#8220;You bring them on a propaganda tour&#8221; • Dismisses Ukraine&#8217;s military situation • Assumes bad faith in Zelenskyy&#8217;s motivations</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">9.2. Respect Dynamics</h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><td><strong>Relationship</strong></td><td><strong>Respect Level</strong></td><td><strong>Supporting Evidence</strong></td></tr></thead><tbody><tr><td>Trump toward Zelenskyy</td><td><strong>Initially Moderate, Declining to Low</strong></td><td>• Opens with diplomatic language: &#8220;It&#8217;s an honor to have you here&#8221; • Credits Ukrainian soldiers for bravery • Degrades to: &#8220;You don&#8217;t have the cards&#8221; • Repeatedly interrupts and talks over Zelenskyy • Dismisses security concerns as &#8220;2% of the problem&#8221; • Demands expressions of gratitude in increasingly hostile tone</td></tr><tr><td>Zelenskyy toward Trump</td><td><strong>Maintained Despite Provocation</strong></td><td>• Consistently addresses as &#8220;Mr. President&#8221; • Rarely interrupts Trump • Maintains formal diplomatic language despite growing hostility • Responds to accusations but doesn&#8217;t escalate to personal attacks • Attempts to correct misunderstandings rather than dismiss Trump&#8217;s points</td></tr><tr><td>Trump toward Putin (not present)</td><td><strong>Notably High</strong></td><td>• Defends Putin against &#8220;Russia hoax&#8221; • Avoids direct criticism of Putin personally • Frames Putin as competent negotiator • &#8220;I&#8217;ve stopped Wars I&#8217;ve stopped many wars&#8221; (implying respect for his own abilities in relation to Putin)</td></tr><tr><td>Zelenskyy toward Putin (not present)</td><td><strong>None</strong></td><td>• Refers to Putin as &#8220;killer&#8221; and &#8220;terrorist&#8221; • Describes Putin&#8217;s view that &#8220;there is no such country such Nation such language&#8230;like Ukrainian&#8221; • Attributes crimes against Ukrainian children and POWs to Putin</td></tr><tr><td>Vance toward Zelenskyy</td><td><strong>Openly Contemptuous</strong></td><td>• &#8220;It&#8217;s disrespectful for you to come into the Oval Office&#8221; • Dismissively refers to &#8220;propaganda tour&#8221; • Lectures about gratitude in condescending manner • Interrupts repeatedly and speaks over Zelenskyy • &#8220;You&#8217;re gambling with the lives of millions of people&#8221;</td></tr><tr><td>Zelenskyy toward Vance</td><td><strong>Minimal</strong></td><td>• Questions Vance&#8217;s knowledge: &#8220;You ever been to Ukraine that you say what problems we have&#8221; • Dismisses Vance&#8217;s assessment of Ukrainian situation • Otherwise minimal direct engagement</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">9.3. Analysis of Trust/Respect Dysfunction</h2>



<p>The transcript reveals a meeting characterized by profound trust and respect deficits that actively undermined stated goals:</p>



<ol start="1" class="wp-block-list">
<li><strong>Performative diplomacy masking fundamental distrust</strong>: The meeting begins with diplomatic language but quickly reveals deep mutual suspicion, particularly regarding:
<ul class="wp-block-list">
<li>Trump&#8217;s distrust of Zelenskyy&#8217;s appreciation for US support</li>



<li>Zelenskyy&#8217;s distrust of ceasefire arrangements without guarantees</li>



<li>Both sides&#8217; fundamentally different assessment of Putin&#8217;s trustworthiness</li>
</ul>
</li>



<li><strong>Respect asymmetry creating destructive dynamic</strong>: While Zelenskyy largely maintains diplomatic protocols despite provocation, Trump and especially Vance abandon respectful engagement, creating a counterproductive atmosphere where:
<ul class="wp-block-list">
<li>Demands for gratitude replace substantive discussion</li>



<li>Security concerns are dismissed rather than addressed</li>



<li>The power imbalance is repeatedly emphasized in increasingly disrespectful terms</li>
</ul>
</li>



<li><strong>Trust paradox regarding Russia</strong>: Perhaps most striking is the inverse relationship between proximity and trust regarding Russia:
<ul class="wp-block-list">
<li>Zelenskyy, who has direct experience with Russian actions, expresses zero trust</li>



<li>Trump, with less direct experience of Russian military actions in Ukraine, expresses surprising confidence in Putin&#8217;s reliability</li>
</ul>
</li>
</ol>



<p>This trust/respect analysis helps explain why the meeting devolved despite apparent shared interest in reaching agreements &#8211; the fundamental interpersonal dynamics undermined the collaborative foundation necessary for complex negotiations. The contrast between the formal diplomatic opening and the confrontational conclusion reflects a dramatic deterioration in mutual respect that would make sustainable agreements highly unlikely regardless of substantive positions.</p>



<h1 class="wp-block-heading">10. Potential Unstated Goals: Reading Between the Lines</h1>



<p>Based solely on the transcript evidence, the participants may have been pursuing several goals beyond their stated objectives:</p>



<h2 class="wp-block-heading">10.1. Donald Trump&#8217;s Potential Unstated Goals</h2>



<p><strong>1. Establishing personal dominance and respect</strong></p>



<ul class="wp-block-list">
<li>Evidence: Disproportionate focus on gratitude rather than substantive issues</li>



<li>Key quote: &#8220;You&#8217;re not acting at all thankful and that&#8217;s not a nice thing&#8221;</li>



<li>Pattern: Repeated emphasis on power dynamics (&#8220;you don&#8217;t have the cards&#8221;)</li>
</ul>



<p><strong>2. Creating narrative contrast with Biden administration</strong></p>



<ul class="wp-block-list">
<li>Evidence: Multiple tangential references to Biden&#8217;s failures unrelated to current negotiation</li>



<li>Key quote: &#8220;The United States run by a man that didn&#8217;t know much&#8230; incompetent person&#8221;</li>



<li>Pattern: Frames discussion in terms of predecessors&#8217; failings rather than forward solutions</li>
</ul>



<p><strong>3. Positioning relationship with Putin as uniquely successful</strong></p>



<ul class="wp-block-list">
<li>Evidence: Defensive of Putin despite Ukraine&#8217;s concerns</li>



<li>Key quote: &#8220;He might have broken deals with Obama and Bush and&#8230; with Biden&#8230; but he didn&#8217;t break him with me&#8221;</li>



<li>Pattern: Repeatedly references personal relationship with Putin as special</li>
</ul>



<p><strong>4. Securing economic benefits with minimal security commitments</strong></p>



<ul class="wp-block-list">
<li>Evidence: Enthusiasm for minerals deal while dismissing security concerns</li>



<li>Key quote: &#8220;Security is so easy that&#8217;s about 2% of the problem&#8221;</li>



<li>Pattern: Detailed discussion of resources but deflection of security guarantees</li>
</ul>



<p><strong>5. Creating televised demonstration of negotiating prowess</strong></p>



<ul class="wp-block-list">
<li>Evidence: Actively prolonged confrontational exchange</li>



<li>Key quote: &#8220;I think it&#8217;s good for the American people to see what&#8217;s going on&#8230; this is going to be great television&#8221;</li>



<li>Pattern: Performative aspects prioritized over substantive progress</li>
</ul>



<h2 class="wp-block-heading">10.2. Volodymyr Zelenskyy&#8217;s Potential Unstated Goals</h2>



<p><strong>1. Creating public record of Russian atrocities and untrustworthiness</strong></p>



<ul class="wp-block-list">
<li>Evidence: Brought physical evidence of prisoner mistreatment</li>



<li>Key quote: &#8220;He broken 25 times his own signature&#8221;</li>



<li>Pattern: Detailed documentation of Russian violations beyond negotiation necessity</li>
</ul>



<p><strong>2. Avoiding pressure into unsustainable ceasefire</strong></p>



<ul class="wp-block-list">
<li>Evidence: Repeated emphasis on security guarantees over quick ceasefire</li>



<li>Key quote: &#8220;Ceasefire will not never work without security guarantees&#8221;</li>



<li>Pattern: Resistance to simplistic peace formulas despite precarious position</li>
</ul>



<p><strong>3. Establishing Ukraine&#8217;s strategic value beyond current conflict</strong></p>



<ul class="wp-block-list">
<li>Evidence: Emphasis on drone technology, energy infrastructure potential</li>



<li>Key quote: &#8220;We have very good drones production I think the best one in the world&#8221;</li>



<li>Pattern: References to Ukraine&#8217;s value to European security architecture</li>
</ul>



<p><strong>4. Maintaining dignity despite power imbalance</strong></p>



<ul class="wp-block-list">
<li>Evidence: Continued formal address despite hostility; refusal to simply express gratitude</li>



<li>Key quote: &#8220;Mr. President we are staying in our country staying strong&#8221;</li>



<li>Pattern: Persistence in presenting Ukraine&#8217;s perspective despite intimidation</li>
</ul>



<p><strong>5. Creating witness testimony of Russian conduct for potential future accountability</strong></p>



<ul class="wp-block-list">
<li>Evidence: Detailed documentation of POW treatment, child abductions</li>



<li>Key quote: &#8220;They stolen 20,000 of children Ukrainian children&#8221;</li>



<li>Pattern: Creating historical record rather than focusing solely on immediate deal terms</li>
</ul>



<h2 class="wp-block-heading">10.3. JD Vance&#8217;s Potential Unstated Goals</h2>



<p><strong>1. Demonstrating unwavering loyalty to Trump</strong></p>



<ul class="wp-block-list">
<li>Evidence: Aggressive defense of Trump&#8217;s approach</li>



<li>Key quote: &#8220;You should be thanking the president for trying to bring it into this conflict&#8221;</li>



<li>Pattern: Escalating confrontation beyond diplomatic necessity</li>
</ul>



<p><strong>2. Positioning himself as tough on foreign aid recipients</strong></p>



<ul class="wp-block-list">
<li>Evidence: Focus on gratitude rather than policy substance</li>



<li>Key quote: &#8220;In this entire meeting have you said thank you&#8221;</li>



<li>Pattern: Moral framing of aid relationship rather than strategic analysis</li>
</ul>



<p><strong>3. Creating confrontational media moment</strong></p>



<ul class="wp-block-list">
<li>Evidence: Accusatory rather than facilitative approach</li>



<li>Key quote: &#8220;You&#8217;re gambling with World War I&#8221;</li>



<li>Pattern: Antagonistic questioning unrelated to deal progress</li>
</ul>



<h2 class="wp-block-heading">10.4. Conclusion: Strategic Dissonance</h2>



<p>The transcript reveals significant divergence between stated and potential unstated goals, particularly:</p>



<ol start="1" class="wp-block-list">
<li>While all parties claimed to want a peace deal, their behaviors suggest competing priorities that actively undermined that objective.</li>



<li>Trump appeared more focused on perception, dominance, and transactional resource gain than sustainable conflict resolution.</li>



<li>Zelenskyy seemed intent on creating a historical record and defending against a disadvantageous peace while appearing cooperative.</li>



<li>The meeting&#8217;s dramatic confrontational conclusion (&#8220;this is going to be great television&#8221;) suggests performative aspects may have ultimately overshadowed substantive diplomatic progress.</li>
</ol>



<p>This analysis helps explain why, despite apparent shared interest in agreements, the meeting produced more conflict than cooperation &#8211; the unstated goals created fundamental incompatibilities in approach.</p>



<p><strong>Salvaging Prospects After Diplomatic Rupture</strong></p>



<p>Given this post-meeting context (Zelenskyy leaving without signing any deal, skipping the scheduled lunch, and departing the US), the prospects for salvaging agreements appear extremely dim based on the transcript evidence.</p>



<h1 class="wp-block-heading">11. Likelihood of Deal Salvage</h1>



<h2 class="wp-block-heading">11.1. Assessment: HIGHLY UNLIKELY WITHOUT FUNDAMENTAL RESET</h2>



<p>The transcript already showed a relationship deteriorating beyond the breaking point:</p>



<ul class="wp-block-list">
<li>Trump&#8217;s final statements were ultimatum-like: &#8220;You&#8217;re either going to make a deal or we&#8217;re out&#8221;</li>



<li>The meeting ended with: &#8220;I think we&#8217;ve seen enough what do you think this is this is going to be great television&#8221;</li>



<li>Zelenskyy&#8217;s security concerns were repeatedly dismissed</li>



<li>The exchange between Vance and Zelenskyy became personally antagonistic</li>
</ul>



<p>The post-meeting developments (skipped lunch, no signing, rapid departure) confirm the severity of the rupture that was building throughout the transcript.</p>



<h2 class="wp-block-heading">11.2. What Would Be Required for Salvage</h2>



<h3 class="wp-block-heading">11.2.1. From the United States</h3>



<ol start="1" class="wp-block-list">
<li><strong>Fundamental attitude reset</strong>
<ul class="wp-block-list">
<li>Abandon gratitude demands as prerequisite for support</li>



<li>Acknowledge legitimate security concerns rather than dismissing them as &#8220;2% of the problem&#8221;</li>



<li>Establish respectful professional communication protocols</li>
</ul>
</li>



<li><strong>Substantive policy adjustments</strong>
<ul class="wp-block-list">
<li>Create framework for addressing security guarantees alongside ceasefire</li>



<li>Develop verification mechanisms addressing Zelenskyy&#8217;s concerns about past ceasefire violations</li>



<li>Separate minerals deal from broader peace negotiations to preserve economic cooperation</li>
</ul>
</li>



<li><strong>Diplomatic relationship repair</strong>
<ul class="wp-block-list">
<li>Private direct communication between principals without confrontational presence of additional parties</li>



<li>Formal acknowledgment of unproductive meeting tone</li>



<li>Clear commitment to Ukraine&#8217;s sovereign decision-making role in any peace process</li>
</ul>
</li>
</ol>



<h2 class="wp-block-heading">11.3. From Ukraine</h2>



<ol start="1" class="wp-block-list">
<li><strong>Strategic communication adjustments</strong>
<ul class="wp-block-list">
<li>More explicit acknowledgment of US support importance</li>



<li>Frame security concerns in terms of mutual interests rather than historical grievances</li>



<li>Develop scaled approach to security requirements (minimum vs. optimal)</li>
</ul>
</li>



<li><strong>Flexibility on negotiation sequence</strong>
<ul class="wp-block-list">
<li>Separate minerals agreement from broader security demands</li>



<li>Consider staged approach with verifiable milestone achievements</li>



<li>Identify concrete early-win possibilities</li>
</ul>
</li>



<li><strong>Relationship management</strong>
<ul class="wp-block-list">
<li>Engage with broader US stakeholders beyond Trump and immediate circle</li>



<li>Emphasize economic and strategic benefits to US in less confrontational settings</li>
</ul>
</li>
</ol>



<h2 class="wp-block-heading">11.4. Structural Obstacles to Salvage</h2>



<p>The transcript reveals fundamental obstacles that make salvage particularly challenging:</p>



<ol start="1" class="wp-block-list">
<li><strong>Trust deficit appears irreparable</strong>
<ul class="wp-block-list">
<li>Trump&#8217;s apparent trust in Putin combined with distrust of Zelenskyy</li>



<li>Zelenskyy&#8217;s deep distrust of Russian commitments</li>



<li>These create incompatible negotiating frameworks</li>
</ul>
</li>



<li><strong>Perception gap regarding leverage</strong>
<ul class="wp-block-list">
<li>Trump&#8217;s position: &#8220;You don&#8217;t have the cards&#8221;</li>



<li>Zelenskyy&#8217;s position: Ukraine is defending Europe&#8217;s security frontier</li>



<li>This fundamental disagreement about the relationship nature may be unbridgeable</li>
</ul>
</li>



<li><strong>Incompatible peace visions</strong>
<ul class="wp-block-list">
<li>Trump seeks quick ceasefire with minimal ongoing commitments</li>



<li>Zelenskyy requires sustainable security architecture with enforceable guarantees</li>



<li>The transcript shows no viable middle ground emerging</li>
</ul>
</li>
</ol>



<h2 class="wp-block-heading">11.5. Most Viable Path Forward</h2>



<p>Given the severe relationship damage evident in the transcript and confirmed by post-meeting developments, the most viable path would likely involve:</p>



<ol start="1" class="wp-block-list">
<li><strong>Clean break and restart through intermediaries</strong>
<ul class="wp-block-list">
<li>Third-party diplomats establishing pre-negotiation terms</li>



<li>Separate technical negotiations on minerals deal from security discussions</li>



<li>Clear agenda and communication protocols before any direct leader engagement</li>
</ul>
</li>



<li><strong>Focus on narrowly-defined agreements</strong>
<ul class="wp-block-list">
<li>Compartmentalized deals on specific issues rather than comprehensive settlement</li>



<li>Minerals access separated from security architecture</li>



<li>Limited tactical cooperation independent of strategic alignment</li>
</ul>
</li>



<li><strong>Multilateral rather than bilateral framework</strong>
<ul class="wp-block-list">
<li>European security partners included to dilute bilateral tensions</li>



<li>Technical rather than political-level negotiations initially</li>



<li>Face-saving structure that doesn&#8217;t require direct leader interaction</li>
</ul>
</li>
</ol>



<p>The transcript reveals such fundamental disconnects in expectations, trust, and approach that the standard diplomatic prescription of &#8220;keep talking&#8221; appears insufficient. The relationship dynamics documented in the transcript, culminating in Zelenskyy&#8217;s abrupt departure, suggest any salvage effort would require a complete diplomatic reset rather than incremental adjustments.</p>



<h1 class="wp-block-heading">12. Additional Angles and Substantive Considerations</h1>



<p>Our analysis has been thorough, but several important dimensions remain unexplored:</p>



<h2 class="wp-block-heading">12.1. Cultural and Communication Asymmetries</h2>



<p>The transcript reveals profound cultural and communication disconnects beyond simple language barriers:</p>



<ul class="wp-block-list">
<li><strong>Negotiation philosophy clash</strong>: Trump&#8217;s transactional business approach (&#8220;I&#8217;m a business person we made a deal&#8221;) versus Zelenskyy&#8217;s historical-security framework (&#8220;Rule of the war during all the centuries&#8221;)</li>



<li><strong>Different concepts of gratitude</strong>: American expectation of explicit verbal appreciation versus Eastern European focus on mutual respect through actions</li>



<li><strong>Conflict framing dissonance</strong>: Trump discusses the war primarily in terms of cost and deal-making; Zelenskyy frames it in existential and historical terms</li>
</ul>



<p>This cultural disconnect contributed significantly to the meeting&#8217;s deterioration beyond mere policy disagreements.</p>



<h2 class="wp-block-heading">12.2. Domestic Political Calculations</h2>



<p>Both leaders appear constrained by unmentioned domestic considerations:</p>



<ul class="wp-block-list">
<li><strong>Trump&#8217;s base expectations</strong>: His emphasis on gratitude and America-first positioning aligns with domestic political narrative needs</li>



<li><strong>Zelenskyy&#8217;s survival imperatives</strong>: His resistance to compromise on security reflects Ukrainian public opposition to territorial concessions</li>



<li><strong>Performance for different audiences</strong>: Trump explicitly acknowledges the public nature: &#8220;I think it&#8217;s good for the American people to see what&#8217;s going on&#8221;</li>
</ul>



<p>These domestic constraints may make compromise inherently more difficult than the substantive issues alone would suggest.</p>



<h2 class="wp-block-heading">12.3. Personal vs. Institutional Diplomacy</h2>



<p>The transcript reveals a striking emphasis on personal rather than institutional diplomatic frameworks:</p>



<ul class="wp-block-list">
<li>Trump repeatedly emphasizes personal relationship with Putin: &#8220;I&#8217;ve known him for a long time&#8221;</li>



<li>Disregard for institutional diplomatic structures in favor of leader-to-leader dynamics</li>



<li>Absence of discussion about verification mechanisms, monitoring bodies, or international legal frameworks</li>
</ul>



<p>This personalization of international relations creates inherent instability as it relies on individual relationships rather than institutional commitments.</p>



<h2 class="wp-block-heading">12.4. Psychology of Humiliation and Pride</h2>



<p>Beneath policy positions, powerful psychological dynamics shaped the interaction:</p>



<ul class="wp-block-list">
<li>Zelenskyy&#8217;s resistance to expressions of gratitude stems partly from avoiding national humiliation while maintaining dignity</li>



<li>Trump&#8217;s insistence on gratitude reflects desire for acknowledgment of superior position</li>



<li>Vance&#8217;s confrontational approach serves as status-reinforcement</li>



<li>The &#8220;dress like a president&#8221; comment aimed at Zelenskyy&#8217;s military attire represents status-challenging</li>
</ul>



<p>These psychological dimensions frequently overshadowed substantive policy discussions.</p>



<h2 class="wp-block-heading">12.5. Media Strategy as Negotiating Tactic</h2>



<p>The conscious awareness of media impact shaped the meeting:</p>



<ul class="wp-block-list">
<li>Trump explicitly mentions the television value of the confrontation</li>



<li>Both leaders perform for multiple audiences (domestic constituencies, international observers, adversaries)</li>



<li>The minerals agreement signing was planned as a media event</li>



<li>The transcript suggests some provocations may have been intended to generate specific media narratives</li>
</ul>



<p>This media consciousness transformed what might have been private diplomatic disagreements into public performance.</p>



<h2 class="wp-block-heading">12.6. Economic Details and Valuation Gap</h2>



<p>The rare earth minerals deal that seemed ready for signing remains underspecified:</p>



<ul class="wp-block-list">
<li>What is the actual value of these resources?</li>



<li>What processing and extraction infrastructure would be required?</li>



<li>How does this interact with Ukraine&#8217;s physical control of territories?</li>



<li>What is the timeline for realizing economic benefit?</li>
</ul>



<p>This valuation uncertainty likely contributed to different perceptions of what constitutes a &#8220;fair deal.&#8221;</p>



<h2 class="wp-block-heading">12.7. The Human Cost Accounting</h2>



<p>While casualties are mentioned numerically, the human dimension receives limited attention:</p>



<ul class="wp-block-list">
<li>Brief acknowledgment of POW treatment but quick transition to political positioning</li>



<li>Discussion of &#8220;bullets stopping in human bodies&#8221; without emotional engagement</li>



<li>Competing casualty narratives without verification framework</li>



<li>Limited discussion of civilian impacts despite references to destroyed cities</li>
</ul>



<p>This dehumanization of the conflict may have facilitated positional rather than interest-based negotiation.</p>



<p>These additional perspectives help explain why, beyond policy disagreements, the relationship ruptured so dramatically, making salvage particularly challenging. The transcript reveals a meeting where substantive issues became secondary to psychological, cultural, and performative dimensions that ultimately proved more determinative of the outcome.</p>



<h1 class="wp-block-heading">13. With Hindsight: Alternative Approaches Assessment</h1>



<h2 class="wp-block-heading">13.1. Should This Meeting Have Happened in Front of the Media If a Deal Was Not Entirely Agreed To?</h2>



<p><strong>Assessment: CLEAR DIPLOMATIC ERROR</strong></p>



<p>The transcript provides overwhelming evidence that media presence was counterproductive:</p>



<ul class="wp-block-list">
<li>The participants became increasingly performative rather than substantive</li>



<li>Trump explicitly acknowledged the theatrical element: &#8220;This is going to be great television&#8221;</li>



<li>Positions hardened rather than converged when publicly challenged</li>



<li>Neither side could show flexibility without appearing to concede</li>



<li>The confrontational exchange damaged rather than advanced relationships</li>
</ul>



<p><strong>Diplomatic best practice would have been:</strong></p>



<ul class="wp-block-list">
<li>Private preliminary meeting to establish parameters and identify areas of agreement</li>



<li>Staff-level technical discussions to resolve implementable details</li>



<li>Media involvement only after substantive agreement on key principles</li>



<li>Public signing ceremony for finalized deals (the minerals agreement that was ready)</li>
</ul>



<p>Trump&#8217;s statement &#8220;I think it&#8217;s good for the American people to see what&#8217;s going on&#8221; reveals prioritization of public performance over diplomatic progress. This meeting should have occurred privately, with only an agreed joint appearance afterward.</p>



<h2 class="wp-block-heading">13.2. Should Vance have attended it?</h2>



<p><strong>Assessment: DIPLOMATICALLY COUNTERPRODUCTIVE</strong></p>



<p>Vance&#8217;s presence significantly degraded the negotiating dynamic:</p>



<ul class="wp-block-list">
<li>His intervention created a &#8220;two against one&#8221; dynamic that undermined bilateral negotiation</li>



<li>His confrontational stance (&#8220;propaganda tour,&#8221; demands for gratitude) escalated tensions</li>



<li>His questioning of Zelenskyy&#8217;s respect for the office introduced additional friction</li>



<li>His accusations diverted discussion from substance to personal attacks</li>
</ul>



<p><strong>Diplomatic alternatives would have been:</strong></p>



<ul class="wp-block-list">
<li>Vice presidential attendance in observer capacity only</li>



<li>Clear protocol establishing who speaks and when</li>



<li>Separate meeting for broader delegation discussions after principal alignment</li>



<li>Technical rather than political support staff for specific expertise</li>
</ul>



<p>Vance&#8217;s presence transformed what should have been a bilateral leadership discussion into a confrontational interrogation, with his statement &#8220;It&#8217;s disrespectful for you to come into the Oval Office and try to litigate this&#8221; representing a significant breach of diplomatic norms.</p>



<h2 class="wp-block-heading">13.3. Should Zelenskyy Have Expressed Himself in His Native Language with Assistance from an Interpreter?</h2>



<p><strong>Assessment: WOULD LIKELY HAVE IMPROVED OUTCOMES</strong></p>



<p>The transcript reveals several communication disadvantages for Zelenskyy:</p>



<ul class="wp-block-list">
<li>Grammatical structures typical of Slavic speakers communicating in English</li>



<li>Limited ability to express complex security concepts with nuance</li>



<li>Disadvantage in real-time reaction to confrontational exchanges</li>



<li>Communication under emotional pressure in a non-native language</li>
</ul>



<p><strong>Diplomatic advantages of interpretation would have included:</strong></p>



<ul class="wp-block-list">
<li>Time to consider responses during translation</li>



<li>More precise expression of complex security concerns</li>



<li>Reduced power imbalance in communication</li>



<li>Formal structure that might have limited confrontational escalation</li>



<li>Professional diplomatic language rather than direct emotional exchanges</li>
</ul>



<p>The exchange where Zelenskyy attempts to explain Russia&#8217;s pattern of breaking ceasefires illustrates how language limitations affected his ability to make persuasive arguments. An interpreter would have provided him more equitable footing in this high-stakes conversation.</p>



<h2 class="wp-block-heading">13.4. Conclusion: Structural Diplomatic Failures</h2>



<p>The transcript reveals a meeting structured to maximize performative conflict rather than substantive agreement:</p>



<ol start="1" class="wp-block-list">
<li><strong>Public rather than private</strong> negotiations encouraged posturing</li>



<li><strong>Confrontational rather than facilitative</strong> third-party presence</li>



<li><strong>Direct rather than interpreted</strong> communication disadvantaged the non-native speaker</li>
</ol>



<p>These structural diplomatic errors created conditions where relationship deterioration became almost inevitable regardless of the substantive positions. With hindsight, a completely different meeting format &#8211; private, principal-only or with technical staff, with professional interpretation &#8211; would have significantly improved prospects for productive engagement even with the same underlying policy differences</p>



<h1 class="wp-block-heading">14. Bonus &#8211; <strong>Negotiation Analysis Based on &#8220;Never Split the Difference&#8221; by Chris Voss</strong></h1>



<p>I did this at the request of a participant in this <a href="https://www.reddit.com/r/ClaudeAI/comments/1j1bele/using_claude_sonnet_37_to_analyze_transcript_of/" title="">reddit thread</a>. I used ChatGPT as I blew up through my daily Claude Pro quota with the above! I asked GPT to create the prompt for this using <a href="https://x.com/MindBranches/status/1858846558889852939" title="">this mind map</a>.</p>



<h2 class="wp-block-heading">14.<strong>1. Emotional Intelligence &amp; Tactical Empathy</strong></h2>



<ul class="wp-block-list">
<li><strong>Did participants focus on emotions and rapport-building rather than just logic?</strong>
<ul class="wp-block-list">
<li>There was limited emphasis on emotional intelligence. Trump frequently emphasized the deal-making aspect and his personal rapport with Putin rather than directly addressing Zelenskyy’s emotional appeals.</li>



<li>Zelenskyy, on the other hand, attempted to invoke emotions by referencing the suffering of Ukrainian soldiers, civilians, and prisoners. He provided visual evidence of the mistreatment of Ukrainian captives, aiming to elicit sympathy and urgency.</li>
</ul>
</li>



<li><strong>Did they acknowledge and label the other party’s emotions?</strong>
<ul class="wp-block-list">
<li>Trump acknowledged some emotional aspects but in a dismissive or transactional manner (e.g., <em>“That’s tough stuff”</em> in response to images of mistreated Ukrainian prisoners).</li>



<li>There was little effort to explicitly label emotions to create a sense of empathy, a key principle in Voss’s framework.</li>
</ul>
</li>
</ul>



<p><strong>Assessment: Partially Applied</strong></p>



<ul class="wp-block-list">
<li>Zelenskyy applied tactical empathy in an attempt to highlight the emotional weight of Ukraine’s situation.</li>



<li>Trump did not engage in active emotional labeling or mirroring; instead, he focused on transactional aspects of the deal.</li>
</ul>



<h2 class="wp-block-heading">14.<strong>2. Preparation &amp; Strategy</strong></h2>



<ul class="wp-block-list">
<li><strong>Did they demonstrate thorough preparation with clear goals and anticipated objections?</strong>
<ul class="wp-block-list">
<li>Trump’s strategy appeared to be focused on securing a deal that included U.S. access to Ukrainian rare earth minerals.</li>



<li>Zelenskyy had clear goals: securing continued U.S. military aid, preventing territorial compromises, and ensuring long-term security guarantees.</li>



<li>Neither side demonstrated a comprehensive objection-handling strategy, particularly regarding how to reconcile their differing visions for ending the war.</li>
</ul>
</li>



<li><strong>Did they use calibrated questions to guide the discussion effectively?</strong>
<ul class="wp-block-list">
<li>Calibrated questions (e.g., <em>“How am I supposed to do that?”</em> in Voss’s methodology) were largely absent.</li>



<li>Instead, both leaders engaged in direct statements and rhetorical positioning.</li>



<li>The discussion featured blunt assertions rather than strategic, curiosity-driven questions to uncover deeper motivations.</li>
</ul>
</li>
</ul>



<p><strong>Assessment: Underutilized</strong></p>



<ul class="wp-block-list">
<li>Both parties had defined objectives, but neither effectively used calibrated questions to guide or control the negotiation.</li>
</ul>



<h2 class="wp-block-heading">14.<strong>3. Effective Communication &amp; Control</strong></h2>



<ul class="wp-block-list">
<li><strong>Did they appear calm and controlled?</strong>
<ul class="wp-block-list">
<li>Trump maintained a dominant, dismissive posture, occasionally displaying frustration (e.g., telling Zelenskyy to be more thankful).</li>



<li>Zelenskyy remained composed but was drawn into confrontations, particularly with J.D. Vance, weakening his negotiation position.</li>
</ul>
</li>



<li><strong>Did they encourage collaboration with open-ended questions rather than demands?</strong>
<ul class="wp-block-list">
<li>Zelenskyy made some efforts to present Ukraine as a partner in defense and economic opportunities.</li>



<li>Trump primarily framed his position as transactional and unilateral rather than collaborative.</li>
</ul>
</li>



<li><strong>Did they avoid common traps like forcing a “yes” response too early?</strong>
<ul class="wp-block-list">
<li>There were no overt attempts to force a premature &#8220;yes&#8221; commitment.</li>



<li>However, Trump did attempt to corner Zelenskyy into accepting a ceasefire without addressing security concerns.</li>
</ul>
</li>
</ul>



<p><strong>Assessment: Weak Execution</strong></p>



<ul class="wp-block-list">
<li>Trump’s style was confrontational rather than collaboratively guiding the discussion.</li>



<li>Zelenskyy failed to maintain control over the conversation and got pulled into defensive posturing.</li>
</ul>



<h2 class="wp-block-heading"><strong>14.4. Building Leverage &amp; Handling Objections</strong></h2>



<ul class="wp-block-list">
<li><strong>Did they establish a strong anchor early in the conversation?</strong>
<ul class="wp-block-list">
<li>Trump’s anchor was that U.S. aid to Ukraine must be transactional and that a deal must be reached soon.</li>



<li>Zelenskyy’s anchor was that continued aid and security guarantees were non-negotiable.</li>
</ul>
</li>



<li><strong>How effectively did they handle objections, and did they preemptively address concerns?</strong>
<ul class="wp-block-list">
<li>Zelenskyy preemptively addressed concerns about ceasefires by referencing Russia’s history of breaking agreements.</li>



<li>Trump deflected concerns about security guarantees, stating that peace had to come first.</li>
</ul>
</li>
</ul>



<p><strong>Assessment: Limited Use</strong></p>



<ul class="wp-block-list">
<li>Both leaders established strong positions but did not actively apply objection-handling techniques to sway the other party.</li>
</ul>



<h2 class="wp-block-heading"><strong>14.5. Advanced Tactics</strong></h2>



<ul class="wp-block-list">
<li><strong>Did they use silence strategically to create pressure?</strong>
<ul class="wp-block-list">
<li>Neither side employed silence as a negotiation tool.</li>



<li>The conversation remained rapid and combative.</li>
</ul>
</li>



<li><strong>Did they frame outcomes in terms of loss aversion?</strong>
<ul class="wp-block-list">
<li>Zelenskyy implied that failing to support Ukraine would lead to further Russian aggression, including against NATO.</li>



<li>Trump did not use loss aversion effectively; instead, he focused on cost-benefit framing.</li>
</ul>
</li>



<li><strong>Did they elicit a “That’s right” moment to signal understanding?</strong>
<ul class="wp-block-list">
<li>No clear moment of deep agreement was achieved.</li>



<li>The discussion remained adversarial, with both sides pushing their narratives rather than aligning on shared principles.</li>
</ul>
</li>
</ul>



<p><strong>Assessment: Largely Absent</strong></p>



<ul class="wp-block-list">
<li>Silence was not used as a pressure tactic.</li>



<li>Loss aversion was used inconsistently.</li>



<li>No clear attempt was made to elicit a “That’s right” moment.</li>
</ul>



<h2 class="wp-block-heading">14.<strong>6. Missed Opportunities &amp; Recommendations</strong></h2>



<h3 class="wp-block-heading"><strong>14.6.1. Missed Opportunities</strong></h3>



<ol class="wp-block-list">
<li><strong>Lack of Tactical Empathy</strong>
<ul class="wp-block-list">
<li>Trump missed opportunities to validate Zelenskyy’s concerns with emotion-labeling techniques.</li>



<li>Zelenskyy failed to redirect Trump’s dismissiveness by mirroring or tactical pausing.</li>
</ul>
</li>



<li><strong>Failure to Use Calibrated Questions</strong>
<ul class="wp-block-list">
<li>Neither leader effectively used calibrated questions to reframe the discussion or create more constructive dialogue.</li>
</ul>
</li>



<li><strong>Absence of Leverage Reinforcement</strong>
<ul class="wp-block-list">
<li>Trump could have reinforced the U.S.’s strategic leverage in the negotiation (e.g., conditionality of support) in a more constructive manner.</li>



<li>Zelenskyy could have reinforced Ukraine’s role as a critical ally in deterring further Russian aggression.</li>
</ul>
</li>
</ol>



<h3 class="wp-block-heading">14.6.2. <strong>Recommendations for Future Negotiations</strong></h3>



<ul class="wp-block-list">
<li><strong>For Trump</strong>
<ul class="wp-block-list">
<li>Apply <strong>tactical empathy</strong> to better acknowledge and reframe Zelenskyy’s emotional appeals.</li>



<li>Use <strong>calibrated questions</strong> to extract deeper insights from Zelenskyy rather than making unilateral statements.</li>



<li>Reinforce <strong>leverage</strong> more subtly rather than using outright dominance.</li>
</ul>
</li>



<li><strong>For Zelenskyy</strong>
<ul class="wp-block-list">
<li>Use <strong>mirroring and labeling</strong> to make Trump feel heard while subtly steering the conversation.</li>



<li>Ask <strong>calibrated questions</strong> to challenge Trump’s assumptions about a quick ceasefire.</li>



<li>Avoid defensive posturing—redirect attacks with strategic silence.</li>
</ul>
</li>
</ul>



<h2 class="wp-block-heading">14.7. <strong>Final Assessment: Suboptimal Application of Voss’s Principles</strong></h2>



<p>While elements of negotiation strategy were present, neither leader fully utilized the principles outlined in <em>Never Split the Difference</em>. Trump dominated the conversation but did not apply emotional intelligence effectively. Zelenskyy used emotional appeals but lacked control over the dialogue. Both parties could benefit from a more strategic, empathy-driven negotiation approach.</p>



<h1 class="wp-block-heading">15. Complete Transcript</h1>



<p><em>Source: <a href="https://www.youtube.com/watch?v=UhFqdAZ9Xnw">YouTube</a>, processed with Claude Desktop using <a href="https://github.com/kimtaeyoon83/mcp-server-youtube-transcript" title="">this MCP</a>. I&#8217;m <a href="https://www.reddit.com/r/ClaudeAI/comments/1j1bele/comment/mfmabpx/" title="">told</a> the transcript is somewhat messy and misattributed several statements. I didn&#8217;t check it manually, this will warrant further investigation as faithful transcripts is of course a key input to this entire exercise.</em></p>



<p><strong>Donald Trump:</strong> Well thank you very much it&#8217;s an honor to have President Zelenskyy of Ukraine and we&#8217;ve been working very hard very close so we&#8217;ve actually known each other for a long time we&#8217;ve been dealing with each other for a long time and very well. We had little negotiation spat but that worked out great I think for both countries. I think for the world actually beyond both countries and we have something that is a very fair deal and we look forward to getting in and digging digging digging and working and getting some of the rare earth but it means we&#8217;re going to be inside and it&#8217;s a it&#8217;s a big commitment from the United States and we appreciate working with you very much and we will continue to do that.</p>



<p>We have had some very good discussions with Russia I spoke with President Putin and we&#8217;re going to try and bring this to a close it&#8217;s something that you want and that he wants we have to negotiate a deal but we&#8217;ve started the confines of a deal and I think something can happen. The big thing is the number of soldiers mostly at this point but soldiers being killed you&#8217;re losing thousands of soldiers on both sides we&#8217;re losing a lot of soldiers and we want to see it stop and we want to see the money get put to different kinds of use like rebuilding the rebuilding and we&#8217;re going to be working very hard but we&#8217;ve had a lot of very good conversations.</p>



<p>I will say until we came along the Biden Administration didn&#8217;t speak to Russia whatsoever they didn&#8217;t speak to anybody they just allowed this to continue and I will say that I&#8217;ll say in front of you you&#8217;ve heard me say it a thousand times if I were president this war would have never happened. We would have had a deal negotiated for you without having to go through what you&#8217;ve gone through but you your soldiers have been unbelievably brave we&#8217;ve given them great equipment but they somebody has to use the equipment they&#8217;ve been unbelievably brave and we give them great credit.</p>



<p>This was supposed to be over very quickly and here we are three years later so I give tremendous credit to your generals and your soldiers and yourself in the sense that it&#8217;s been very hard fighting very tough fighting they have great fighters and you have to be very proud of them from that standpoint but now we want to get it over with it&#8217;s enough right we want to get it over with.</p>



<p>So it&#8217;s an honor to have you here thank you very much for coming we&#8217;re going to sign the agreement at the conference in the East room in a little while right after lunch and we&#8217;ll be having lunch together we&#8217;re also discussing some other things and we appreciate everybody being here it&#8217;s a somewhat of an exciting moment but the really exciting moment is when we get a when they stop the shooting or we end up with a deal and I think we&#8217;re fairly close to getting that and an honor to have you and please you like to say something.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Yeah thank you so much Mr. President thank you for invitation and really I hope that this document first document will be first step to real security guarantees for Ukraine our people our children I really count on it and of course we count that America will not stop support really for us is very important to support and to continue it I want to discuss it with details further during our conversation.</p>



<p>And of course the infrastructure or security guarantees because for today I understand what Europe is ready to do and of course I want to discuss with you what United States will be ready to do and I really count on your strong position to stop Putin and you said that enough with the War I think that is very important been to say these words to Putin at the very beginning at the very beginning of War because he is a kid and terrorist but I hope that together we can stop him.</p>



<p>But for us is very important to you know to save our country our values our freedom the democracy and of course no compromises with the killer about our territories but it will be later and of course I what I wanted you know we spoke about it by phone with you about the drones production we have very good drones production I think the best one in the world for today because of the war yes and of course we need very much the air defense you have the best air defense in the world and really you help us under attacks of Russians and I want to speak how we can exchange the licenses we&#8217;re open to share the licenses of all our drones with you of course with the United States and we need licenses for quick production of air defense even after the war we need our nation to be calm that we are secured so that&#8217;s why we need this shield.</p>



<p>And of course about this I want to speak about the contingence I think that France and UK already spoke to you and we know that Europe is ready but without United States they will not be ready to be as strong as we need and the last point last not least about exchange about our people and children and you know that this crazy Russian that they stolen 20,000 of children Ukrainian children they changed their names they changed their you know their families relatives and now they in Russia we want to bring them back and really it&#8217;s a big big dream task and goal for me and and the our Warriors we by the way Mr. we brought we exchanged we yes released more than 4,000 Warriors from Russian prison but there are thousands more in the prison I wanted to share with you some some images how how just just can can I can I now.</p>



<p><strong>Donald Trump:</strong> Yeah please please.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Some one minute one minute I just you to understand what in what circumstances in what situation they are and what the attitude of Russia to our prisoners that guys just you before before and after and you see before and after just you to understand now thousands of such guys ladies and men they and that&#8217;s so they don&#8217;t eat they beat them and they you know do a lot of a lot of you know bad things.</p>



<p>So out out of even during the war There Are Rules everybody knows There are rules during the war these guys they don&#8217;t have any rules you see that 50 60 kilos and and a lot of such things and I didn&#8217;t want to show you what what the changes with images of children because I will share just share with you I mean it&#8217;s looking tragic.</p>



<p><strong>Donald Trump:</strong> Yeah that&#8217;s tough stuff.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Wondered very much to to give you and you you see this is Pastor by the way they stolen pastors because it&#8217;s not Russian Church stolen pastors and moved pastors to the prison we at the end of last year we we brought three pastors and we we could exchange them but this is Pastor you see like yeah that&#8217;s sad.</p>



<p>Yeah so I&#8217;m I mean this I wanted to show you and um this so thank you very much.</p>



<p><strong>Donald Trump:</strong> We want to get that ended right.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Yeah yeah of course of course we will.</p>



<p><strong>Donald Trump:</strong> I think we will I think we will and we have to of course.</p>



<p>Do you have any questions please?</p>



<p><strong>Reporter:</strong> Thank you Mr. President. With the how much money is the US going to put into the fund that that is being created today and how does this provide long-term security for Ukraine?</p>



<p><strong>Donald Trump:</strong> Well we don&#8217;t know exactly how much because we&#8217;re going to be putting some money in a fund that we&#8217;re going to get from the raw Earth that we&#8217;re going to be taking and sharing in terms of Revenue so it&#8217;s going to be a lot of money will be made from the sale and from the use of raw Earth and as you know our country doesn&#8217;t have much raw Earth we have a lot of oil and gas but we don&#8217;t have a lot of the raw Earth and what we do have is protected by the environmentalists but that could be unprotected but still it&#8217;s not very much.</p>



<p>They have among the best in the world in terms of so we&#8217;re going to be using that taking it using it for all of the things we do including AI and including weapons and the military and it&#8217;s really going to very much satisfy our needs so something that just worked out really well we have a lot of oil and we have a lot of gas we have a lot but we don&#8217;t have raw Earth so this this has just about every component of the raw Earth that we need for computers for all of the things we do this puts us in great shape.</p>



<p>And long-term security for Ukraine this provides I think they&#8217;re going to have great long I think once we make the agreement that&#8217;s going to be 95% of it it&#8217;s they&#8217;re not going to go back to fighting. I&#8217;ve spoken with President Putin and I think I mean I feel very strong I&#8217;ve known him for a long time and I feel very strongly that they&#8217;re very serious about it and we&#8217;ll make a deal and when the deal is made I don&#8217;t think we talk about security everyone&#8217;s talking about the other day all they talked about was security I said let me make the deal first I have to make the deal first I don&#8217;t worry about security right now I got have to we have to have a deal because right now last week 2,000 soldiers died on both sides 2,000 and they&#8217;re losing a thousand 2,000 3,000 a week.</p>



<p>So as we sit here and we talk people are getting shot and dying on the battlefield and you know they&#8217;re not American soldiers but they&#8217;re Russian soldiers and they&#8217;re Ukrainian soldiers and we want to be able to stop it and we want to be able also to spend money on other things we don&#8217;t want to this is a tremendous amount of money and what the Biden Administration did was terrible they were giving money but he had no security on the money Europe as you know gave much less money but they had security it was in the form of a loan they get their money back and we didn&#8217;t and now at least we&#8217;re protected because the American taxpayer has to be protected too but this is an incredible agreement for Ukraine because we have a big investment in their country now and and what what they have very few people have and we&#8217;re able to really go forward with very very high-tech things and many other things including Weaponry Weaponry that we&#8217;re going to use in many locations but that we need for our country this allows this allows us to do this.</p>



<p>Yes go ahead.</p>



<p><strong>Volodymyr Zelenskyy:</strong> If if I can just yes in the document there is one of the very important points if we speak about business and investment we never had LNG terminals in Ukraine this document will open I mean the next documents but anyway the here we see in the framework we we see we see a really good will for this LNG terminals for us is very important and I think for security of European continent we have the biggest storage gas storage we have the biggest in Europe yes it&#8217;s yeah and we can use it you for LNG use it for for LNG and we will do it and really we we can help Europe because Europe really helped.</p>



<p>President Trump said that they made less support but they have our friends and they our very supportive partners they really gave a lot Mr. president really they did they gave a lot but they gave much less.</p>



<p><strong>Donald Trump:</strong> No no okay.</p>



<p><strong>Reporter:</strong> Mr. President Trump you have repeatedly called the deal with Ukraine has as a historical one and as a president of the United States you make historical decision in other issues which affect America and other world so what play in the world history do you want to take and do you associate your yourself with any famous historical figures?</p>



<p><strong>Donald Trump:</strong> Yeah I&#8217;d say George Washington Abraham Lincoln I would say I&#8217;m far superior to George Washington and Abraham Lincoln. Now you know I&#8217;m only kidding right because when I say that the fake news is going to go wild they&#8217;re going to say he considers himself to be better than Washington but you never know you never know.</p>



<p>I don&#8217;t compare myself to anybody I just have I&#8217;m here to do a job we&#8217;ve had a great 35 days or whatever it might be a month a little more than a month. We&#8217;ve accomplished tremendous amounts not only this this would be a very great achievement if we could get this the war stopped and get them back to normalization I think that&#8217;s going to happen we&#8217;ve had very good talks on both sides as you know but I think we&#8217;ve done a very good job just generally if you look at all of the things we&#8217;ve done done in 30 days they&#8217;re saying there&#8217;s never been a opening for a president the first month there&#8217;s never been a first month like we&#8217;ve had and this is one of the very important things this to me is one of the most important things because we have tremendous death taking place as we speak and I don&#8217;t want to have that you know think of the parents think of the whether they&#8217;re in Russia or Ukraine think of the parents of all these people being killed needlessly they came to all Earth should have never started this would if I were president this would have never started.</p>



<p><strong>Reporter:</strong> Will you continue sending military aid to Ukraine after you the US signs this agreement with Ukraine. Question to president Zelenskyy do you feel like the US is on your side that the president the president Trump is on your side at this moment?</p>



<p><strong>Donald Trump:</strong> What do you think he wants to know do you think that sort of a stupid question I guess I guess we wouldn&#8217;t be here if I was.</p>



<p><strong>Volodymyr Zelenskyy:</strong> I think that I think that the United States on our side from the very beginning of occupation and I think that President Trump on our side and and of course and not I&#8217;m sure that United States President will not stop support this is crucial for us it&#8217;s important for us yes and Putin president speaks about the people and the soldiers which are dying but they came to our territory they came to our land they began this war and they have to stop and I think all this is the question with really the most important question can president Trump I hope yes with some other allies to stop Putin withdraw this enemies our enem withdraw these troops from our land and I think that you asked about the history about the I think that if president or when he will stop Putin if president Trump will bring peace to our country I think he will be on this wall and time.</p>



<p><strong>Donald Trump:</strong> We&#8217;ve had very very good talks president Zelenskyy just said that there will be no compromises with Vlad Putin. I just wanted to ask both of you firstly are there compromises that you think that president Zelenskyy is going to have to make and president Zelenskyy is there anything that you might you think you may be able to offer or bring to the table for example elections.</p>



<p><strong>Donald Trump:</strong> Thank you. I think you&#8217;re going to have to always make compromises you can&#8217;t do any deals without compromises so certainly he&#8217;s going to have to make some compromises but hopefully they won&#8217;t be as big as some people think you&#8217;re going to have to make that&#8217;s all it&#8217;s all we can do. I&#8217;m here as a as an arbitrator as a mediator to a certain extent between two parties that have been very hostile to put it mildly they&#8217;ve been very hostile has been a vicious War this been a vicious War you know it&#8217;s a very level Battlefield and those bullets go out and as I&#8217;ve said many times we&#8217;re talking about it with Pete many times the only thing stopping those bullets is a human body and in the case we&#8217;re talking about generally young human bodies are stopping a lot of bullets it&#8217;s dead level that&#8217;s what why it&#8217;s great Farmland it&#8217;s great land it&#8217;s great Farmland but there&#8217;s very little protection against the bullets that are being and other things that are being shot.</p>



<p>So all I can do is see if I can get everybody at the table and get an agreement and I think we&#8217;re going to end up with an agreement otherwise I wouldn&#8217;t probably be even here today.</p>



<p><strong>Reporter:</strong> Mr. President I&#8217;ve got two questions for you. You think ultimately your legacy will be The Peacemaker and not the president that led this country into another war and ended Foreign Wars and I&#8217;ve got a question.</p>



<p><strong>Donald Trump:</strong> I hope it will I mean I hope I&#8217;m going to be remembered as a peacemaker. This is this would be a great thing if we could do this I&#8217;m doing this to save lives more than anything else second is to save a lot of money but I consider that to be far less important. So I hope I&#8217;m going to thank you Brian for that question it was a nice question.</p>



<p>I hope I&#8217;ll be known and recognized as a peacemaker this this would be a great thing to solve this is a very dangerous situation you know this could lead to a third world war this is this was headed in the wrong direction if this election were lost and we didn&#8217;t win this election and by way we won it by a lot that was a mandate we won every swing state we won the popular vote by millions and millions of votes we won everything the districts you look at the areas of of red take a look at a map this was a big mandate and this is one of the things I said we&#8217;re going to get this thing settled if we didn&#8217;t win I think this would have this could have very well ended up in a third world war and that would not that would not have been a good situation what was your second question.</p>



<p><strong>Reporter:</strong> My second question for president Zelenskyy do you ever why don&#8217;t you wear a suit you&#8217;re the highest why don&#8217;t you wear a suit you&#8217;re the highest level in this country&#8217;s office and you refused to wear a suit just want to see if you you own a suit.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Yeah yeah problems I I a lot of Americans have problems with you not respecting the dignity of this office.</p>



<p><strong>Reporter:</strong> I will wear a costume after this war will finish okay.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Yes maybe one maybe something like yours. Yes maybe some something better I don&#8217;t I don&#8217;t know we will see maybe something cheaper than yeah thank you.</p>



<p><strong>Donald Trump:</strong> Thank you.</p>



<p><strong>Reporter:</strong> President Trump you said yesterday are you going to send more arms to Ukraine in case there&#8217;s no peace.</p>



<p><strong>Donald Trump:</strong> Yeah we&#8217;re going to have arms to Ukraine yeah sure hopefully I won&#8217;t have to send very much because hopefully we&#8217;re going to have have it finished we&#8217;re looking forward to finishing this quickly we&#8217;re not looking forward to sending a lot of arms we&#8217;re looking forward to getting the war finished so we can do other things but we very much appreciate the agreement because we needed what they had and we&#8217;re treating you know our country is now treated fairly Biden didn&#8217;t do that Biden didn&#8217;t he didn&#8217;t know what the hell he was doing this should have never happened they should have never started but you know sure the answer is yes but hopefully we won&#8217;t have to send much because I&#8217;m looking forward to get it done getting it done quickly very quickly.</p>



<p><strong>Reporter:</strong> Does that provide security guarantees Mr. President.</p>



<p><strong>Donald Trump:</strong> I don&#8217;t want to talk about security yet because I want to get the deal done you know you fall into the same trap like everybody else a million times you say it over and over I want to get the deal done security is so easy that&#8217;s about 2% of the problem. I&#8217;m not worried about security I&#8217;m worried about getting the deal done the security is the easy part security is very nice everybody stopped shooting and now will Europe put people there I know France is going to I know the UK is going to I know other countries are going to and they happen to be right next door we haven&#8217;t committed but we could conceivably you know we have Security in a different form we have workers there digging digging digging taking the raw Earth so that we can create a lot of great product in this country so in that sense you have something but we haven&#8217;t determined that yet.</p>



<p>I will say in speaking to France and in speaking to and they were here as you know last week and just the other day they have committed to a lot of security I don&#8217;t think you&#8217;re going to need much security I think once this deal gets done it&#8217;s over Russia is not going to want to go back and nobody&#8217;s going to want to go back when this when this deal ends I really believe this deal is is going to be over.</p>



<p>Question yeah please go ahead go ahead.</p>



<p><strong>Reporter:</strong> Mr. President thank you. You had Ming here and Starmer at the White House this past week both of whom praised your courage and conviction to lead the pathway towards peace yes part of that involved though re-engaging Russia in diplomatic relations something that previous leaders lacked the conviction to do so what gave you the moral courage and conviction to step forward and Lead that?</p>



<p><strong>Donald Trump:</strong> Well I love this guy. Who are you with?</p>



<p><strong>Reporter:</strong> One American News, sir.</p>



<p><strong>Donald Trump:</strong> Well that&#8217;s that why I like him. One American News is a great job that&#8217;s very I like the question I think it&#8217;s a very good question it is it&#8217;s a pathway to peace it&#8217;s a pathway to getting something solved and I feel that as the head of this country I have an obligation to do that plus you know we&#8217;re very much involved we got involved it&#8217;s too bad we got involved because there should have been no involvement because there should have been no war and there shouldn&#8217;t have been October 7th that would have never happened as you know Iran was broke they had no money to give to Hezbollah they had no money to give to Hamas they were Stone Cold broke and then under Biden they became rich as hell they went from no money to $300 billion in a period of 4 years and they gave a lot of that money away and you see what happened and that&#8217;s a real mess also that we hope to be able to solve.</p>



<p>But no I I appreciate your question very much I just I feel I have an obligation to try and do something to stop the death I can.</p>



<p><strong>Volodymyr Zelenskyy:</strong> If I can answer sorry please please.</p>



<p><strong>Donald Trump:</strong> And I do like your clothing brother. Yeah really even though I have to I think he&#8217;s a great guy by the way but I I don&#8217;t know if you two like each other but you know what I think I like this guy I don&#8217;t I think he&#8217;s dressed beautiful.</p>



<p><strong>Volodymyr Zelenskyy:</strong> So I have more I have more serious things than answer on such question I will answer on more serious question if I can.</p>



<p>Yeah so please about security guarantees and about just ceasefire we can&#8217;t just speak about ceasefire and speak and speak it will not work Justice fire will not never work because I&#8217;m like a president I have I have this experience and not only me Ukraine before before my presidency from the 2014 Putin broken 25 times 25 times he broken his own signature 25 times he broken ceasefire it.</p>



<p><strong>Donald Trump:</strong> He never broke to me never.</p>



<p><strong>Volodymyr Zelenskyy:</strong> No no you were the president you were the president never.</p>



<p><strong>Donald Trump:</strong> him in 2016 you been the president.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Mr. Mr. President you&#8217;ve been the president but he for he had of course not with you but he had during those period he had conversations with our side and we had Normandy format you know the France Germany Ukraine and Russia and he broken 25 times that&#8217;s why we will never accept just ceasefire it will not work without security guarantees security guarantees maybe president is right about this document and other but this document is not enough strong Army is enough because his soldiers afraid Putin soldiers afraid of our soldiers when we&#8217;re strong enough if we are not strong enough if we are empty if our storage is empty we can&#8217;t defend our our land.</p>



<p>Today you know he knows that we have meeting yes why he&#8217;s using ballistic Putin today using ballistic on our Hospital schools and etc ballistic so he knows that we are here and that President Trump is really have good will to stop to stop this war and I and you hear now the president so why he&#8217;s using so he doesn&#8217;t want to stop he doesn&#8217;t want but I hope that we will do it really we&#8217;ll do it.</p>



<p>Security when we speak about security guarantees when the Europeans are ready for contingence they need USA back stop if the world will not be United States we will not never have any contingents strong contigent from the Europeans because they don&#8217;t want to divide alliance connection between the United States and the main and strongest alliance Europeans and this is crucial this is important that what we want to speak about very much this is very important and they are defense so air defense really we have big deficit with all these systems and we need to provide this we we need it very much otherwise Putin will never stop and will go further and further.</p>



<p>He doesn&#8217;t want he he hate us you know it&#8217;s not about me he hate ukrainians he thinks that we are not a nation he thinks and he shared the swords I think maybe with your team also I don&#8217;t know but with all the Europeans in media officially and not he always said that we there is no such country such Nation such language and such life like Ukrainian no he really doesn&#8217;t respect all the ukrainians and he wants destroy us the we.</p>



<p>We you are right Mr. President that&#8217;s 2% this document maybe other documents it&#8217;s a very good Star very good but it will not enough to stop this person.</p>



<p>Should Mr. R this is Rule of the war this is the rule of the war during all the centuries all the history this is the rule of the war who began those pay do you agree this is the rule Putin began this war he has to pay all money for renovation he has to pay of course some Russian assets what we have in Europe about 300 billions we can use them we can use for renovation and buy military support from the United States also we can do it but it&#8217;s not enough it&#8217;s not the trilateral.</p>



<p><strong>Donald Trump:</strong> Wait one second I want I ask this question that you didn&#8217;t like because I wanted to know if you want to position yourself in the middle between Russia and Ukraine or on the Ukraine side.</p>



<p><strong>Donald Trump:</strong> No I&#8217;m in the middle I want to solve this thing I&#8217;m for I&#8217;m for both I want to get it solved and it&#8217;s wonderful to speak badly about somebody else but I want to get it solved if we can solve it great if we can&#8217;t solve it they&#8217;re going to have to fight it out and who knows what&#8217;s going to happen but I want to see it get solved.</p>



<p><strong>Reporter:</strong> May I follow up one more question about US troops in Europe after Russian invasion of Ukraine your predecessor sent additional troops to Eastern Europe including Poland my country. Yeah are you committed to keeping this troops on the Eastern flank of NATO in the future.</p>



<p><strong>Donald Trump:</strong> I&#8217;m very committed to Poland I think Poland has really stepped up and done a great job for NATO they as you know they pay more than they had to they are one of the finest groups of people I&#8217;ve ever known I&#8217;m very committed to Poland.</p>



<p><strong>Reporter:</strong> What about baltics Poland&#8217;s in a tough neighborhood you know what about Baltic.</p>



<p><strong>Donald Trump:</strong> The baltics the baltics they got a lot of it&#8217;s a tough neighborhood too but we&#8217;re committed we&#8217;re going to be very committed and we&#8217;re committed to Nato but NATO has to step up and the Europeans have to step up more than they have and I want to see them equalized because they are in for far less than we&#8217;re in and they should be at least equal you understand that why is the United States we have an ocean in between why is the United States in for so much more money and other things as Europe.</p>



<p>With that being said and as you said they&#8217;ve also been obviously very helpful but we have put in far more than they have and I think they should equalize.</p>



<p><strong>Reporter:</strong> Mr. President about the agreement again today what changed between the first time that secretary Best gave president Zalanski the agreement and today for the signing.</p>



<p><strong>Donald Trump:</strong> We made a deal so what was signing Factor I&#8217;m I&#8217;m a business person we made a deal that&#8217;s what changed I didn&#8217;t think we were going to make a deal and we ended up making the deal so that change.</p>



<p><strong>Reporter:</strong> Mr. President what and how do you envision a trilateral summit with president Zalenskyy and Putin.</p>



<p><strong>Donald Trump:</strong> I don&#8217;t know well they don&#8217;t like each other I can tell you that they do not like each other this is not a love match and it&#8217;s unfortunate that&#8217;s why you&#8217;re in this situation the United States should not have allowed this to happen Okay the United States run by a man that didn&#8217;t know much I&#8217;m going to be very nice run by an incompetent person very incompetent person should never have allowed this to happen I&#8217;ve stopped Wars I&#8217;ve stopped many wars my people will tell you I stopped Wars that nobody ever heard about I stopped Wars before they ever started you can look at some of some of I could give you a lot of Nations that would tell you right now they were probably going to war I could tell you right now there&#8217;s a nation thinking about going to war on something that nobody in this room has ever even heard about two smaller Nations but big still big and I I think I&#8217;ve stopped it but this should have never happened.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Mr. about sorry just a second about the any negotiations the first of all I want want really to tell you and I think that everybody understand that Ukraine more than ukrainians nobody want to stop this war but at the future any negotiations it&#8217;s understandable that two sides of the war not Russia and the United States because this is not the war between Russia and the United States This Is War of Russia against Ukraine and Ukrainian people so these two sides will be at the any anyway will be at the negotiation and negotiation table.</p>



<p>Then of course United States like the strongest partner of the Ukraine and of course Europe I think Europe is very important I want to speak about it with the president yes Europe is very important for us because we really defend Europe for today all Europeans are really recognized that we are defend in line and they have real life and our people are dying that&#8217;s why they helped us.</p>



<p>And also it&#8217;s about the N yes between like the president said you have big nice ocean yes between us but if we will not stay Russia will go further to baltics and to Poland by the way but first to the baltics it&#8217;s understandable for them because they&#8217;ve been they&#8217;ve been in the USSR you know they they&#8217;ve been one of the republics of the USSR and Putin wants to bring them back to his Empire it&#8217;s a fact and when he will go there if we will not stay you will fight you&#8217;re American soldiers it doesn&#8217;t matter do you have otion or not your soldiers will fight.</p>



<p><strong>Reporter:</strong> Mr. President would you be willing to visit Ukraine maybe Kiev or Odessa which is known to be a the with black SE it was my question.</p>



<p><strong>Donald Trump:</strong> Yeah I&#8217;m sorry I don&#8217;t want to talk about Odessa now let&#8217;s not talk about Odessa I want to talk about making a deal getting peace we don&#8217;t have to talk about Odessa but a lot of cities have been destroyed a lot of cities that are not recognizable there&#8217;s not a building standing and a lot of a lot of things.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Mr. you have to come and to look.</p>



<p><strong>Donald Trump:</strong> No no no we have very good cities yes a lot of things been destroyed but mostly cities alive and people work and children go to school sometimes it&#8217;s very difficult sometimes closer to Front Line children have to go to underground schools or online but we live Ukraine is fighting and Ukraine lives this is very important and maybe it&#8217;s Putin is sharing this information that he destroyed us know he lost 700,000 people 700,000 soldiers he lost Sevastopol yes.</p>



<p><strong>Reporter:</strong> Mr. President one more when did you last speak with President Putin and what did he say that.</p>



<p><strong>Donald Trump:</strong> Couple of days ago and what did he tell you that gave you the assurance that he wanted peace. Well that&#8217;s what I do my whole life is deals I know pretty good and I really I&#8217;ve I&#8217;ve known him for a long time I&#8217;ve dealt with him for a long time he had a suffer through the Russia hoax you know Russia Russia Russia was a hoax it was all Biden it was nothing to do with him so he had to suffer through that and he he was able to do that.</p>



<p>I think that he wants to make a deal and he like to see it end it&#8217;s all I do that&#8217;s what I do my whole life that&#8217;s what I do is make deals and I&#8217;m in the middle of a mess because this is a real mess it&#8217;s a very dangerous one if this doesn&#8217;t get solved now it&#8217;s not going to get solved for a long time so I hope we&#8217;re going to I hope we&#8217;re going to get it solved.</p>



<p>In the back please.</p>



<p><strong>Reporter:</strong> Thank you Mr. President prime minister Starmer repeatedly that his government believes in free speech and was not engaged in censorship but his country&#8217;s government arrest people for memes and thought crimes and even more worrisome is pressuring American companies to to to censor Americans on his behalf how can he a reliable trustworthy partner when he says things that are demonstrably false on such an important.</p>



<p><strong>Donald Trump:</strong> Well we actually spoke to him about that yesterday and we thought they took it very very much too far JD was very strong on it so was I so was Marco and we&#8217;ve been speaking to him about it Marco would you like to say something about.</p>



<p><strong>JD Vance:</strong> Yeah we we we have concerns obviously with the conduct of there particularly as it impacts Americans and there&#8217;s real concern that American speech which is online could fall into the hands of British or any country&#8217;s jurisdiction and so this is a point the vice president made at Munich and and I think it&#8217;s a very compelling one that what unites us with Europe as much as anything else is these shared values and one of them being free speech and so if Americans are threatened by it we&#8217;re going to need to take action in that regard.</p>



<p>It&#8217;s actually a very important question we we spoke about this in detail with the Prime Minister and the foreign secretary and others at at lunch yesterday and I know that Secretary of Commerce lutnick followed up in private meeting last night this is really important we believe Americans have the right to speak their mind even if we in this room disagree with them they have the right to speak their mind in the Public Square which is often online these days and we&#8217;re going to defend that right as it pertains to American companies and American citizens vigorously if we have to I do think that under the president&#8217;s leadership we&#8217;re going to find common ground with our friends in the UK on this question but it remains to be seen the principle that will guide us is we believe in free speech in this country and we&#8217;ll fight forward for American citizens.</p>



<p><strong>Reporter:</strong> Mr. the deal is there any other oil and gas component to the deal is it all CRI.</p>



<p><strong>Donald Trump:</strong> A little bit we&#8217;ll see on L but we&#8217;re not really looking for that so much we got a lot we have more than anybody in the world by far so no we&#8217;re not talking about it too much but a little bit I think it it it affects also but for the most part no.</p>



<p><strong>Reporter:</strong> And Sir is there any agreement from Ukraine to purchase US LNG as part of the deal or is that on the table at all.</p>



<p><strong>Donald Trump:</strong> No we don&#8217;t need this.</p>



<p><strong>Reporter:</strong> I just wanted to ask you about you just mentioned that you&#8217;d spoken to Vladimir Putin a couple of days ago just to be clear that&#8217;s a new call not the one that you.</p>



<p><strong>Donald Trump:</strong> I&#8217;ve spoken to him on numerous occasions okay and how was the latest call what did you discuss how you are you serious with that question.</p>



<p><strong>Reporter:</strong> I am I love to know.</p>



<p><strong>Donald Trump:</strong> It went well I think I think we&#8217;re going to have a deal on the minerals.</p>



<p><strong>Reporter:</strong> Mr. President some of those minerals are in the east of Ukraine not far from the front lines and in areas that Russia has occupied will you direct President Putin to to withdraw his forces from those areas if you&#8217;re there&#8217;s US interest.</p>



<p><strong>Donald Trump:</strong> Well we&#8217;ll take a look at at the time we have a lot of area it&#8217;s a very big area we&#8217;re talking about so we&#8217;ll take a look I&#8217;ll study that and I&#8217;ll see.</p>



<p><strong>Reporter:</strong> And who would protect those minerals if if they are US interest would that be Ukrainian.</p>



<p><strong>Donald Trump:</strong> Be protected the agreement will protect them the agreement yeah we&#8217;re signing an agreement.</p>



<p><strong>Reporter:</strong> But what if Russia tries to invade or or there&#8217;s Russian aggression and there spots.</p>



<p><strong>Donald Trump:</strong> I just told you I don&#8217;t think that&#8217;s going to happen and if that were going to happen I wouldn&#8217;t make a deal if I thought that was going to happen I wouldn&#8217;t make a deal.</p>



<p><strong>Donald Trump:</strong> Some people may wonder why you know they ought to focus on CNN on Survival not asking me these ridiculous questions focus on Surviving because CNN&#8217;s got such low ratings I don&#8217;t think they&#8217;re going to survive already.</p>



<p><strong>Reporter:</strong> I already mentioned Poland Poland was under Russian control for decades after the second world war when I was a kid I looked at the United United States not only as a most powerful country richest country in the world the country that has great music great movies great muscle cars but also as a Force for good do you and now I&#8217;m talking with my friends in Poland and they they are worried that you align yourself too much with Putin what&#8217;s your message for them.</p>



<p><strong>Donald Trump:</strong> Well if I didn&#8217;t align myself with both of them you&#8217;d never have a deal you want me to say really terrible things about Putin and then say hi Vladimir how are we doing on the deal that doesn&#8217;t work that way I&#8217;m not aligned with Putin I&#8217;m not aligned with anybody I&#8217;m aligned with the United States of America and for the good of the world I&#8217;m aligned with the world and I want to get this thing over with.</p>



<p>You see the hatred he&#8217;s got for Putin it&#8217;s very tough for me to make a deal with that kind of hat he&#8217;s got tremendous hatred and I understand that but I can tell you the other side isn&#8217;t exactly in love with you know him either so it&#8217;s not a question of alignment I have to I&#8217;m aligned with the world I want to get the things set i&#8217;m aligned with Europe I want to see if we can get this thing done you want me to be tough I could be tougher than any human being you&#8217;ve ever seen I&#8217;d be so tough but you&#8217;re never going to get a deal that way so that&#8217;s the way it goes.</p>



<p>All right one more question.</p>



<p><strong>Volodymyr Zelenskyy:</strong> I would to respond to this so look for four years in the United States of America we a president who stood up at press conferences and talked tough about Vladimir Putin and then Putin invaded Ukraine and destroyed a significant chunk of the country the path to peace and the path to Prosperity is maybe engaging in diplomacy we tried the pathway of Joe Biden of thumping our chest and pretending that the president of the United States&#8217;s words mattered more than the president of the United States&#8217;s actions what makes America a good country is America engaging in diplomacy that&#8217;s what president Trump is doing.</p>



<p><strong>Donald Trump:</strong> Can I ask you sure yeah yeah.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Okay so he occupied our parts big parts of Ukraine part of East and Crimea so he occupied it on 2014 so during a lot of years I&#8217;m not speaking about just Biden but those time was Obama then President Obama then president Trump then president Biden now president Trump and God bless now president Trump will stop him but during 2014 nobody stopped him he just occupied and took he killed people you know what the contact are 2015 2014 2014 2015.</p>



<p><strong>Donald Trump:</strong> 2014.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Yeah so I was not here.</p>



<p><strong>Donald Trump:</strong> Yeah exactly right yes.</p>



<p><strong>Volodymyr Zelenskyy:</strong> But during 2014 till 2022 yeah the was the situation the same that people are been dying on the contact line nobody stopped him you know that we had conversations with him a lot of conversation my bilateral conversation and we signed with him me like a new president in 2019 I signed with him the deal I signed with him macron and Merkel we sign ceasefire ceasefire all of them told me that he will never go we signed him with gas contract gas contract yes but after that he broken this his fire he killed our people and he didn&#8217;t exchange prisoners we signed the exchange of prisoners but he didn&#8217;t do it what kind of diplomacy JD you are speaking about what what you what do you mean.</p>



<p><strong>JD Vance:</strong> I&#8217;m talking about the kind of diplomacy that&#8217;s going to end the destruction of your country.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Mr. President.</p>



<p><strong>Donald Trump:</strong> Mr. President with respect I think it&#8217;s disrespectful for you to come into the Oval Office and try to litigate this in front of the American Media right now you guys are going around and forcing conscripts to the front lines because you have Manpower problems you should be thanking the president for trying to bring it into this conflict.</p>



<p><strong>Volodymyr Zelenskyy:</strong> You ever been to Ukraine that you say what problems we have.</p>



<p><strong>JD Vance:</strong> I have been to I&#8217;ve actually I&#8217;ve actually watched and seen the stories and I know what happens is you bring people you bring them on a propaganda tour.</p>



<p><strong>Donald Trump:</strong> Mr. President are do you disagree that you&#8217;ve had problems bringing people into your military and do you think that it&#8217;s respectful to come to the Oval Office of the United States of America and attack the administration that is trying to trying to prevent the destruction of your country.</p>



<p><strong>Volodymyr Zelenskyy:</strong> A lot of a lot of questions let&#8217;s start from the beginning first of all during the war everybody has problems even you but you have nice ocean and don&#8217;t feel now but you will feel it in the future.</p>



<p><strong>JD Vance:</strong> God bless God bless.</p>



<p><strong>Volodymyr Zelenskyy:</strong> God bless you will not have War don&#8217;t tell us what we&#8217;re going to feel.</p>



<p><strong>JD Vance:</strong> We&#8217;re trying to solve a problem don&#8217;t tell us what we&#8217;re going to feel.</p>



<p><strong>Volodymyr Zelenskyy:</strong> I&#8217;m not telling you because you&#8217;re in no position to dictate that.</p>



<p><strong>JD Vance:</strong> Position to dictate what we&#8217;re going to feel We&#8217;re going to feel very good.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Feel influ.</p>



<p><strong>JD Vance:</strong> We&#8217;re going to feel very good and very strong.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Will feel influence you&#8217;re right now not in a very good position you&#8217;ve allowed yourself to be in a very bad position and he happens to be right about from the very beginning of the war you&#8217;re not in a good position you don&#8217;t have the cards right now with us you start having cards right now you don&#8217;t you&#8217;re playing card you&#8217;re you&#8217;re gambling with the lives of millions of people you&#8217;re gambling with World War I.</p>



<p><strong>Donald Trump:</strong> You&#8217;re gambling with World War I and what you&#8217;re doing is very dis disrespectful to the country this country that&#8217;s back to you far more than a lot of people said they should have have you said thank you once this entire meeting no in this entire meeting have you said thank you you went to Pennsylvania and campaigned for the opposition in October offer some words of appreciation for the United States of America and the president who&#8217;s trying to save your country please.</p>



<p><strong>Volodymyr Zelenskyy:</strong> You think that if you will speak very loudly about the war you can.</p>



<p><strong>Donald Trump:</strong> He&#8217;s not speaking loudly he&#8217;s not speaking loudly your country is in big trouble.</p>



<p><strong>JD Vance:</strong> Can I wait a minute no no you&#8217;ve done a lot of talking your country is in big trouble I know you&#8217;re not winning you&#8217;re not winning this you have a damn good chance of coming out okay because of us.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Mr. President we are staying in our country staying strong from the very beginning of the war we&#8217;ve been alone and we are thankful.</p>



<p><strong>Donald Trump:</strong> I said you haven&#8217;t been.</p>



<p><strong>Volodymyr Zelenskyy:</strong> We gave you through this stupid president $350 billion we gave you military equipment and your men are brave but they had to use our military if you didn&#8217;t have our military equipment invi.</p>



<p><strong>JD Vance:</strong> If you didn&#8217;t have our military equipment this war would have been over in two weeks in three days I heard it from Putin in three days.</p>



<p><strong>Volodymyr Zelenskyy:</strong> This is something may in two weeks of course yes it&#8217;s going to be a very hard thing to do business like this just say thank you.</p>



<p><strong>Donald Trump:</strong> Except except except that there are disagreements and let&#8217;s go litigate those disagreements rather than trying to fight it out in the American Media when you&#8217;re wrong we know that you&#8217;re wrong but you see I think it&#8217;s good for the American people to see what&#8217;s going on I think it&#8217;s very important that&#8217;s why I kept this going so long you have to be thankful you don&#8217;t have the cards you&#8217;re buried there you&#8217;re people are dying you&#8217;re running low on solders.</p>



<p>Listen you&#8217;re running low on soldiers it would be a damn good thing and then you then you tell us I don&#8217;t want to cease fire I don&#8217;t want to ceas fire I want to go and I want to this I look if you could get a ceasefire right now I tell you you take it so the bullets stop Flying and you men stuff getting killed.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Course of course we want to stop the war but I saying you don&#8217;t want a ceas.</p>



<p><strong>Donald Trump:</strong> I want a ceas because you&#8217;ll get a ceasefire faster than a degree.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Ask our people about ceasefire what they think that wasn&#8217;t doesn&#8217;t matter for you.</p>



<p><strong>Donald Trump:</strong> What wasn&#8217;t with me that was with a guy named Biden who was not a smart person that was that was with Obama.</p>



<p><strong>JD Vance:</strong> It was your brother excuse me that was with Obama who gave you sheets and I gave you javelins yes I gave you the javelins to take out all those tanks Obama gave you sheets in fact the statement is Obama gave sheets and Trump gave javelins you got to be more thankful because let me tell you you don&#8217;t have the cards with us you have the cards but without us you don&#8217;t have any cards one more question to Mr. Vice President I&#8217;m sorry.</p>



<p><strong>Donald Trump:</strong> Going to be a tough deal to make because the attitudes have to change.</p>



<p><strong>Reporter:</strong> What if Russia breaks this fire what if Russia breaks these talks what is understand.</p>



<p><strong>Donald Trump:</strong> What are you saying she&#8217;s asking what if Russia breaks the ceasefire.</p>



<p><strong>Reporter:</strong> What if they what if.</p>



<p><strong>Donald Trump:</strong> Anything what if a bomb drops on your head right now okay.</p>



<p><strong>Volodymyr Zelenskyy:</strong> Why did they broke it I don&#8217;t know they broke it with Biden because Biden they didn&#8217;t respect him they didn&#8217;t respect Obama they respect me.</p>



<p><strong>Donald Trump:</strong> Let me tell you Putin went through a hell of a lot with me he went through a phony Witch Hunt where they used him and Russia Russia Russia Russia you ever hear of that deal that was a phony that was a phony that was a phony Hunter Biden Joe Biden scam Hillary Clinton Shifty Adam shiff it was a Democrat scam and he had to go through that and he did go through it we didn&#8217;t end up in a war and he went through it he was accused of all that stuff he had nothing to do with it came out a Hunter Biden&#8217;s bathroom it came out of Hunter Biden&#8217;s bedroom it was disgusting and then they said oh oh the laptop from hell was made by Russia the 51 agents the whole thing was a scam and he had to put up with that he was being accused of all that stuff.</p>



<p>All I can say is this he might have broken deals with Obama and Bush and he might have broken them with Biden he did maybe maybe he didn&#8217;t I don&#8217;t know what happened but he didn&#8217;t break him with me he wants to make a deal I don&#8217;t know if you can make a deal the problem is I&#8217;ve empowered you to be a tough guy and I don&#8217;t think you&#8217;d be a tough guy without the United States and your people are very brave but you&#8217;re either going to make a deal or we&#8217;re out and if we&#8217;re out you&#8217;ll fight it out I don&#8217;t think it&#8217;s going to be pretty but you&#8217;ll fight it out but you don&#8217;t have the cards but once we sign that deal you&#8217;re in a much better position but you&#8217;re not acting at all thankful and that&#8217;s not a nice thing I&#8217;ll be honest that&#8217;s not a nice thing.</p>



<p>All right I think we&#8217;ve seen enough what do you think this is this is going to be great television I will say that all right we&#8217;ll see what we can do we&#8217;ll see.</p>



<h1 class="wp-block-heading">16. See Also</h1>



<ul class="wp-block-list">
<li><a href="https://www.oliviertravers.com/running-llms-locally-the-getting-started-windows-stack/" title="Running LLMs Like DeepSeek Locally: The Getting Started Windows Stack">Running LLMs Like DeepSeek Locally: The Getting Started Windows Stack</a></li>
</ul>



<h2 class="wp-block-heading">Annex I &#8211; Meeting Analysis Prompt</h2>



<p>This is a slightly adapted version of the prompt I use for business meetings to good effect. Anecdotally, I self-identify as INTJ (pushing myself to ENTJ when I need to project, which I often do). Claude always tag me as such whenever I analyze the transcript of a meeting I participated to.</p>



<pre class="wp-block-code"><code>## Basic Rules
 
You are a methodical business analyst with a keen attention to detail combined with the ability to see patterns and capture the big picture. You studied Diplomacy, English, Psychology, and Business Administration at undergraduate levels and act as an objective and perceptive neutral observer. Your goal is for participants to learn something about themselves individually and as a group.

# User Preamble
## Task and Context

Summarize the attached conversation transcript with the following sections:

1.	Executive summary, with an assessment of whether the meeting was productive and conclusive. Pay special attention to constraints and concerns such as budgets, timelines, security, or internal politics (e.g., approval from management, procurement, or finance). Capture any numbers of interest.

2.	Action items with their owner, timeframe, dependencies. Highlight who appears to be in a decision-making proposal (this might be one of the participants, or someone not in the meeting but mentioned during it).

3.	Sentiment analysis, including motives, enthusiasm, major reservations or objections if any, inferred for each major participant, presented as a table with rows for all the significant speakers.

4.	An analysis of inter-personal dynamics on things such as who seems to be in charge, who’s interrupting whom, who asks questions, who appears to repeat themselves, dissent, or build consensus. Assessment of power dynamics and level of respect. Time spoken by each person and talk to listen ratio. Format as a table with rows for each participant.

5.	An assessment of each participant’s rational and emotional intelligence. Format as a table with rows for each participant.

6.	An analysis of each speaker’s English proficiency, speaking style, educational level, number of useful words per minute, ability to articulate their point, use of filler words, ability to keep people engaged (relevance, focus, humor). If they don’t sound like a native English speaker, try to guess their background. Format this as a table with rows for all the significant speakers.

7.	Enneagram and Myers-Briggs personality assessment, presented as a table with rows for all the significant speakers. Hyperlink the Enneagram type to the corresponding page from https://www.enneagraminstitute.com/type-descriptions/ and hyperlink Myers-Briggs types to https://www.myersbriggs.org/my-mbti-personality-type/the-16-mbti-personality-types/, for example &#091;Type 1: The Reformer](https://www.enneagraminstitute.com/type-1/) 

8.	A list of most frequently used words, excluding stop words, with cells showing the number of uses, formatted as a table with rows for all the significant speakers, and a total column, sorted by decreasing frequency of the total.

9.	If the meeting was not productive, who could have done anything differently? Were people prepared? Was there a clear and shared agenda?

10.	What was left unsaid but might be inferred from this conversation? Did anyone appear to have hidden motives? Was there significant use of manipulative language?

11.	If more than two people participated, create a matrix with the name of all participants in rows and columns, and rate of how much they interacted with each other from 1 to 10 (don’t put anything in cells that have no interaction).

12.	If more than two people participated, create a matrix showing what each participant seemed to think of the others (put a dash in cells where the same person intersects).

## Style Guide

Use Markdown for clean formatting, with larger bold fonts for section titles using the &#039;# Heading 1&#039; format. Don’t number the headings. </code></pre><p>The post <a href="https://www.oliviertravers.com/art-high-stakes-negotiation-ai-analysis-trump-zelenskyy-vance-white-house-2025/">The Art of High-Stakes Negotiation: An AI-Powered Analysis of the Trump-Zelenskyy-Vance White House Meeting, Feb. 28 2025</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.oliviertravers.com/art-high-stakes-negotiation-ai-analysis-trump-zelenskyy-vance-white-house-2025/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">11704</post-id>	</item>
		<item>
		<title>Running LLMs Like DeepSeek Locally: The Getting Started Windows Stack</title>
		<link>https://www.oliviertravers.com/running-llms-locally-the-getting-started-windows-stack/</link>
					<comments>https://www.oliviertravers.com/running-llms-locally-the-getting-started-windows-stack/#comments</comments>
		
		<dc:creator><![CDATA[otravers]]></dc:creator>
		<pubDate>Wed, 29 Jan 2025 13:55:38 +0000</pubDate>
				<category><![CDATA[cool tools]]></category>
		<category><![CDATA[search engines]]></category>
		<category><![CDATA[software]]></category>
		<guid isPermaLink="false">https://www.oliviertravers.com/?p=11297</guid>

					<description><![CDATA[<p>Like many people, I switched from manual web search to using Large Language Models (LLM) to run research-oriented queries in order to be more productive, and in my case, with... <a href="https://www.oliviertravers.com/running-llms-locally-the-getting-started-windows-stack/">Read more &#187;</a></p>
<p>The post <a href="https://www.oliviertravers.com/running-llms-locally-the-getting-started-windows-stack/">Running LLMs Like DeepSeek Locally: The Getting Started Windows Stack</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Like many people, I switched from manual web search to using Large Language Models (LLM) to run research-oriented queries in order to be more productive, and in my case, with a side goal of spending as little time as possible looking through Google&#8217;s incredibly biased lens. In my day job I need to conduct business and technical research all the time, from learning about a new prospect to diving deep into a software platform&#8217;s documentation. This is all pretty time consuming, even with processes I&#8217;ve honed as an online power user for 30 years (ahh, the good old days of Usenet and Gopher!).</p>



<p>I&#8217;ve been deliberately pushing myself to revisit my workflows, hoping for a breakthrough. From early experiments that failed spectacularly, I can now expedite with a single prompt what would take me hours of reading SEC filings, among other tasks I need to perform on a daily basis. I turned from AI skeptical (&#8220;meh, ChatGPT hallucinates way too much to be useful&#8221;) to true believer (&#8220;I&#8217;d better become and AI-enhanced human fast or I&#8217;ll be obsolete soon!).</p>



<p>In order to understand this space better, control my user experience, as well as get the full mileage out of my hardware, I&#8217;ve been testing a simple software stack on my desktop using a few core components that work pretty well together. Here are my findings after a fair amount of trial and error. This is a moving target and I keep updating this entry as I learn more in this insanely fast-moving industry.</p>



<h1 class="wp-block-heading">1. Inference Engine Server &amp; Model Selection</h1>



<p>This entry assumes that you at least know what an LLM is, but if you&#8217;re unsure, start by reading <a href="https://www.perplexity.ai/search/explain-llms-in-simple-terms-f-QMwq5nCnTYepzpLKtrgITw#0" title="this introduction">this introduction</a>. To understand the entire Gen AI ecosystem, see LangChain&#8217;s <a href="https://python.langchain.com/docs/concepts/" title="">conceptual guide</a>.</p>



<h2 class="wp-block-heading">1.1. Executing LLMs on Your PC with Ollama</h2>



<p><a href="https://www.ollama.com/" title="">Ollama</a> lets you easily install <a href="https://github.com/ollama/ollama/blob/main/README.md#model-library" title="">popular models</a> such as LLama, Qwen, or most recently DeepSeek which has captured everyone&#8217;s attention in a way I&#8217;d never have imagined. The Ollama Windows executable comes with built-in <a href="https://github.com/ollama/ollama/blob/main/docs/gpu.md#gpu" title="">GPU support</a> and conveniently updates itself on restart whenever a new version is released. By itself Ollama can be queried via command line interface, when you access it directly through a web browser it just confirms whether it&#8217;s running.</p>



<h2 class="wp-block-heading">1.2. Choosing Foundational Models by Use Case</h2>



<p>It&#8217;s impossible to pin down a single model as there are new ones introduced at a breathtaking pace. Generic performance seems to be fairly close between Llama, Qwen, Mistral etc., so it&#8217;s worth starting backwards from your specific use cases and needs to pick a few models based on their positioning and evaluate how they work for you.</p>



<p>Are you coding or generating copy? Do you need a long <a href="https://www.perplexity.ai/search/what-is-an-llm-context-window-tECs0KwpSIe1AStrdOYPXA" title="">context window</a> or are you doing one-off pointed queries? See what people seem to like for your use case, and start from there. Don&#8217;t get stuck in analysis paralysis, it&#8217;s trivial to change models and even use several in parallel or in sequence as you&#8217;ll see in later in this post.</p>



<p>Aside from pure text handling, you&#8217;ll also run into multi-modal models that focus on going back and forth between vision/speech and text.</p>



<h2 class="wp-block-heading">1.3. Choosing Model Versions Based on Purpose &amp; Performance Tradeoffs</h2>



<h3 class="wp-block-heading">1.3.1. Base vs. Instruct Models</h3>



<p>Base LLMs provide foundational language understanding while instruction-tuned models deliver precision for directive-based workflows. Here is <a href="https://www.perplexity.ai/search/instruct-vs-base-llm-models-EhrEt9K4SV6qWvQ7e6Irkg" title="">Perplexity&#8217;s summary</a> to differentiate Instruct models from their base:</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th><strong>Scenario</strong></th><th><strong>Base LLM</strong></th><th><strong>Instruction-Tuned LLM</strong></th></tr></thead><tbody><tr><td>General knowledge queries</td><td><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Broad, unfiltered responses</td><td><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Less ideal for vague prompts</td></tr><tr><td>Structured task execution</td><td><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Requires heavy prompting</td><td><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Reliable for step-by-step tasks</td></tr><tr><td>Conversational interfaces</td><td><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Limited context retention</td><td><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Maintains dialogue flow</td></tr><tr><td>Creative writing</td><td><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> High flexibility</td><td><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Overly constrained by instructions</td></tr></tbody></table></figure>



<h3 class="wp-block-heading">1.3.2. Parameters</h3>



<p>Most models come in several size variants, either from the model maker themselves, or by third-parties in the open-source ecosystem. Which version you should choose depends on what your hardware can run. For instance, 70-billion-parameter models (see: <a href="https://kelvin.legal/understanding-large-language-models-what-are-paramters/" title="">what are <strong>parameters</strong>?</a>) are out of reach on my hardware as my RTX 4070 has &#8220;only&#8221; 12GB of VRAM. Meanwhile, running on CPU/RAM is very slow (though that might change), even on my 8-core Ryzen 7700X CPU with 128GB of RAM. To have a responsive chat-like experience similar to the popular SaaS chatbots, you&#8217;d need at least 10 tokens/s.</p>



<p>Of course, it&#8217;s OK to have to wait for an asynchronous response if you have a good chance to have a good zero-shot answer that saves you a lot of time, not everything can be instant gratification. It&#8217;s going to take a while before we get hundreds of tokens per second locally a la <a href="https://www.bbc.com/news/technology-49395577" title="">Cerebras</a>!</p>



<h3 class="wp-block-heading">1.3.3. Quantization</h3>


<div class="wp-block-image">
<figure class="alignright size-full is-resized"><a href="https://www.oliviertravers.com/wp-content/uploads/2024/11/image.png"><img loading="lazy" decoding="async" width="244" height="264" src="https://www.oliviertravers.com/wp-content/uploads/2024/11/image.png" alt="" class="wp-image-11565" style="width:179px;height:auto"/></a><figcaption class="wp-element-caption">GGUF from Hugging Face to Ollama</figcaption></figure></div>


<p>To address these issues, <a href="https://www.datacamp.com/tutorial/quantization-for-large-language-models" title=""><strong>quantization</strong></a> is a compression technique often applied to the larger models in an effort to reduce their memory/storage/energy consumption footprint. Here&#8217;s a <a href="https://smcleod.net/2024/07/understanding-ai/llm-quantisation-through-interactive-visualisations/" title="">good intro</a> on this, and a helpful <a href="https://huggingface.co/spaces/NyxKrage/LLM-Model-VRAM-Calculator" title="">LLM model VRAM calculator</a>.</p>



<p>You&#8217;ll find models come in plenty of <a href="https://www.perplexity.ai/search/how-to-choose-which-llm-versio-Dui65.I0RhqktLsQlzfZFg" title="">quant types</a>, think of them as T shirt sizes. As always, it&#8217;s all about trade-offs. Ollama should have <a href="https://www.restack.io/p/ollama-answer-quantization-techniques-cat-ai" title="">models labeled like</a> Q4_0, Q8_0, Q3_K_S, etc.</p>



<p>Beyond the models already listed by Ollama, you can use <a href="https://huggingface.co/docs/hub/ollama" title="">any (single file) <strong>GGUF</strong> model from Hugging Face</a>. Hugging Face tends to provide a broader range of quantization methods and more control over quantization parameters. But you don&#8217;t need to worry about any of this until you have your legs under you with LLMs.</p>



<h3 class="wp-block-heading">1.3.4. Distillation &amp; Merging</h3>



<p>In addition to quantization, distillation and/or merging are often applied to base models in an effort to create <a href="https://www.perplexity.ai/search/explain-llm-quantization-disti-R4VEvTMTSpCjAQIb7vq0fQ" title="">more efficient models</a> that can be deployed on common hardware. Meanwhile, <a href="https://huggingface.co/blog/mlabonne/abliteration" title="">abliteration</a> aims to uncensor models that come with a heavy-handed <a href="https://www.piratewires.com/p/against-safetyism" title="">safetyism</a> bias.</p>



<p>Be careful with shorthand model names: the smaller DeepSeek models you find on Ollama (e.g., <a href="https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B" title="">DeepSeek-R1-32B</a>) are not &#8220;R1 with only 32B parameters&#8221;, they&#8217;re &#8220;dense models distilled from DeepSeek-R1 based on Llama and Qwen&#8221;.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://www.oliviertravers.com/wp-content/uploads/2024/11/image-1.png"><img loading="lazy" decoding="async" width="717" height="340" src="https://www.oliviertravers.com/wp-content/uploads/2024/11/image-1.png" alt="" class="wp-image-11568" srcset="https://www.oliviertravers.com/wp-content/uploads/2024/11/image-1.png 717w, https://www.oliviertravers.com/wp-content/uploads/2024/11/image-1-300x142.png 300w, https://www.oliviertravers.com/wp-content/uploads/2024/11/image-1-624x296.png 624w" sizes="auto, (max-width: 717px) 100vw, 717px" /></a><figcaption class="wp-element-caption">Pick a model that performs reasonably well on your hardware, especially if you&#8217;re pursuing a ChatGPT-like streaming experience</figcaption></figure></div>


<p>Most people end up using a variety of models in different flavors attuned to each of their use cases.</p>



<h2 class="wp-block-heading">1.4. Doing Your Own Model Finetuning</h2>



<p>If you&#8217;d like to create your own model variants, Unsloth, which can be <a href="https://docs.unsloth.ai/get-started/installing-+-updating/windows-installation" title="">installed on Windows</a>, published a <a href="https://docs.unsloth.ai/" title="">well-written guide</a>. You can even <a href="https://unsloth.ai/blog/r1-reasoning" title="">train your own</a> R1 reasoning model. Don&#8217;t do this until you&#8217;re pretty deep in your LLM learning path!</p>



<h2 class="wp-block-heading">1.5. Inference Server Alternatives &amp; Why Llama.cpp Matters</h2>



<p>There are other options to run LLMs locally, such as:</p>



<ul class="wp-block-list">
<li><a href="https://www.perplexity.ai/search/ollama-vs-llamacpp-as-of-early-Gjujc6qkS_6CUj9syX4d4w#0" title="">LLama.cpp</a>, (which Ollama is built upon)</li>



<li><a href="https://github.com/janhq/cortex.cpp" title="">Cortex.cpp</a> (also based on llama.cpp)</li>



<li><a href="https://github.com/EricLBuehler/mistral.rs" title="">mistral.rs</a></li>



<li><a href="https://docs.vllm.ai/en/latest/index.html" title="">vLLM</a></li>



<li><a href="https://github.com/turboderp/exllamav2" title="">ExLlamaV2</a></li>



<li><a href="https://github.com/kvcache-ai/ktransformers" title="">ktransformers</a></li>
</ul>



<p>If you&#8217;re just getting started, Ollama will ease you in while alternatives cater to a more technical and demanding audience. Indeed, some people are indeed <a href="https://ahmadosman.com/blog/serving-ai-from-the-basement-part-ii/" title="">committed</a> to pushing the envelope! Some models such as Qwen2-VL <a href="https://github.com/ollama/ollama/issues/6564" title="">don&#8217;t work in Ollama</a>.</p>



<p>Even if you stick to Ollama as your main inference server, it&#8217;s worth installing LLama.cpp  to be able to join sharded models into a single file using <a href="https://github.com/ollama/ollama/issues/5245#issuecomment-2305577747" title="">this workaround</a>. You&#8217;ll find precompiled Windows binaries under <a href="https://github.com/ggerganov/llama.cpp/releases" title="">llama.cpp/releases</a>. Here&#8217;s a <a href="https://www.perplexity.ai/search/explain-the-differences-betwee-W0.7Fu5mQhmaaW_MHXNl.w" title="">summary</a> on how to choose the right binary depending on your CPU and GPU. On a modern build like mine with an NVIDIA GPU, you&#8217;ll want to run cuda-cu12.4 (see: <a href="https://www.perplexity.ai/search/what-is-cuda-and-why-it-matter-rUH2MdkWRl62k7KbpL8iAg#0" title="">what is CUDA?</a>). Be aware that <a href="https://github.com/ggerganov/llama.cpp/issues/11523" title="">recent builds</a> are <a href="https://github.com/ggerganov/llama.cpp/issues/10768" title="">triggering</a> Windows&#8217;s virus detection.</p>



<p>One such shared model is <a href="https://unsloth.ai/" title="">Unsloth</a>&#8216;s <a href="https://unsloth.ai/blog/deepseekr1-dynamic" title="">quantized version of DeepSeek-R1</a> that can realistically run on a (beefy) desktop. Once you&#8217;ve installed llama.cpp, open a command line in its folder and type something to the effect of:</p>



<pre class="wp-block-code"><code>llama-server.exe --model &quot;D:\Llamacpp\R1\DeepSeek-R1-UD-IQ1_S-00001-of-00003.gguf&quot; --port 10001 --ctx-size 1024 --n-gpu-layers 1</code></pre>



<p>Adapt the path, port, context size, and GPU layers to your machine. On an RX4070 with 12GB of VRAM, only 1 layer can be offloaded to the GPU. Some people are working on <a href="https://github.com/ggerganov/llama.cpp/pull/11446" title="">optimizations</a> (<a href="https://www.reddit.com/r/LocalLLaMA/comments/1iffgj4/deepseek_r1_671b_moe_llm_running_on_epyc_9374f/" title="">reddit thread</a>) specifically for DeepSeek&#8217;s novel architecture, stay tuned as I get the feeling more performance breakthroughs will keep coming. People are experimenting with <a href="https://www.reddit.com/r/LocalLLaMA/comments/1if7hm3/how_to_run_deepseek_r1_671b_fully_locally_on_a/" title="">CPU/RAM/SSD-based builds</a> with promising results. I&#8217;m excited by this approach which opens up hardware options and might get us somewhat out of the Nvidia tax.</p>



<p>(If you&#8217;re in a hurry to test it, someone posted a merged version of <a href="https://ollama.com/SIGJNF/deepseek-r1-671b-1.58bit" title="">deepseek-r1-671b-1.58bit</a> on Ollama.)</p>



<p>With the addition of <a href="https://github.com/ggerganov/llama.cpp/pull/9639" title="">tool call support</a>, llama.cpp can, as o3-mini <a href="https://chatgpt.com/share/679f91ee-8540-800c-be41-3f383453655d" title="">explains it</a>: &#8220;indicate &#8211; within its generated output &#8211; that it wants to invoke an external “tool” (which could be any external piece of functionality, like a calculator, a database query, or even another API) to perform some action or retrieve data. In other words, rather than the model simply producing text, it can now “call” a tool by outputting a specially formatted command (often in a structured format like JSON) that the hosting application can recognize, intercept, and execute.&#8221;</p>



<h1 class="wp-block-heading">2. Chat User Interface Clients</h1>



<h2 class="wp-block-heading">2.1. Open Webui</h2>


<div class="wp-block-image">
<figure class="alignright size-full is-resized"><a href="https://www.oliviertravers.com/wp-content/uploads/2024/08/image.png"><img loading="lazy" decoding="async" width="501" height="248" src="https://www.oliviertravers.com/wp-content/uploads/2024/08/image.png" alt="" class="wp-image-11298" style="width:319px;height:auto" srcset="https://www.oliviertravers.com/wp-content/uploads/2024/08/image.png 501w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-300x149.png 300w" sizes="auto, (max-width: 501px) 100vw, 501px" /></a><figcaption class="wp-element-caption">Does it kick the llama&#8217;s ass?</figcaption></figure></div>


<p>The command line is cool, but it&#8217;s more convenient to chat with the model(s) from a browser-based interface, which can be easily done with <a href="https://www.openwebui.com/" title="">Open WebUI</a>. Run it via Docker Desktop, and connect to Ollama from Open WebUI&#8217;s <em>Admin panel &gt; Settings &gt; Models</em>, by connecting to http://host.docker.internal:11434 (by default). Select or add models via Open WebUI&#8217;s search box.</p>



<p>Once that&#8217;s done, you can chat with your local LLM in the same way you&#8217;ve been using ChatGPT, meta.ai, perplexity.ai and their consorts. For additional cool points, you can invoke Open WebUI via <a href="https://learn.microsoft.com/en-us/windows/powertoys/run" title="">PowerToys Run</a> with the <a href="https://github.com/Daydreamer-riri/PowerToys-Run-WebSearchShortcut" title="">WebSearchShortcut plugin</a>:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><a href="https://www.oliviertravers.com/wp-content/uploads/2024/08/image-1.png"><img loading="lazy" decoding="async" width="635" height="518" src="https://www.oliviertravers.com/wp-content/uploads/2024/08/image-1.png" alt="" class="wp-image-11303" style="width:413px;height:auto" srcset="https://www.oliviertravers.com/wp-content/uploads/2024/08/image-1.png 635w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-1-300x245.png 300w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-1-624x509.png 624w" sizes="auto, (max-width: 635px) 100vw, 635px" /></a><figcaption class="wp-element-caption">PowerToys Run with my selection of &#8220;search engines&#8221;</figcaption></figure></div>


<p>You can <a href="https://docs.openwebui.com/features/#-collaboration" title="">share</a> your prompt/answer sequences via the Open WebUI website, though I wish they offered targeted sharing by recipient.</p>



<p>A very cool feature is that you can run your prompt against several models in parallel, like so:</p>



<figure class="wp-block-image size-large"><a href="https://www.oliviertravers.com/wp-content/uploads/2024/08/dualllm.png"><img loading="lazy" decoding="async" width="1024" height="388" src="https://www.oliviertravers.com/wp-content/uploads/2024/08/dualllm-1024x388.png" alt="" class="wp-image-11314" srcset="https://www.oliviertravers.com/wp-content/uploads/2024/08/dualllm-1024x388.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2024/08/dualllm-300x114.png 300w, https://www.oliviertravers.com/wp-content/uploads/2024/08/dualllm-768x291.png 768w, https://www.oliviertravers.com/wp-content/uploads/2024/08/dualllm-624x237.png 624w, https://www.oliviertravers.com/wp-content/uploads/2024/08/dualllm.png 1284w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Fighting in the red corner, weighing in at 8B parameters (screaming in Bruce Buffer&#8217;s voice). Msty can do this too.</figcaption></figure>



<p>Open WebUI is not just a chat interface though, it also comes with pipelines that promise to automate and chain processes before returning LLM messages, and the ability to customize models. One caveat: there&#8217;s <a href="https://docs.openwebui.com/troubleshooting/#reset-admin-password" title="">no easy way</a> to reset or recover your admin password, so store it carefully. There&#8217;s also support for artifacts, with <a href="https://github.com/nick-tonjum/open-webui-artifacts-overhaul" title="">a promising fork/branch</a> aiming to make it <a href="https://www.reddit.com/r/LocalLLaMA/comments/1ija3v4/deepseek_llama_33_openwebui_artifacts_overhaul/" title="">much more powerful</a>.</p>



<p>Since DeepSeek took the world by storm, here&#8217;s a <a href="https://docs.openwebui.com/tutorials/integrations/deepseekr1-dynamic/" title="">guide to use it in Openwebui</a>. I got only 0.46 tokens/s on a very simplistic test, so it&#8217;s not going to become my default local model for now!</p>



<figure class="wp-block-image size-large"><a href="https://www.oliviertravers.com/wp-content/uploads/2025/01/image-1.png"><img loading="lazy" decoding="async" width="1024" height="184" src="https://www.oliviertravers.com/wp-content/uploads/2025/01/image-1-1024x184.png" alt="" class="wp-image-11649" srcset="https://www.oliviertravers.com/wp-content/uploads/2025/01/image-1-1024x184.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2025/01/image-1-300x54.png 300w, https://www.oliviertravers.com/wp-content/uploads/2025/01/image-1-768x138.png 768w, https://www.oliviertravers.com/wp-content/uploads/2025/01/image-1-624x112.png 624w, https://www.oliviertravers.com/wp-content/uploads/2025/01/image-1.png 1166w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Cool PoC but too slow for practical use on my PC</figcaption></figure>



<h2 class="wp-block-heading">2.2. Msty &amp; Countless Alternatives</h2>



<p>A simpler, slick desktop app with support for RAG and workspaces can be found in <a href="https://msty.app/" title="">Msty</a>. There are many other options listed at the bottom of this entry.</p>



<h2 class="wp-block-heading">2.3. Hugging Chat</h2>



<p><a href="https://huggingface.co/chat/" title="">HuggingChat</a> is &#8220;open source alternative to ChatGPT.&#8221; at the moment I&#8217;m using the hosted version to demo my agents to colleagues while I&#8217;m traveling so I don&#8217;t have to access my PC remotely. You can also install it locally <a href="https://huggingface.co/docs/chat-ui/en/configuration/models/providers/ollama" title="">in combination with Ollama</a>. There is support for <a href="https://huggingface.co/docs/chat-ui/en/configuration/web-search" title="">web search</a> (with a <a href="https://huggingface.co/spaces/huggingchat/chat-ui/discussions/254" title="">v2.0</a> released mid September 2023) and <a href="https://huggingface.co/spaces/huggingchat/chat-ui/discussions/442" title="">dynamic prompts</a>. The later are poorly documented but <a href="https://huggingface.co/spaces/huggingchat/chat-ui/discussions/442#6742b6da022caab2f657fffa" title="">this thread</a> brings a measure of clarity on how they work.</p>



<h1 class="wp-block-heading">3. Workflows and RAG: Dify</h1>



<p>Anyone not living under a rock knows that LLMs tend to hallucinate credible-sounding but completely made up &#8220;facts&#8221;. That negates a significant part of their promised productivity savings. Install Dify &#8211; a tool that promises to make RAG implementation easy, among other benefits &#8211; <a href="https://docs.dify.ai/getting-started/install-self-hosted/docker-compose" title="">via Docker Compose</a> (<a href="https://www.perplexity.ai/search/update-dify-docker-compose-cL5TpvxrSzqDLZHBnLuLvQ#0" title="">update steps</a>) then <a href="https://docs.dify.ai/guides/model-configuration/ollama" title="">integrate</a> your Ollama models from <em>Settings &gt; Model provider</em>. I had to put my PC&#8217;s LAN IP address in the base URL, 127.0.0.1:11434 or localhost wouldn&#8217;t work (somehow I&#8217;m always tripped by host/container networking with Docker even though I&#8217;ve used Docker for 8+ years).</p>



<p>After a cursory look, Dify looks much more developed than OpenWebUI on the automation front, but it seems to only interact with one model at a time from Ollama, whereas OpenWebUI shows you all the models installed locally in Ollama. It aims to <a href="https://dify.ai/blog/dify-vs-langchain" title="">compete with LangChain</a> with a lower barrier to entry. Again, there are many competing options listed at the bottom of this post and I haven&#8217;t really settled on anything yet.</p>



<h1 class="wp-block-heading">4. LLMs for Text to Image Generation</h1>


<div class="wp-block-image">
<figure class="alignright size-large is-resized"><a href="https://www.oliviertravers.com/wp-content/uploads/2024/08/image-4.png"><img loading="lazy" decoding="async" width="1024" height="585" src="https://www.oliviertravers.com/wp-content/uploads/2024/08/image-4-1024x585.png" alt="" class="wp-image-11428" style="width:332px;height:auto" srcset="https://www.oliviertravers.com/wp-content/uploads/2024/08/image-4-1024x585.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-4-300x171.png 300w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-4-768x439.png 768w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-4-624x357.png 624w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-4.png 1344w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Image generated with an LLM prompt using Flux.dev in ComfyUI</figcaption></figure></div>


<p>Combining<a href="https://www.oliviertravers.com/running-ai-image-generation-on-your-windows-pc-beginner-friendly-starter-pack/" title=""> local Gen AI for images</a> with LLMs has been discussed for a while but is now booming because of how FLUX.1 was trained. I&#8217;m having a blast instructing a robot to instruct another robot:</p>



<ul class="wp-block-list">
<li>I am using a system prompt with Instruct models such as Cohere&#8217;s <a href="https://www.ollama.com/library/command-r" title="">Command R</a>, Gwen2.5 Instruct, or Mistral, to generate detailed image generation prompts <a href="https://github.com/stavsap/comfyui-ollama" title="">in ComfyUI</a> (node alternatives: <a href="https://github.com/griptape-ai/ComfyUI-Griptape" title="">Griptape</a>, <a href="https://github.com/SeargeDP/ComfyUI_Searge_LLM" title="">ComfyUI_Searge_LLM</a>).</li>



<li>You <a href="https://www.youtube.com/watch?v=g8C5ICIkiXs" title="">can call</a> ComfyUI (<a href="https://docs.openwebui.com/tutorial/images/" title="">tutorial</a>) from Open WebUI, use <a href="http://host.docker.internal:8188">http://host.docker.internal</a> to connect container apps to Windows apps (see <a href="https://www.docker.com/blog/how-docker-desktop-networking-works-under-the-hood/" title="">How Docker Desktop Networking Works Under the Hood</a>).</li>



<li>Similarly, Dify added <a href="https://github.com/langgenius/dify/pull/9447" title="">ComfyUI integration</a> in September 2024 (pointing to <a href="http://host.docker.internal:8881" title="">http://host.docker.internal:8881</a>).</li>



<li>You&#8217;ll have to create API-formatted versions of your workflows and think through what kind of workflows would make sense to summon from outside of ComfyUI.</li>



<li>One can also perform image-to-text using <a href="https://www.ollama.com/library/llava" title="">LLaVA</a> or <a href="https://www.perplexity.ai/search/florence2-comfy-xBE0EcsWQD2TjHmBB1BNWg" title="">Florence 2</a>.</li>
</ul>


<div class="wp-block-image">
<figure class="alignright size-full is-resized"><a href="https://www.oliviertravers.com/wp-content/uploads/2024/08/image-5.png"><img loading="lazy" decoding="async" width="716" height="969" src="https://www.oliviertravers.com/wp-content/uploads/2024/08/image-5.png" alt="" class="wp-image-11436" style="width:247px;height:auto" srcset="https://www.oliviertravers.com/wp-content/uploads/2024/08/image-5.png 716w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-5-222x300.png 222w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-5-624x844.png 624w" sizes="auto, (max-width: 716px) 100vw, 716px" /></a><figcaption class="wp-element-caption">Customizing a model in Open WebUI</figcaption></figure></div>


<p>My aim is to create the ultimate image generation LLM that covers photography best practices and nothing extraneous. I don&#8217;t want 10 customized LLMs just for image generation, I want a virtual photographer competent at everything from epic battle scenes to architectural shoots to close up portraits. I&#8217;ve casually tested various LLMs to see which one is the fastest while still faithfully following my instructions but have yet to see how the latest DeepSeek distillations work for this use case.</p>



<p>Various moving parts are needed to get there:</p>



<ul class="wp-block-list">
<li><a href="https://docs.cohere.com/docs/prompting-command-r" title="">Prompting Command R and R+</a></li>



<li><a href="https://docs.cohere.com/docs/crafting-effective-prompts" title="">Crafting effective prompts</a></li>



<li><a href="https://stability.ai/learning-hub/stable-diffusion-3-5-prompt-guide" title="">Stable Diffusion Prompting Guide</a> (now somewhat similar to Flux)</li>



<li><a href="https://docs.cohere.com/docs/predictable-outputs" title="">Predictable outputs</a></li>



<li><a href="https://docs.cohere.com/docs/retrieval-augmented-generation-rag" title="">RAG</a></li>



<li><a href="https://www.perplexity.ai/search/explain-llm-parameters-like-to-Y7hdV0pLRuC9eX1v4HzZ1w" title="">Sampling parameters: Top-K, Top-P, Temperature, TFS</a> &#8211; here&#8217;s a <a href="https://smcleod.net/2024/07/llm-parameter-playground/" title="">tool</a> to explore what they do.</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://www.oliviertravers.com/wp-content/uploads/2024/08/image-3.png"><img loading="lazy" decoding="async" width="1024" height="728" src="https://www.oliviertravers.com/wp-content/uploads/2024/08/image-3-1024x728.png" alt="" class="wp-image-11354" srcset="https://www.oliviertravers.com/wp-content/uploads/2024/08/image-3-1024x728.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-3-300x213.png 300w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-3-768x546.png 768w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-3-624x444.png 624w, https://www.oliviertravers.com/wp-content/uploads/2024/08/image-3.png 1491w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">LLM-generated expanded prompt combined with text-to-image workflow</figcaption></figure>



<h1 class="wp-block-heading">5. Search: Local Doesn&#8217;t Seem Quite There Yet</h1>



<p><a href="https://github.com/ItzCrazyKns/Perplexica" title="">Perplexica</a> openly aims to mimic Perplexity&#8217;s user experience, but it&#8217;s not nearly fast enough for something I use dozens of times a day to get snap answers. There&#8217;s also <a href="https://github.com/brunostjohn/perplexideez" title="">perplexideez</a> which I have yet to try. For search I&#8217;m currently going back and forth between Perplexity Pro and ChatGPT Search.</p>



<h1 class="wp-block-heading">6. Stack Alternatives and Complements</h1>



<h2 class="wp-block-heading">6.1. Staying Somewhat Up to Date and Pursuing Specific Goals</h2>



<p>There is so much to learn and test! I&#8217;ve barely scratched the surface in this entry, and there are countless startups and open-source projects in this space. I&#8217;m following subreddits such as <a href="https://www.reddit.com/r/LocalLLaMA/" title="">/r/LocalLLaMA</a> to educate myself, then I ask LLMs pointed questions to understand the underlying concepts and compare software as I explore this deep rabbit hole.</p>



<p>It&#8217;s impossible to keep up with the onslaught of daily news, and that&#8217;s OK. My focus as of early 2025 remains set on RAG, workflow automation, and prompt optimization to hone solutions for my main work and personal use cases, which overlap to a large extent. The main use cases where I&#8217;m getting tangible value include:</p>



<ul class="wp-block-list">
<li>Business and financial research</li>



<li>Extended comparisons in any category (e.g. software, products)</li>



<li>Travel planning</li>



<li>Role playing high stake conversations and negotiations</li>



<li>Preparing RFP responses and honing sales pitches</li>



<li>Summarizing technical documentation</li>



<li>Reviewing my own writing (example at the end of this entry)</li>
</ul>



<h2 class="wp-block-heading">6.2. LLM Frontends &amp; Agentic Orchestration</h2>



<p>This is the most hyped category in 2024/early 2025, with many options that cover the gamut from no-code GUIs to pro-code development frameworks. As always in software, you&#8217;re faced with a confusing mishmash of somewhat overlapping but not entirely competing alternatives:</p>



<ul class="wp-block-list">
<li><a href="https://lmstudio.ai/" title="">LM Studio</a>, which I&#8217;d like to deploy using my <a href="https://www.perplexity.ai/search/share-models-between-lm-studio-Q55mzceXTKqZ7u.Uv33LvQ" title="">Ollama-managed models</a> (<a href="https://smcleod.net/2024/06/gollama-ollama-model-manager/" title="">Gollama</a> should do the trick now that support for Windows has been added). Looks good but is closed source.</li>



<li><a href="https://jan.ai/" title="">JanAI</a> &#8211; &#8220;Open source ChatGPT-alternative that runs 100% offline.&#8221;</li>



<li><a href="https://github.com/camel-ai/owl" title="">OWL</a> &#8211; &#8220;Optimized Workforce Learning for General Multi-Agent Assistance in Real-World Task Automation.&#8221;</li>



<li>Microsoft <a href="https://microsoft.github.io/autogen/0.2/" title="">AutoGen</a> &#8211; &#8220;an Open-Source Programming Framework for Agentic AI&#8221;, <a href="https://www.microsoft.com/en-us/research/articles/magentic-one-a-generalist-multi-agent-system-for-solving-complex-tasks/" title="">Magentic-One</a> &#8211; &#8220;A Generalist Multi-Agent System for Solving Complex Tasks&#8221;, and <a href="https://microsoft.github.io/autogen/0.2/docs/autogen-studio/getting-started/" title="">AutoGen Studio</a>. As of Feb. 2025 I couldn&#8217;t figure out how to use Autogen with Ollama, I&#8217;ll revisit once the <a href="https://github.com/microsoft/autogen/issues/3817" title="">Ollama client</a> and <a href="https://github.com/microsoft/autogen/issues/5118" title="">documentation</a> have been released.</li>



<li><a href="https://github.com/ag2ai/ag2" title="">AG2</a> &#8211; AutoGen fork led by someone who left Microsoft for Google.</li>



<li><a href="https://langchain-ai.github.io/langgraph/" title="">LangGraph</a> &#8211; &#8220;library for building stateful, multi-actor applications with LLMs, used to create agent and multi-agent workflows.&#8221;</li>



<li><a href="https://nexa.ai/" title="">Nexa.AI</a> &#8211; &#8220;Build AI apps with On-Device Models &amp; Run locally on any device.&#8221;</li>



<li><a href="https://github.com/openai/swarm" title="">OpenAI Swarm</a> via <a href="https://github.com/victorb/ollama-swarm" title="">ollama-swarm</a>.</li>



<li><a href="https://gpt4all.io/" title="">Gpt4All</a> &#8211; &#8220;Free-to-use, locally running, privacy-aware chatbot.&#8221;</li>



<li><a href="https://ai.pydantic.dev/" title="">PydanticAI</a> &#8211; &#8220;Python Agent Framework designed to make it less painful to build production grade applications with Generative AI.&#8221;</li>



<li><a href="https://anythingllm.com/" title="">AnythingLLM</a> &#8211; &#8220;all-in-one Desktop &amp; Docker AI application with built-in RAG, AI agents, and more.&#8221;</li>



<li><a href="https://github.com/frdel/agent-zero" title="">Agent Zero</a> &#8211; AI framework for personal general-purpose assistants.</li>



<li><a href="https://docs.llamaindex.ai/" title="">LlamaIndex</a> &#8211; &#8220;Framework for building context-augmented generative AI applications with LLMs including agents and workflows.&#8221;</li>



<li><a href="https://haystack.deepset.ai/" title="">Haystack</a> &#8211; &#8220;The Production-Ready Open Source AI Framework&#8221;.</li>



<li><a href="https://fastagency.ai/" title="">FastAgency</a> &#8211; &#8220;unified programming interface for deploying agentic workflows&#8221; that complements rather than competes with AutoGen et. al.</li>



<li><a href="https://neuml.github.io/txtai/" title="">textai</a>: &#8220;all-in-one embeddings database for semantic search, LLM orchestration and language model workflows.&#8221;</li>



<li><a href="https://github.com/meta-llama/llama-recipes/tree/main/recipes/quickstart/NotebookLlama" title="">NotebookLlama</a> &#8211; &#8220;An Open Source version of NotebookLM.&#8221; Meta&#8217;s take of Google&#8217;s impressive podcast generator.</li>



<li><a href="https://n8n.io/" title="">N8N</a> &#8211; &#8220;AI-native workflow automation&#8221;.</li>



<li><a href="https://rivet.ironcladapp.com/" title="">Rivet</a> &#8211; &#8220;Open-Source Visual AI Programming Environment&#8221;.</li>



<li><a href="https://github.com/StacklokLabs/promptwright" title="">Promptwright</a> &#8211; Synthetic dataset generation library that works with Ollama.</li>



<li><a href="https://docs.steel.dev/overview/intro-to-steel" title="">Steel</a> &#8211; an open-source browser API purpose-built for AI agents.</li>



<li><a href="https://vectorshift.ai/">VectorShift</a>&nbsp;&#8211; “integrated framework of no-code, low-code, and out of the box generative AI solutions to build AI search engines, assistants, chatbots, and automations.”</li>



<li><a href="https://www.crewai.com/" title="">CrewAI</a> &#8211; &#8220;Streamline workflows across industries with powerful AI agents. Build and deploy automated workflows using any LLM and cloud platform.&#8221;</li>
</ul>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Flowise vs Langflow vs Dify vs Vectorshift vs Voiceflow | Best No Code AI Tool" width="625" height="352" src="https://www.youtube.com/embed/j6qYNppa4vo?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Quite a few competitors emerged, most are likely to disappear eventually</figcaption></figure>



<h2 class="wp-block-heading">6.3. RAG</h2>



<ul class="wp-block-list">
<li><a href="https://github.com/foldl/chatllm.cpp/blob/master/docs/rag.md" title="">Tutorial on RAG</a></li>



<li><a href="https://github.com/weaviate/Verba" title="">Verba</a></li>



<li><a href="https://unstructured.io/" title="">Unstructured</a> &#8211; get complex formats such as PDF and PPTX ready for RAG.</li>
</ul>



<h2 class="wp-block-heading">6.4. Prompt Management, Evaluation, Iteration</h2>



<ul class="wp-block-list">
<li><a href="https://latitude.so/" title="">Latitude</a></li>



<li><a href="https://github.com/thunlp/OpenPrompt" title="">OpenPrompt</a></li>



<li><a href="https://github.com/hegelai/prompttools" title="">prompttools</a></li>



<li><a href="https://github.com/PromptSail/prompt_sail" title="">Prompt Sail</a></li>
</ul>



<h2 class="wp-block-heading">6.5. Embedding Models</h2>



<ul class="wp-block-list">
<li><a href="https://huggingface.co/nomic-ai/nomic-embed-text-v1" title="">Nomic</a></li>
</ul>



<h2 class="wp-block-heading">6.6. Vector Databases</h2>



<ul class="wp-block-list">
<li><a href="https://qdrant.tech/" title="">Qdrant</a></li>
</ul>



<h2 class="wp-block-heading">6.7. Marketplaces</h2>



<ul class="wp-block-list">
<li><a href="https://openrouter.ai/">OpenRouter</a>&nbsp;– “Find the best models &amp; prices for your prompts.”</li>



<li><a href="https://soverin.ai/" title="">Soverin</a> &#8211; &#8220;Discover and buy the best AI apps and agents.&#8221;</li>



<li><a href="https://metaschool.so/ai-agents" title="">Metaschool AI Agents Marketplace</a></li>
</ul>



<h2 class="wp-block-heading">6.8. Other Desktop Tools</h2>



<ul class="wp-block-list">
<li><a href="https://claude.ai/download" title="">Claude for Desktop</a> + <a href="https://www.claudemcp.com/" title="">Model Context Protocol (MCP)</a> servers
<ul class="wp-block-list">
<li><a href="https://www.pulsemcp.com/use-cases" title="">Use cases</a></li>



<li><a href="https://www.mcpserverfinder.com/" title="">MCP Server Finder</a></li>
</ul>
</li>



<li><a href="https://openai.com/chatgpt/download/" title="">ChatGPT</a></li>



<li><a href="https://www.perplexity.ai/platforms" title="">Perplexity</a></li>
</ul>



<h2 class="wp-block-heading">7. Further Reading</h2>



<ul class="wp-block-list">
<li><a href="https://www.tamingllms.com/markdown/toc.html" title="">Taming LLMs</a> &#8211; A Practical Guide to LLM Pitfalls with Open Source Software</li>
</ul>



<h1 class="wp-block-heading">8. Claude 3.5 Sonnet&#8217;s Assessment of this Entry, As of January 2025</h1>



<p>Yes, I realize the irony of asking a SaaS closed model!</p>



<h2 class="wp-block-heading">8.1. <strong>Prompt</strong></h2>



<p>Analyze the following blog post for accuracy, logical structure, and quality of writing.</p>



<h2 class="wp-block-heading">8.2. Response</h2>



<p>I&#8217;ll analyze this blog post from January 2025 about running LLMs locally, examining its structure, technical accuracy, and writing quality.</p>



<p><strong>Structure Analysis: The post is well-organized with a clear progression:</strong></p>



<ol class="wp-block-list">
<li>Personal context and motivation</li>



<li>Core components of the stack</li>



<li>Detailed breakdown of each component</li>



<li>Alternatives and future directions</li>
</ol>



<p><strong>Strengths:</strong></p>



<ul class="wp-block-list">
<li>Clear table of contents and logical flow</li>



<li>Practical, hands-on approach with specific tools and configurations</li>



<li>Good balance of technical detail and accessibility</li>



<li>Includes useful visuals/screenshots to illustrate concepts</li>



<li>Links to additional resources and documentation</li>



<li>Acknowledges limitations and tradeoffs</li>
</ul>



<p><strong>Technical Accuracy: The post appears technically sound, with accurate descriptions of:</strong></p>



<ul class="wp-block-list">
<li>GPU memory constraints and VRAM requirements</li>



<li>Quantization concepts and their impact</li>



<li>Docker networking considerations</li>



<li>Current state of local LLM deployment tools</li>
</ul>



<p><strong>Writing Quality: The writing style is engaging and professional while remaining conversational:</strong></p>



<ul class="wp-block-list">
<li>Personal experience is woven in effectively</li>



<li>Technical concepts are explained clearly</li>



<li>Good use of analogies (e.g., &#8220;T shirt sizes&#8221; for quantization types)</li>



<li>Appropriate level of detail for the target audience</li>
</ul>



<p><strong>Areas for Improvement:</strong></p>



<ol class="wp-block-list">
<li>Some sections could be more detailed, particularly the RAG implementation with Dify</li>



<li>The search section feels incomplete compared to other sections</li>



<li>The alternatives section at the end, while comprehensive, could benefit from more organization/categorization</li>



<li>Some technical terms (like &#8220;abliteration&#8221;) could use more explanation</li>
</ol>



<p><strong>Overall Assessment</strong>: This is a high-quality technical blog post that successfully bridges the gap between introductory and advanced content. It provides practical value while maintaining readability and technical accuracy. The author clearly has hands-on experience with the tools and technologies discussed.</p><p>The post <a href="https://www.oliviertravers.com/running-llms-locally-the-getting-started-windows-stack/">Running LLMs Like DeepSeek Locally: The Getting Started Windows Stack</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.oliviertravers.com/running-llms-locally-the-getting-started-windows-stack/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">11297</post-id>	</item>
		<item>
		<title>Connecting to Fabric Lakehouse, Warehouse, Power BI Datamart, and PowerApps Dataverse’s SQL Server from Desktop Tools and External Services</title>
		<link>https://www.oliviertravers.com/power-bi-datamarts-sql-server-desktop-tools-connection/</link>
					<comments>https://www.oliviertravers.com/power-bi-datamarts-sql-server-desktop-tools-connection/#comments</comments>
		
		<dc:creator><![CDATA[otravers]]></dc:creator>
		<pubDate>Mon, 03 Jun 2024 15:59:00 +0000</pubDate>
				<category><![CDATA[Power BI & Fabric]]></category>
		<guid isPermaLink="false">https://www.oliviertravers.com/?p=10120</guid>

					<description><![CDATA[<p>The main appeal of Power BI&#8217;s Datamart capability is arguably the fact it includes a SQL Server instance that&#8217;s optimized for analytical purposes and is fully managed, yet still exposes... <a href="https://www.oliviertravers.com/power-bi-datamarts-sql-server-desktop-tools-connection/">Read more &#187;</a></p>
<p>The post <a href="https://www.oliviertravers.com/power-bi-datamarts-sql-server-desktop-tools-connection/">Connecting to Fabric Lakehouse, Warehouse, Power BI Datamart, and PowerApps Dataverse’s SQL Server from Desktop Tools and External Services</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>The main appeal of Power BI&#8217;s <a data-type="post" data-id="10063" href="https://www.oliviertravers.com/power-bi-dataset-dataflow-datamart-dataverse-sql-server/">Datamart</a> capability is arguably the fact it includes a SQL Server instance that&#8217;s optimized for analytical purposes and is fully managed, yet still <a href="https://docs.microsoft.com/en-us/power-bi/transform-model/datamarts/datamarts-analyze#analyze-outside-the-editor">exposes its content to the outside</a> via a SQL endpoint. This is a welcome change from the approach Microsoft took with dataflows, whose underlying data lake storage is not exposed to the outside unless you Bring Your Own Storage, a <a href="https://docs.microsoft.com/en-us/power-bi/transform-model/dataflows/dataflows-azure-data-lake-storage-integration">fairly tedious exercise</a> that adds costs on top of your Power BI licenses.</p>



<p>Your connection string will look something like this:</p>



<p><em>abunchofrandomlettersandnumbers.<strong>datamart</strong>.pbidedicated.windows.net</em></p>



<p>Armed with this string you&#8217;d think you can connect easily to the database, but it turned out to be hit-and-miss as of the early Public Preview circa June 2022. At the end of January 2023 Microsoft <a href="https://powerbi.microsoft.com/en-us/blog/power-bi-datamart-january-2023-feature-summary/" title="">announced</a> that connectivity had extended to any SQL client, which I have been able to corroborate with help from Product Manager Salil Kanade (thanks!). So let&#8217;s look at the many ways you can access your datamart&#8217;s database.</p>



<p>With the launch of Fabric, Microsoft took the Datamart approach to 11 with SQL endpoints for its Lakehouse and Warehouse workloads, which look and feel like an extension of datamarts. But datamarts continue to have their own niche because of their availability within Power BI Premium Per User.</p>



<h1 class="wp-block-heading">1. Fabric Datamart/Warehouse/Lakehous SQL Endpoints: Desktop &amp; Cloud Connectivity Options</h1>



<h2 class="wp-block-heading">1.1. Power BI Desktop</h2>



<p>You can easily connect to Fabric&#8217;s various SQL endpoints from Power BI Desktop after choosing SQL Server as the source (<a href="https://learn.microsoft.com/en-us/powerquery-m/sql-database"><strong>Sql.Database</strong></a>) or Azure SQL (<a href="https://learn.microsoft.com/en-us/powerquery-m/sql-databases"><strong>Sql.Databases</strong></a>) then authenticating with an organizational (i.e. Microsoft) account that has access to the datamart.</p>


<div class="wp-block-image">
<figure class="alignright size-full"><a href="https://www.oliviertravers.com/wp-content/uploads/2023/04/image.png"><img loading="lazy" decoding="async" width="231" height="231" src="https://www.oliviertravers.com/wp-content/uploads/2023/04/image.png" alt="" class="wp-image-11014" srcset="https://www.oliviertravers.com/wp-content/uploads/2023/04/image.png 231w, https://www.oliviertravers.com/wp-content/uploads/2023/04/image-150x150.png 150w, https://www.oliviertravers.com/wp-content/uploads/2023/04/image-180x180.png 180w, https://www.oliviertravers.com/wp-content/uploads/2023/04/image-60x60.png 60w" sizes="auto, (max-width: 231px) 100vw, 231px" /></a></figure></div>


<p>The <a href="https://powerbi.microsoft.com/en-us/blog/power-bi-june-2022-feature-summary/#post-19703-_Toc105516665">June 2022 version</a> of Power BI Desktop added connectivity to Datamarts via the user interface, but this originally only listed the auto-generated Direct Query datasets, not their underlying databases. If you use this connector you&#8217;ll create a <a href="https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-report-lifecycle-datasets">Live Connection</a> report (or a Direct Query connection against the dataset in case you turn your model into a composite one), not a full-fledged data model.</p>



<p>Following the July 2022 release, browsing datamarts from <em>Get Data &gt; Datamarts</em> surfaces up data hub info and lets you choose whether to connect to the datamart&#8217;s dataset or to its SQL endpoint. When you choose the latter, it previously used the Sql.Databases connector. However, As of the March 2023 Power BI Desktop version, this is now using a new <a href="https://learn.microsoft.com/en-us/powerquery-m/accessing-data-functions" title="undocumented">undocumented</a> <strong>PowerBI.Datamarts</strong> connector. Unlike the regular SQL connectors, this one doesn&#8217;t offer the option to insert a SQL statement.</p>



<figure class="wp-block-image size-full"><a href="https://www.oliviertravers.com/wp-content/uploads/2022/07/image.png"><img loading="lazy" decoding="async" width="869" height="496" src="https://www.oliviertravers.com/wp-content/uploads/2022/07/image.png" alt="" class="wp-image-10320" srcset="https://www.oliviertravers.com/wp-content/uploads/2022/07/image.png 869w, https://www.oliviertravers.com/wp-content/uploads/2022/07/image-300x171.png 300w, https://www.oliviertravers.com/wp-content/uploads/2022/07/image-768x438.png 768w, https://www.oliviertravers.com/wp-content/uploads/2022/07/image-624x356.png 624w" sizes="auto, (max-width: 869px) 100vw, 869px" /></a><figcaption class="wp-element-caption">Well done!</figcaption></figure>



<h2 class="wp-block-heading">1.2. Other Desktop tools</h2>



<ul class="wp-block-list">
<li>You can easily connect from <strong>Excel</strong> <strong>Desktop</strong>.</li>



<li><strong>Azure Data Studio</strong> wouldn&#8217;t work until I updated it to the latest version (1.36.2 at the time), at which point the connection could be established. No need to specify the port, use AAD (Universal with MFA support) authentication, leave everything else to default or empty.</li>



<li><strong>SSMS</strong> 18 GA <a href="https://community.powerbi.com/t5/Service/Datamart-SQL-Server-Connection-String-Details-Port-number-Share/m-p/2540097/thread-id/161429">works</a> as does <a href="https://learn.microsoft.com/en-us/sql/ssms/release-notes-ssms?view=sql-server-ver16" title="SSMS 19 GA">SSMS 19 GA</a> (SSMS 19 Preview did not because of a bug).</li>



<li>You can now set up an <strong>ODBC DSN</strong> with the latest <a href="https://docs.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver16">v18 SQL ODBC driver</a>.</li>



<li>I was able to connect with <strong>Dbeaver</strong> using the SQL Server driver with Active Directory MFA authentication after installing the following artifacts from <em>Database &gt; Driver Manager</em> [edit: as of Dbeaver 23.2 simply use the <strong>Azure SQL Server</strong> driver which just works]:</li>
</ul>



<pre class="wp-block-code"><code>&lt;dependency&gt;
    &lt;groupId&gt;com.microsoft.azure&lt;/groupId&gt;
    &lt;artifactId&gt;msal4j&lt;/artifactId&gt;
    &lt;version&gt;1.13.3&lt;/version&gt;
&lt;/dependency&gt;
 
&lt;dependency&gt;
    &lt;groupId&gt;com.microsoft.sqlserver&lt;/groupId&gt;
    &lt;artifactId&gt;mssql-jdbc_auth&lt;/artifactId&gt;
    &lt;version&gt;11.2.1.x86&lt;/version&gt;
&lt;/dependency&gt;


&lt;dependency&gt;
    &lt;groupId&gt;com.microsoft.sqlserver&lt;/groupId&gt;
    &lt;artifactId&gt;mssql-jdbc&lt;/artifactId&gt;
    &lt;version&gt;12.1.0.jre11-preview&lt;/version&gt;
&lt;/dependency&gt;

&lt;dependency&gt;
    &lt;groupId&gt;com.microsoft.aad&lt;/groupId&gt;
    &lt;artifactId&gt;adal&lt;/artifactId&gt;
    &lt;version&gt;4.2.2&lt;/version&gt;
&lt;/dependency&gt;</code></pre>



<p>Make sure to show all database and schemas, not just master. This works with Power BI datamarts as well as Fabric data warehouses and lakehouses. The latter&#8217;s endpoint looks like this:</p>



<p><em>abunchofrandomlettersandnumbers.<strong>datawarehouse</strong>.pbidedicated.windows.net</em></p>



<p>If you can&#8217;t connect with <em>any</em> of the aforementioned desktop tools then check that your local firewall is not blocking port 1433. Note that <a href="https://docs.microsoft.com/en-us/power-bi/enterprise/service-security-private-links">Private Endpoints</a> were not supported as of 2023.</p>



<h2 class="wp-block-heading">1.3. Cloud Services</h2>



<ul class="wp-block-list">
<li>I could connect to both the datamart and lakehouse/warehouse SQL endpoints without a hitch from a <strong>Power BI dataflow </strong>as well as a <strong>Fabric dataflow Gen2</strong>. Do I want to put a dataflow downstream of a datamart? Not sure about that, but that&#8217;s a consideration for another day.</li>



<li>In a <strong>PowerApps dataflow</strong> I was able to connect, even across tenants, as of January 2023. This used to fail back in mid 2022. Make sure to sign in when you set up the connection, you can use &#8220;master&#8221; as the database name.</li>



<li>You can connect from Power Automate, use <em>Azure AD Integrated</em> as the authentication type for your SQL connection. In the flow you&#8217;ll need to paste your server name and the long database name, it won&#8217;t offer an option to auto-populate. There were no datamart-specific triggers or actions as of February 2023.
<ul class="wp-block-list">
<li>A datamart&#8217;s database is <em>not</em> listed under &#8220;SQL Databases&#8221; in the Azure portal.</li>
</ul>
</li>



<li>Power BI is not listed in the <a href="https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/managed-identities-status">list of resources</a> that support managed identities or service principals, so you can&#8217;t connect <a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-identity-access-azure-sql-with-managed-identity?WT.mc_id=AZ-MVP-5003408">from an <strong>Azure Function</strong></a> or <strong>Azure Data Factory</strong>, but that may change in the future.</li>
</ul>



<p>Regardless of the tool, once you connect you&#8217;ll see a database with a somewhat ugly name. Within it, you&#8217;ll see nothing under Tables, everything is exposed via Views where you&#8217;ll find your data (prefaced with the &#8220;model&#8221; schema) as well as metadata about any relationships you might have created in the service.</p>



<p>You&#8217;ll only be able to run DQL queries so you won&#8217;t be able to, say, create your own views via SQL. People have been clamoring for DDL and DML support, and it sounds like that&#8217;s coming soon.</p>



<p>I&#8217;ve been advising Power BI developers to get some <a href="https://www.oliviertravers.com/sql-performance-tuning-power-bi/" title="SQL Performance Tuning for Power BI Devs Who Don’t Know Database Architecture">SQL performance-tuning skills</a>, it will be interesting to see what&#8217;s automatically managed for you vs. what you might be able to audit or even control yourself.</p>



<p>Finally, a significant limitation is that the datamart is not visible via the XMLA endpoint so you can&#8217;t work with it <a href="https://www.oliviertravers.com/power-bi-programmatic-options-rest-apis-powershell-tmsl-tom-tabular-editor-scripting/" title="Making Sense of Power BI Programmatic Options: REST APIs, PowerShell, TMSL, TOM, Tabular Editor Scripting">programmatically</a> or via <a href="https://www.oliviertravers.com/power-bi-third-party-tools-development-addons/" title="Third-Party Tools to Ease Power BI Development and Increase Analyst Productivity">third-party tools</a> such as Tabular Editor. </p>



<h2 class="wp-block-heading">1.4. So Which Tool Should I Use? It Depends on How Deep You Want to Go</h2>


<div class="wp-block-image is-resized">
<figure class="alignright size-full"><a href="https://www.oliviertravers.com/wp-content/uploads/2022/06/sql-pq.jpg"><img loading="lazy" decoding="async" width="681" height="316" src="https://www.oliviertravers.com/wp-content/uploads/2022/06/sql-pq.jpg" alt="" class="wp-image-10173" style="width:345px;height:auto" srcset="https://www.oliviertravers.com/wp-content/uploads/2022/06/sql-pq.jpg 681w, https://www.oliviertravers.com/wp-content/uploads/2022/06/sql-pq-300x139.jpg 300w, https://www.oliviertravers.com/wp-content/uploads/2022/06/sql-pq-624x290.jpg 624w" sizes="auto, (max-width: 681px) 100vw, 681px" /></a><figcaption class="wp-element-caption">PQ&#8217;s SQL</figcaption></figure></div>


<p>For ad hoc queries you can use the Visual Editor in the datamart service &#8211; which generates SQL queries via Power Query &#8211; or write your own SQL queries. You can access visual queries by right clicking on your step and selecting &#8220;View data source query&#8221;. It&#8217;s now possible to save visual and SQL queries, which was not the case at Preview launch. That said, you can be more productive using a desktop tool.</p>



<p>Azure Data Studio is a good choice as it&#8217;s free, relatively lightweight, and cross-platform. At first I thought that SSMS doesn&#8217;t add a lot of value in this instance as its administrative and user management tools appear mostly irrelevant to the datamart&#8217;s already tightly managed SQL server. I then noticed that <a href="https://learn.microsoft.com/en-us/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store?view=sql-server-ver16" title="Query Store">Query Store</a> is enabled by default in a datamart, hinting that there are use cases where SSMS is superior to ADS for datamarts.</p>



<p>I also tested SSMS&#8217;s SQL Server Import and Export Wizard as well as Generate Scripts and found that both work to automate the copying of objects from your datamart&#8217;s database into an on-premises server (see <a href="https://community.powerbi.com/t5/Service/Copy-Power-BI-data-mart-tables-to-onprem-SQL-server/m-p/3167312#M192563" title="this community thread">this community thread</a> for details).</p>



<figure class="wp-block-image size-large"><a href="https://www.oliviertravers.com/wp-content/uploads/2023/02/image.png"><img loading="lazy" decoding="async" width="1024" height="447" src="https://www.oliviertravers.com/wp-content/uploads/2023/02/image-1024x447.png" alt="" class="wp-image-10913" srcset="https://www.oliviertravers.com/wp-content/uploads/2023/02/image-1024x447.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2023/02/image-300x131.png 300w, https://www.oliviertravers.com/wp-content/uploads/2023/02/image-768x335.png 768w, https://www.oliviertravers.com/wp-content/uploads/2023/02/image-1536x670.png 1536w, https://www.oliviertravers.com/wp-content/uploads/2023/02/image-624x272.png 624w, https://www.oliviertravers.com/wp-content/uploads/2023/02/image.png 2023w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">The Datamart&#8217;s database is managed for you, but it&#8217;s not an entirely opaque black box. Pictured here: Query Store.</figcaption></figure>



<p>Note however that Fabric is not meant to be a transactional database, and scripts that work in SQL won&#8217;t necessarily translate in a Fabric data warehouse. See <a href="https://techcommunity.microsoft.com/t5/fasttrack-for-azure/data-warehouse-script-generation-in-microsoft-fabric-a/ba-p/4110603?WT.mc_id=DP-MVP-5004990" title="">Data Warehouse Script Generation in Microsoft Fabric: A Comprehensive Guide</a>.</p>



<p>In Azure Data Studio you can save queries individually as .sql files or put your favorites in a <a href="https://www.sqlshack.com/sql-notebooks-introduction-and-overview/">SQL notebook</a> like pictured below:</p>



<figure class="wp-block-image size-large"><a href="https://www.oliviertravers.com/wp-content/uploads/2022/06/notebook.jpg"><img loading="lazy" decoding="async" width="1024" height="505" src="https://www.oliviertravers.com/wp-content/uploads/2022/06/notebook-1024x505.jpg" alt="" class="wp-image-10201" srcset="https://www.oliviertravers.com/wp-content/uploads/2022/06/notebook-1024x505.jpg 1024w, https://www.oliviertravers.com/wp-content/uploads/2022/06/notebook-300x148.jpg 300w, https://www.oliviertravers.com/wp-content/uploads/2022/06/notebook-768x379.jpg 768w, https://www.oliviertravers.com/wp-content/uploads/2022/06/notebook-624x308.jpg 624w, https://www.oliviertravers.com/wp-content/uploads/2022/06/notebook.jpg 1379w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Bob Duffy goes more in depth here: <a href="https://prodata.ie/2024/06/02/why-ssms-is-still-king-over-ads-and-fabric-explorer/" title="">Why SSMS is still king over ADS and Fabric Explorer?</a></p>



<h1 class="wp-block-heading">2. Somewhat Related Bonuses</h1>



<h2 class="wp-block-heading">2.1. Microsoft Fabric Data Warehouse Projects</h2>



<p>See <a href="https://www.kevinrchant.com/2024/05/20/download-a-microsoft-fabric-data-warehouse-database-project-to-perform-ci-cd-using-azure-devops/" title="Download a Microsoft Fabric Data Warehouse database project to perform CI/CD using Azure DevOps">Download a Microsoft Fabric Data Warehouse database project to perform CI/CD using Azure DevOps</a> by Kevin Chant</p>



<h2 class="wp-block-heading">2.2. Dataverse Connectivity Options</h2>



<p>I like to think of Dataverse as Datamart&#8217;s peer on the Power Apps side, as they&#8217;re both SaaS services meant to provide easy-to-provision SQL options for business users. Dataverse takes care of OLTP use cases while Datamart is an OLAP package.</p>



<p>Dataverse comes with a <a href="https://docs.microsoft.com/en-us/power-apps/developer/data-platform/dataverse-sql-query">TDS (SQL) endpoint</a> which allows <strong>read-only</strong> queries from:</p>



<ul class="wp-block-list">
<li>SSMS 18.4+</li>



<li>Power BI dataflows</li>



<li>Power BI datasets</li>



<li>Power BI datamarts</li>



<li>Excel Desktop</li>
</ul>



<p id="block-645859b3-9acf-4706-8216-a33dc96bd457">Azure Data Studio is not currently supported though someone recently filed a <a href="https://github.com/microsoft/azuredatastudio/issues/19522">feature request</a>. I was not able to connect using Dbeaver either.</p>


<div class="wp-block-image is-resized">
<figure class="alignright size-full"><a href="https://www.oliviertravers.com/wp-content/uploads/2022/06/sql.jpg"><img loading="lazy" decoding="async" width="376" height="492" src="https://www.oliviertravers.com/wp-content/uploads/2022/06/sql.jpg" alt="" class="wp-image-10142" srcset="https://www.oliviertravers.com/wp-content/uploads/2022/06/sql.jpg 376w, https://www.oliviertravers.com/wp-content/uploads/2022/06/sql-229x300.jpg 229w" sizes="auto, (max-width: 376px) 100vw, 376px" /></a><figcaption class="wp-element-caption">Can&#8217;t do this with the Dataverse connector</figcaption></figure></div>


<p>Using the SQL connector rather than the <a href="https://docs.microsoft.com/en-us/power-apps/maker/data-platform/data-platform-powerbi-connector?tabs=Dataverse">Dataverse connector</a> in Power BI has a couple of benefits:</p>



<ul class="wp-block-list">
<li>You can include a SQL statement in your source step.</li>



<li>You can <a href="https://powerbitraininguk122328618.wordpress.com/2018/08/04/using-relationship-columns-to-kickstart-your-data-modelling/#:~:text=When%20Include%20relationship%20columns%20is,tables%20into%20the%20current%20table.">retrieve relationship columns</a> in case you don&#8217;t know how tables are connected or need to denormalize several tables into one.</li>



<li>You can add failover support in case you replicate your Dataverse database in a SQL Server (presumably, as I never tested this).</li>
</ul>



<p>The &#8220;Navigate using full hierarchy&#8221; option on the other hand fails with this error: &#8220;Invalid table name SCHEMATA for schema INFORMATION_SCHEMA&#8221;</p>



<p>That said for larger query results (above 80MB) you&#8217;ll want to avoid using the SQL endpoint. It&#8217;s a good exploratory tool for databases you&#8217;re just getting acquainted with, provided you have a modicum of <a href="https://www.oliviertravers.com/languages-learn-power-bi-developer-dax-m-sql/" data-type="post" data-id="9735">SQL skills</a>.</p>



<p><span style="font-size: revert;">Like with Datamart, only Azure Active Directory authentication is supported, i.e. you can&#8217;t use SQL and obviously not Windows authentication.</span></p>



<p>Note that Dataverse SQL only supports a <a href="https://docs.microsoft.com/en-us/power-apps/developer/data-platform/how-dataverse-sql-differs-from-transact-sql?tabs=supported">subset of T-SQL</a> data types, statements, and functions.</p>



<p>If you wonder was TDS means: <a href="https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-tds/893fcc7e-8a39-4b3c-815a-773b7b982c50">Tabular Data Stream (TDS) Protocol</a> is <em>&#8220;an application-level protocol used for the transfer of requests and responses between clients and database server systems. In such systems, the client will typically establish a long-lived connection with the server. Once the connection is established using a transport-level protocol, TDS messages are used to communicate between the client and the server.&#8221;</em></p>



<p>Finally, because Microsoft likes to make a spaghetti dish out of their product line, Dataverse can be loaded in Power BI via <a href="https://docs.microsoft.com/en-us/power-apps/maker/data-platform/export-to-data-lake">Azure Synapse Link</a> which will store data in Azure Data Lake Storage Gen 2. Why would you ever want to do that? Here&#8217;s a hint:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>&#8220;The Azure Synapse Link for Dataverse service supports initial and <strong>incremental writes</strong> for table data and metadata. Any data or metadata changes in Dataverse are <strong>automatically pushed</strong> to the Azure Synapse metastore and Azure Data Lake, depending on the configuration, <strong>without any additional action</strong>. This is a push, rather than pull, operation. Changes are pushed to the destination <strong>without you needing to set up refresh intervals</strong>.&#8221;</p>
<cite>One thing is sure, your Microsoft Account Manager will love you if you contract Power Apps + Synapse + Power BI Premium&#8230;</cite></blockquote>



<p>It also looks like that&#8217;s the way to go in case you want to ingest Dataverse data <a href="https://docs.microsoft.com/en-us/power-apps/maker/data-platform/export-to-data-lake-data-adf">with Azure Data Factory</a>.</p><p>The post <a href="https://www.oliviertravers.com/power-bi-datamarts-sql-server-desktop-tools-connection/">Connecting to Fabric Lakehouse, Warehouse, Power BI Datamart, and PowerApps Dataverse’s SQL Server from Desktop Tools and External Services</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.oliviertravers.com/power-bi-datamarts-sql-server-desktop-tools-connection/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">10120</post-id>	</item>
		<item>
		<title>How to Bend Plex to Your Will to Handle Complex Libraries Without Losing Your Mind</title>
		<link>https://www.oliviertravers.com/plex-complex-libraries-ultimate-media-server/</link>
					<comments>https://www.oliviertravers.com/plex-complex-libraries-ultimate-media-server/#comments</comments>
		
		<dc:creator><![CDATA[otravers]]></dc:creator>
		<pubDate>Wed, 01 May 2024 13:25:00 +0000</pubDate>
				<category><![CDATA[digital lifestyle]]></category>
		<category><![CDATA[meta-tagging the universe]]></category>
		<category><![CDATA[software]]></category>
		<guid isPermaLink="false">https://www.oliviertravers.com/?p=8989</guid>

					<description><![CDATA[<p>It&#8217;s very easy to get started with Plex to handle a simple movie or TV show collection, but as you add different types of content and grow your libraries, it... <a href="https://www.oliviertravers.com/plex-complex-libraries-ultimate-media-server/">Read more &#187;</a></p>
<p>The post <a href="https://www.oliviertravers.com/plex-complex-libraries-ultimate-media-server/">How to Bend Plex to Your Will to Handle Complex Libraries Without Losing Your Mind</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>It&#8217;s very easy to get started with Plex to handle a simple movie or TV show collection, but as you add different types of content and grow your libraries, it becomes more and more complicated to keep everything tidy and easy to use. I have 150TB+ in Plex organized in a dozen different libraries, learned a lot along the way, and will share my notes in this entry.</p>



<p>Over the past decade I went back and forth between Plex and Emby as my media server of choice but eventually settled on the former after I switched my server from my desktop PC to an <a href="https://www.oliviertravers.com/nvidia-shield-tips-tricks-media-control/">Nvidia Shield</a>, then to a <a href="https://www.oliviertravers.com/synology-apps-containers-media-self-hosted/">Docker container in a Synology NAS</a>. It&#8217;s been a long journey and I hope to accelerate your own learning curve.</p>



<p>The ways we interact with a tutorial, audiobook, movie, or TV series are all very different, and it takes work to make Plex a good fit with all these scenarios. If you have to take anything from this post, it&#8217;s that <strong>each type of content needs its own library with an approach that&#8217;s finetuned to it</strong>.</p>



<p>As much as I try to use automation and rely on Plex&#8217;s native features, to achieve the best results be prepared for some grunt work to get more obscure content organized neatly and in line with how it&#8217;s meant to be consumed.</p>



<p>I try to steer away as much as possible from organizing or tagging content via the Plex UI, as that metadata won&#8217;t survive if you have to rebuild a library from scratch, which over the years is likely to happen eventually. Instead, metadata is best conveyed via 1) your folder/file organization and naming conventions, 2) by metatagging source files themselves, and/or 3) with helper text/json/xml files to be parsed by Plex agents or scripts. But there&#8217;s some genre and collection metadata that has to be input via the Plex UI.</p>



<p>If you&#8217;re not willing to make that effort, well, garbage in garbage out, you&#8217;ll get out of your libraries what you put into them. And the more content you add, the more you&#8217;ll need it to be organized or the whole thing will collapse under its own weight.</p>



<p>As a caveat before we move on to the meat of this entry, this post is <em>not</em> about streaming or transcoding. I&#8217;m <a href="https://www.oliviertravers.com/plex-server-connectivity-checklist-remote-direct/" title="Plex Server Direct Connectivity Checklist">using Plex in Direct Play</a> on my LAN and do not care about serving low-quality transcodes to the entire neighborhood as some people seem keen to do. (I&#8217;m not judging, it&#8217;s just that I&#8217;m not interested nor experienced with this use case).</p>



<h1 class="wp-block-heading" id="1-matching-recalcitrant-documentaries-tv-shows-movies-sports-etc">1. Matching Recalcitrant Documentaries, TV Shows, Movies, Sports etc.</h1>



<p>Provided you apply the recommended naming conventions (<a href="https://support.plex.tv/articles/naming-and-organizing-your-tv-show-files/">TV</a>, <a href="https://support.plex.tv/articles/naming-and-organizing-your-movie-media-files/">movies</a>), Plex is usually good at auto-matching and fetching the right metadata, especially since the new movie scanner and agent <a href="https://forums.plex.tv/t/introducing-the-new-plex-movie-agent/615989">were introduced with PMS 1.20</a>. However, some content types can be tricky and tiny punctuation variations can throw the agents off (e.g. you can&#8217;t put colons in Windows file names), as well as titles in other languages than English. Follow these guidelines to save you a lot of grief, depending on the type of content you plan to collect.</p>



<h2 class="wp-block-heading" id="1-1-documentaries-are-not-all-the-same-or-are-they">1.1. Documentaries Are Not All the Same, Or Are They?</h2>



<p>Documentaries can&#8217;t all be dumped in the same library. Instead, make sure to put standalones (e.g. <a href="https://www.themoviedb.org/movie/164120-tropic-lia">Tropicália</a>) in a Movie library while series (e.g. <a href="https://www.thetvdb.com/series/chefs-table">Chef&#8217;s Table</a>) should be in a separate TV library. Some are tricky as you may think they&#8217;re standalones but they&#8217;re actually part of an extended TV series of sorts (e.g. content from National Geographic). Look up these loose ends in <a href="https://thetvdb.com/"><strong>TheTVDB</strong></a> and <s>IMDB</s> <a href="https://www.themoviedb.org/"><strong>TMDB</strong></a> then decide whether to put them in your TV or Movie documentary libraries accordingly (edit: someone pointed out I made a mistake, it looks like IMDB is used by Plex just for ratings, like Rotten Tomatoes).</p>



<p>After I initially posted this entry, someone brought Combined Library Metadata Agent (<a href="https://github.com/defract/Colima.bundle">Colima</a>) to my attention. I&#8217;ll stick to my approach, but it&#8217;s good to have options:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>&#8220;Combined Library Metadata Agent (Colima) in combination with&nbsp;<a href="https://github.com/ZeroQI/Absolute-Series-Scanner/">Absolute Series Scanner (ASS)</a>&nbsp;allows you to have movies and tv shows within the same library, something that Plex sadly not supports out of the box. Common scenarios to use this agent for are documentaries, western and Japanese animation libraries.&#8221;</p>
<cite>Colima.bundle README.md</cite></blockquote>



<h2 class="wp-block-heading" id="1-2-tv-shows-movies-it-s-all-about-matching-what-s-in-meta-databases">1.2. TV Shows &amp; Movies: It&#8217;s All About Matching What&#8217;s in Meta Databases </h2>



<p>To automatically enforce Plex&#8217;s naming convention on TV shows, use a tool such as <a href="https://wiki.servarr.com/sonarr" title="">Sonarr</a>, <a href="https://www.filebot.net/">Filebot</a>, <a href="https://www.tvrename.com/">TV Rename</a>, or <a href="https://www.tweaking4all.com/home-theatre/rename-my-tv-series-v2/">Rename My TV Series</a>. TV shows should match in most cases if they&#8217;re properly named, but in the rare case that they won&#8217;t, find the offending series in TheTVDB then <a href="https://support.plex.tv/articles/201018497-fix-match-match/">force a match by ID</a>. With the new Plex TV Series agent, you might need to append &#8220;thetvdb-&#8221; to the ID.</p>



<p>You can do the same ID matching with IDs from TMDB in <strong>movie libraries</strong>. Movie libraries also work for <strong>stand-up comedy</strong> shows, which I chose to set up a separate library because for me it&#8217;s a different mood, time commitment, and audience than watching a regular movie. This is why I also have a separate library for <strong>family movies</strong> but from a technical perspective you don&#8217;t <em>have</em> to use separate libraries in these cases, it&#8217;s more of a convenience. (I made that structural choice before the addition of Smart Collections, which we cover later in this post).</p>



<h2 class="wp-block-heading" id="1-3-support-for-music-ok-not-great">1.3. Support for Music: OK, Not Great</h2>



<p><a href="https://plexamp.com/">Plexamp</a> is a pretty cool player originally limited to Pass subscribers and now available under a freemium structure. It&#8217;s still limited by Plex&#8217;s metadata support on the backend. The lack of composer and conductor fields cripples classical music collections, while the absence of producer and remixer fields may leave electronic and rap collectors wanting (<a href="https://www.reddit.com/r/PleX/comments/ipltk7/how_do_you_tag_music_for_plex_and_why_is_plex_so/">related thread</a>). Regular albums in mainstream genres will get picked up, often with covers and lyrics, provided you stick to the <a href="https://support.plex.tv/articles/categories/your-media/naming-and-organizing-music-media/">naming convention</a>.</p>



<p>Dedicated music server <strong>Navidrome</strong> should eventually <a href="https://github.com/navidrome/navidrome/issues/275">address these shortcomings</a>, though doing so &#8220;would require a pretty major refactoring of the database [&#8230;] and will affect a lot of the UI as well, we don&#8217;t have a timeline for that yet.&#8221; As of mid 2024, a <a href="https://github.com/navidrome/navidrome/pull/2601" title="">significant fork</a> is dedicated to classical music and will eventually be merged back into the master, but there are heavy database schema (multiple artist support) and API (<a href="https://opensubsonic.netlify.app/" title="OpenSubSonic">OpenSubSonic</a>) dependencies. Metadata for music can indeed get <a href="https://github.com/navidrome/navidrome/issues/1036" title="very complicated">very complicated</a>.<br><br>Yet another Lightweight Music Server (<a href="https://github.com/epoupon/lms" title="LMS">LMS</a>) does support composers, but I haven&#8217;t tested it.</p>



<h2 class="wp-block-heading" id="1-4-sport-events-welcome-to-the-big-leagues">1.4. Sport Events: Welcome to the Big Leagues</h2>



<p>Your mileage may vary with sports depending on whether individual events can be found in Tmdb or TheTVDB. UFC fights for instance are recognized if you set them in a movie library. Relevant reddit threads:</p>



<ul class="wp-block-list">
<li> <a href="https://www.reddit.com/r/PleX/comments/jr5bfw/">Formula 1 seasons</a></li>



<li><a href="https://www.reddit.com/r/PleX/comments/oxlj93/finally_found_the_best_way_to_manage_nbanfl_style/h7n7h0b/">NBA/NFL</a></li>



<li><a href="https://www.reddit.com/r/PleX/comments/sl951g/i_finally_got_nba_games_working_automatically/">NBA</a></li>
</ul>



<p>A similar approach may or may not work for your sport of choice depending on how mainstream it is.</p>



<h2 class="wp-block-heading" id="1-5-anime-music-videos-and-other-miscellaneous-content-types-that-people-somehow-want-in-plex">1.5. Anime, Music Videos, and Other Miscellaneous Content Types That People Somehow Want in Plex</h2>



<p>It&#8217;s impossible for me to track all the ways people use Plex, as there are many niches I have no interest in or handle outside of Plex. Some people want to manage family videos, travel pictures, radio shows, podcasts, ebooks, comics, movie trailers, etc., including things that I think are much better handled by other dedicated content servers such as Calibre Web or Komga. There&#8217;s a whole <a href="https://www.reddit.com/r/PlexPrerolls/">subreddit</a> just for preroll videos!</p>



<p>I load Anime in a regular TV Shows library but then I have a tiny library, if it&#8217;s something you&#8217;re more serious about there an agent called <a href="https://forums.plex.tv/t/rel-http-anidb-metadata-agent-hama/40470">HAMA.</a></p>



<p>For long music videos I use a Movie library, which works well for most operas and concerts. If you want to collect short MTV-style music videos, your guess is as good as mine, possibly look into the Shorts section later in this entry.</p>



<h1 class="wp-block-heading" id="2-getting-the-best-experience-for-tutorials-use-mp4-tagging-or-a-custom-agent">2. Getting the Best Experience for Tutorials: Use mp4 Tagging or a Custom Agent</h1>



<p>Multi-part video tutorials is the content type I found most tricky to handle, as the big public databases don&#8217;t have metadata about them. There are two main approaches to this challenge, each with their pros and cons. Again, you want to refrain from doing a lot of work via the Plex UI as you&#8217;d have to redo it all over again in case you need to rebuild your library for whatever reason. With computers, nothing is permanent so plan accordingly.</p>



<h2 class="wp-block-heading" id="2-1-the-embedded-metatag-approach">2.1. The Embedded Metatag Approach</h2>



<p>A first round of trial and error led me to using collections with the following settings:</p>



<ul class="wp-block-list">
<li><strong>Library type</strong>: <em>Movies</em>. If you use <em>Other Videos</em> you&#8217;ll have to merge video parts manually in Plex, which would need to be redone if you ever have to reset said library, which in my experience is bound to happen.</li>



<li><strong>Scanner</strong>: Plex Movie Scanner.</li>



<li><strong>Agent</strong>: Plex Movie (legacy).</li>



<li>Hide items belonging to collections (stacked content is based on Collections).</li>



<li><strong>Rename files</strong> with a tool such as <a href="https://www.rlvision.com/flashren/about.php">Flash Renamer</a>, following the &#8220;- partx.ext&#8221; <a href="https://support.plex.tv/articles/naming-and-organizing-your-movie-media-files/">convention</a>.</li>



<li>Group parts of the same tutorial under the same &#8220;album&#8221;, by <strong>tagging files with <a href="https://www.mp3tag.de/en/">mp3tag</a></strong>. This works on mp4 video files so if you have AVIs or MKVs you&#8217;ll want to <a href="https://www.stellarinfo.com/blog/how-to-convert-avi-to-mp4-video-files-without-losing-quality/">convert them with VLC</a> or Handbrake first.</li>



<li>For categorization I don&#8217;t use tags, which never got any love in the Plex UI, but rather <a href="https://community.mp3tag.de/t/how-do-i-edit-preloaded-genre-list/41781">self-defined <strong>genres</strong></a>.</li>



<li>You can add <strong>specific artwork for each video segment</strong> (i.e. if you have different files within the same tutorial), which will make it easier to pick the right one among the 20 parts of a long tutorial. Some media players such as <a href="https://mpv.io/manual/master/">mpv</a> make it very easy to save screenshots in one keyboard shortcut.</li>



<li>You might need to <strong>generate your own posters</strong> as tutorials about underwater archery or Roblox origami are not necessarily going to come with something good looking for Plex purposes. The <a href="https://support.plex.tv/articles/200220677-local-media-assets-movies/">expected aspect ratio</a> is 1:1.5.</li>
</ul>



<p>This turned to be a manageable but not entirely satisfying workflow in the backend, and the end result in the frontend is a decent but not optimal user experience since navigating a large library will mostly have to be done via the <em>Collections</em> tab. There must be a better way!</p>



<h2 class="wp-block-heading" id="2-2-the-agent-approach-with-helper-metadata-files">2.2. The Agent Approach with Helper Metadata Files</h2>



<p>As an alternative, a neater organization may be obtained by following the TV show/season convention, and even more control can be supplied by <a href="https://www.reddit.com/r/PleX/comments/7r6x4f/how_can_i_set_an_actors_photo_to_be_a_picture_of/">custom agents</a>. It&#8217;s a shame that Plex stubbornly lacks support for long-established .nfo files, but people have been <a href="https://forums.plex.tv/t/with-plugin-support-dead-can-plex-finally-have-native-nfo-support/467992">complaining about it</a> for years to no avail so I&#8217;m not holding my breath. I tested four options and have adopted one that ended up being as close to my ideal requirements as it&#8217;s going to get.</p>



<ul class="wp-block-list">
<li><a href="https://github.com/suparngp/plex-personal-shows-agent.bundle"><strong>Personal Shows Metadata Agent</strong></a> &#8211; this is the best option I found for tutorials. Its meta.json format supports genre tags, studio, and cast, but it could be more thorough as there was initially <a href="https://github.com/suparngp/plex-personal-shows-agent.bundle/issues/1">no support</a> for some fields such as collections, tagline, or originally available date&#8230; I edited the Python source code to add these fields, a tweak that the author then officially added to his repository. If you&#8217;re willing to do the legwork to conform to the TV show structure and naming convention required by this agent, then the result is very satisfying.</li>



<li><a href="https://github.com/mr-szgz/extendedpersonalmedia-agent.bundle/blob/master/README.md" title=""><strong>Extended Personal Media Shows Agent</strong></a> (<a href="https://forums.plex.tv/t/rel-extended-personal-media-shows-agent/44831/1">forum thread</a>). Like the previous one, it unfortunately doesn&#8217;t leverage agents that harvest mp4 tags and there&#8217;s no way to set cast (actors/directors), Genre, or Studio. This agent relies on following a specific naming convention with optional .summary and .metadata files.</li>



<li><a href="https://github.com/gboudreau/XBMCnfoTVImporter.bundle" title=""><strong>XBMCnfoTVImporter</strong></a> &#8211; This plugin is meant recognize the <a href="https://kodi.wiki/view/NFO_files/TV_shows#nfo_Name_and_Location">type of nfo files used by Kodi</a>, but documentation is nonexistent so while this is probably a good option, prepare to fumble in the dark.</li>



<li><a href="https://github.com/joshuaavalon/AvalonXmlAgent.bundle"><strong>AvalonXmlAgent</strong></a> &#8211; inspired by XBMCnfoTVImporter, but with a different XML file format. Looks good but <a href="https://github.com/joshuaavalon/AvalonXmlAgent.bundle/issues/4">doesn&#8217;t handle</a> season titles. My first attempt with it didn&#8217;t work too well though, I think I&#8217;ll stick to the Personal Shows Metadata Agent.</li>



<li><a href="https://github.com/ZeroQI/Lambda.bundle"><strong>Local Assets-Metadata Double Agent</strong></a> (<a href="https://forums.plex.tv/t/rel-lambda-local-assets-metadata-double-agent-for-plex-metadata-export/295681/174">forum thread</a>) &#8211; similar in spirit to the above but with the added twist of letting you save Plex Metadata locally (i.e. it does import/export).</li>
</ul>



<p>The agent-based approach is also what I&#8217;d recommend in case you want to organize your own home photos or videos. For photos there&#8217;s an <a href="https://support.plex.tv/articles/234976627-auto-tagging-of-photos/">autotagging option</a> but it&#8217;s calling a third-party service &#8211; which you may not want to do for privacy reasons &#8211; you need Plex Pass to be able to use it, and it&#8217;s <a href="https://www.reddit.com/r/PleX/comments/jsfsye/plex_has_a_big_opportunity_with_google_photos/">reportedly</a> no match with Google Photos&#8217;s face recognition.</p>



<p>For the best result with custom cast members, save square .jpg pictures of close-up mugshots in a dedicated web folder. Common cloud services such as Google Drive or OneDrive make this way too hard for some reason, I serve these images via a local web server on one of my <a href="https://www.oliviertravers.com/synology-apps-containers-media-self-hosted/">Synology NASes</a>. </p>



<h1 class="wp-block-heading" id="3-audiobooks-one-of-the-most-challenging-use-cases-with-intricate-solutions">3. Audiobooks: One of the Most Challenging Use Cases That Require Intricate Solutions and May Be Best Handled Elsewhere</h1>



<p>Dedicated support for audiobooks is <a href="https://forums.plex.tv/t/support-for-audiobooks/27518/774">one of the top</a> open feature requests but so far, they still require that you jump through similar hoops as tutorials for the most part, except as a Music library and using a special-purpose agent. The main drawbacks of using Plex for audiobooks are that:</p>



<ul class="wp-block-list">
<li>On the frontend side, the official Plex clients are not the best to keep track of progress time across devices and other UX niceties specific to listening to audiobooks.</li>



<li>On the backend side, Plex doesn&#8217;t provide an agent/scanner combo for audiobooks like they&#8217;re doing for TV shows or movies. </li>
</ul>



<p>For details on the intricate workflows necessary to get the best outcome, see:</p>



<ul class="wp-block-list">
<li><a href="https://forums.plex.tv/t/audiobook-guide/205963">Audiobook Guide 1</a> &#8211; <a href="https://github.com/macr0dev/Audiobooks.bundle">macr0dev</a> (no longer in development)</li>



<li><a href="https://github.com/seanap/Plex-Audiobook-Guide">Audiobook Guide 2</a> &#8211; <a href="https://github.com/seanap/Audiobooks.bundle#installation">Seanap</a>  &#8211; more recent than the previous one, among differences it now leverages the new <a href="https://github.com/laxamentumtech/audnexus">audnexus data aggregation API</a> via <a href="https://github.com/djdembeck/Audnexus.bundle">this agent</a>. </li>



<li><a style="font-size: 1rem;" href="https://www.reddit.com/r/amazonecho/comments/bmuuhg/play_audio_books_outside_of_audible/">Play audiobooks outside of Audible on Alexa devices</a></li>



<li><a href="https://old.reddit.com/r/PleX/comments/jt2pmu/tips_to_adapt_plex_to_different_needs_for/gc33037/">Alternative approach</a> for multipart audiobooks using mp4s in a <em>Shows</em> library.</li>
</ul>



<p>To listen to audiobooks on mobile devices, check out:</p>



<ul class="wp-block-list" id="block-f1f7c47c-2374-4718-a653-8ad916f60d5f">
<li><a href="https://play.google.com/store/apps/details?id=io.github.mattpvaughn.chronicle&amp;hl=en&amp;gl=US">Chronicle Audiobook Player for Plex</a> &#8211; Android only, decent option.</li>



<li><a href="https://prologue.audio/" title="">Prologue</a> &#8211; I hear good things about it but I wouldn&#8217;t know firsthand as iOS only</li>



<li><a href="https://www.bookcamp.app/">Bookcamp</a>: app for iOS and Android with Plex backend support, it&#8217;s been in early access for years but does look slick. It&#8217;s a paid subscription. When I tested it I wasn&#8217;t able to get it to find my audiobook library even though my Plex server is accessible from the outside and I successfully linked the app to my Plex account.</li>
</ul>



<p>A significant limitation of audio libraries is that unlike Movies and Shows they <a href="https://forums.plex.tv/t/collections-for-audio-libraries/225432/9">don&#8217;t support collections</a>.</p>



<p>In the comments below, Mike W <a href="https://www.oliviertravers.com/plex-complex-libraries-ultimate-media-server/#comment-133965">mentions</a> that converting his audiobooks to the <a href="https://fileinfo.com/extension/m4b#:~:text=An%20M4B%20file%20is%20an,as%20chapter%20breaks%20and%20bookmarking.">mb4 format</a> then loading them in a Music library worked well for him, since it&#8217;s a file format that encodes book-specific metadata such as chapter breaks and bookmarks.</p>



<p>One thing I don&#8217;t like is that it seems you have to stick to Plex&#8217;s relatively flat folder structure, at least when I tried to load an <em>Audiobooks &gt; History &gt; Ancient &gt; Book</em> type of deep hierarchy, the scanner wouldn&#8217;t pick anything up.</p>



<p>I eventually switched to <a href="https://www.audiobookshelf.org/">Audiobookshelf</a>, a dedicated server that <a href="https://noted.lol/audiobookshelf-a-self-hosted-audiobook-and-podcast-server-with-phone-apps/">seems popular</a> among my <a href="https://www.oliviertravers.com/synology-apps-containers-media-self-hosted/" title="Getting the Most Out of Your Synology Networked Attached Storage: Did You Know It Can Do That?">self-hosted</a> peers and has competent mobile apps (with playback speed control). I already run Calibre Web and Komga for ebooks and comics respectively, so it&#8217;s never been my intent to load <em>all</em> my media in Plex anyway. I ended up preferring Audiobookshelf to Plex though it&#8217;s also somewhat fussy in terms of folder structure, file names, and metadata. I doubt that audiobooks can be made as plug-and-play as popular movies or TV shows, so be prepared to curate and tag your files more than you need to with mainstream content types.</p>



<h1 class="wp-block-heading" id="4-movies-with-commentary-collections-by-genre-and-audience-shorts-the-elusive-playback-speed">4. Movies with Commentary; Collections by Genre and Audience; Shorts; The Elusive Playback Speed</h1>



<h2 class="wp-block-heading" id="4-1-commentary-tracks-is-finally-a-solved-problem-thanks-to-a-powerful-python-script">4.1. Commentary Tracks is Finally a Solved Problem Thanks to a Powerful Python Script</h2>



<p>There&#8217;s no built-in way to tell apart movies with a commentary track at the library level because the audio stream metadata is not leveraged for navigation. <a href="https://www.reddit.com/r/PleX/comments/8o4ifh/i_wish_there_was_a_way_to_sort_movies_by_audio/">Some people</a> use <a href="https://mkvtoolnix.download/">MKVToolNix</a> or <a href="https://forum.videohelp.com/threads/390169-Possible-to-change-mp4-audio-language-without-writing-entire-file-again">ffmpeg</a> (<a href="https://stackoverflow.com/questions/44351606/ffmpeg-set-the-language-of-an-audio-stream/44351749">using ISO codes</a>) to set the commentary soundtrack to a rare language such as Icelandic, while others suggest <a href="https://tautulli.com/">Tautulli</a> but that seems clunky at best. Alternatively, you could use sharing labels, which require Plex Pass, or create a &#8220;Commentary&#8221; tag within Genres or Collections. I elected to do the latter, but didn&#8217;t want to maintain it manually through the Plex UI, so for a long time was stuck without an acceptable solution.</p>



<p>That changed in March 2021 when the author of <strong>Plex-Meta-Manager</strong> (more on that tool further below) <a href="https://github.com/meisnate12/Plex-Meta-Manager/wiki/Collection-Filters">added support</a> for filtering by audio_track_title at my request, which takes care of the commentary track. In your Movies.yml metadata file, have a section like this (be careful with indentation as the dastardly YAML language is looking for excuses to fail):</p>



<pre class="wp-block-code"><code>collections:
  Movies with Commentary:
    plex_all: true
    filters:
      audio_track_title: Commentary
    sync_mode: sync
    collection_order: release
    summary: Movies with commentary audio tracks from the director or critics.</code></pre>



<p>If you wanted to create collections by audio track codec (AC3, DTS etc.) as someone asked in the comments below, this is also the way to go.</p>



<h2 class="wp-block-heading" id="4-2-use-smart-collections-to-dynamically-categorize-content-according-to-search-filters">4.2. Use Smart Collections to Dynamically Categorize Content According to Search Filters</h2>



<p>For any of the metadata exposed by the Plex user interface, you don&#8217;t need the aforementioned script. Simply configure an advanced filter combination and save it as a <a href="https://support.plex.tv/articles/201273953-collections/#toc-1">smart collection</a>, a feature added in April 2021 that was a great improvement to Plex.</p>



<p>I&#8217;ve used smart collections to categorize documentaries by genre: Arts, Music, History, Nature, Science, etc. The main problem with this approach is that you&#8217;ll have to recreate your collections manually if your database gets nuked.</p>



<figure class="wp-block-image size-large"><a href="https://www.oliviertravers.com/wp-content/uploads/2021/06/smart-collection.png"><img loading="lazy" decoding="async" width="1024" height="476" src="https://www.oliviertravers.com/wp-content/uploads/2021/06/smart-collection-1024x476.png" alt="" class="wp-image-9514" srcset="https://www.oliviertravers.com/wp-content/uploads/2021/06/smart-collection-1024x476.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2021/06/smart-collection-300x139.png 300w, https://www.oliviertravers.com/wp-content/uploads/2021/06/smart-collection-768x357.png 768w, https://www.oliviertravers.com/wp-content/uploads/2021/06/smart-collection-1536x714.png 1536w, https://www.oliviertravers.com/wp-content/uploads/2021/06/smart-collection-624x290.png 624w, https://www.oliviertravers.com/wp-content/uploads/2021/06/smart-collection.png 1551w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Smart Collections will automatically add new content matching their criteria</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://www.oliviertravers.com/wp-content/uploads/2021/11/smart-collection-docs.png"><img loading="lazy" decoding="async" width="1024" height="271" src="https://www.oliviertravers.com/wp-content/uploads/2021/11/smart-collection-docs-1024x271.png" alt="" class="wp-image-9639" srcset="https://www.oliviertravers.com/wp-content/uploads/2021/11/smart-collection-docs-1024x271.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2021/11/smart-collection-docs-300x79.png 300w, https://www.oliviertravers.com/wp-content/uploads/2021/11/smart-collection-docs-768x203.png 768w, https://www.oliviertravers.com/wp-content/uploads/2021/11/smart-collection-docs-1536x406.png 1536w, https://www.oliviertravers.com/wp-content/uploads/2021/11/smart-collection-docs-624x165.png 624w, https://www.oliviertravers.com/wp-content/uploads/2021/11/smart-collection-docs.png 1721w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">I have hundreds of documentaries so I wanted to be able to browse them by theme</figcaption></figure>



<h2 class="wp-block-heading" id="4-3-manual-collections-are-an-effective-way-to-handle-different-audiences-within-the-same-account">4.3. (Manual) Collections Are an Effective Way to Handle Different Audiences Within the Same Account</h2>



<p>I also set up collections by audience, i.e. content for the entire family, that only my wife watches (mystery and police procedural galore!), that I watch together with her, or that we watch with our daughter but our son is not interested in. That way, depending on who&#8217;s in the mood to watch a TV episode or movie, we can narrow the selection down to that specific audience. And my wife can start watching new shows I downloaded for her without accidentally watching something I intended to watch too. I already have enough libraries as it is without creating libraries by audience!</p>



<p>If you want something that survives restarting your Plex install from scratch, see the Plex Meta Manager&#8217;s Trakt integration which we&#8217;ll talk about further below.</p>



<h2 class="wp-block-heading" id="4-4-short-movies-are-a-conundrum">4.4. Short Movies Are a Conundrum</h2>



<p>I haven&#8217;t started collecting shorts yet, but knowing myself, I&#8217;ll probably get into it at some point. The main challenge is that you might have hundreds or thousands of shorts if you get into collecting old cartoons, and you&#8217;re likely not to like overwhelming your regular TV or Movies libraries with them. My initial research pointed to <a href="https://www.reddit.com/r/PleX/comments/d49r75/managing_theatrical_shorts/">this thread</a> and others like it and led me to believe that the main approaches are:</p>



<ul class="wp-block-list">
<li>Use a TV library, as some shorts (mostly cartoons such as Pixar shorts) are in TheTVDB</li>



<li>Use a movie library for those shorts that are in TheMovieDB</li>



<li>Use manual collections</li>



<li>Use smart collections based on Genre = Short</li>
</ul>



<h2 class="wp-block-heading" id="4-5-playback-speed-only-on-devices-that-support-browser-extensions">4.5. Playback Speed: Only on Devices That Support Browser Extensions</h2>



<p>Playback speed, while not strictly about library management per se, is something that people often want to control for audiobooks and tutorials, and to a lesser extent sports, but despite popular demand it&#8217;s still not found in any Plex clients. There&#8217;s a <a href="https://chrome.google.com/webstore/detail/plex-speed/kegkeieegiecchgneffbcbjknmjminjj/related">third-party Chrome extension</a> &#8211; which means it also works in Edge Chromium &#8211; but that obviously won&#8217;t work from your TV or tablet app.</p>



<p>If you must have playback speed control in mobile devices then you&#8217;re better off using Emby, at least for the library for which you have that need.</p>



<h1 class="wp-block-heading" id="5-adding-chapters-to-make-long-videos-easier-to-navigate-around">5. Adding Chapters to Make Long Videos Easier to Navigate Around</h1>



<p>Some long tutorials can be cumbersome to navigate, while other types of content, from sport events to concerts may also benefit from having delineated <a href="https://forums.plex.tv/t/how-are-chapters-scanned/217730">chapters</a>. If you&#8217;re ripping DVDs or BluRays, <a href="https://chapterdb.plex.tv/software">ChapterGrabber</a> will help you get chapter information from the source, and there&#8217;s also the <a href="https://chapterdb.plex.tv/browse">ChapterDB archive</a> for (some) movies.</p>



<p>When chapter information is not already available, you can add your own chapter information within videos with software such as <a href="https://handbrake.fr/">Handbrake</a> or <a href="https://github.com/stevie910/drax">Drax</a>. In any case this needs to be done in the video files before importing them into Plex.</p>



<p>The power user approach to this task relies on <a href="https://ffmpeg.org/download.html">ffmpeg</a>, best combined with a <a href="https://ikyle.me/blog/2020/add-mp4-chapters-ffmpeg">helper script</a> so that you can write a simple text file listing your chapters then writing them back to the video&#8217;s metadata. The python dependency makes this overkill if you have just a few videos to &#8220;chapterize&#8221;, but who doesn&#8217;t like to spend 5 hours to automate a 15-minute manual job anyway? If like me you&#8217;re running on Windows, make sure to save your chapters.txt file with Unix end of line characters (LF), which is <a href="http://sql313.com/index.php/43-main-blogs/maincat-dba/62-using-notepad-to-change-end-of-line-characters">easy with Notepad++</a>, otherwise you&#8217;ll end up with ugly rectangles at the end of each chapter&#8217;s title. Here&#8217;s a recap of the procedure tweaked to my own preferences, I do at least a few at a time to get into the groove of things:</p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<p><strong><strong>[File Explorer]</strong> </strong>Make a copy of the video to be chapterized to your work directly and rename it <em>input.mp4</em><br><strong>[Notepad++ and mpv.net]</strong> Write down chapter timestamps in <em>chapters.txt</em> while speed-watching through the video. Doublecheck there are no typos.<br><strong>[Command prompt]</strong> ffmpeg -i input.mp4 -f ffmetadata ffm.txt<br><strong>[Visual Studio Code or Python-aware CLI]</strong> run helper.py<br><strong>[Notepad++]</strong> Open <em>ffm.txt</em> and convert EOL characters to Unix<br><strong>[Command prompt]</strong> ffmpeg -i input.mp4 -i ffm.txt -map_metadata 1 -codec copy output.mp4<br><strong>[mpv.net]</strong> Open <em>output.mp4</em> and navigate to each chapter to make sure the timestamp is exactly right and triple check for typos<br><strong>[File Explorer]</strong> Rename <em>output.mp4</em> and move it to the library folder where it&#8217;s supposed to go</p>
</div></div>



<p>While you can set art for seasons and episodes, thumbnails for chapters can&#8217;t be set manually with local images, they&#8217;re automatically generated by Plex based on each chapter&#8217;s exact timestamp (<a href="https://forums.plex.tv/t/chapter-thumbnails/601254/29?u=notflix">related thread</a>). Meaning that you&#8217;ll have to tweak your chapter timestamps almost by the exact frame to get the best results. Well, that&#8217;s not entirely true, you could edit the files generated by Plex in the <em>Media</em> folder in the backend, as explained by Noel Plum in the comments below. He&#8217;s been doing it for months without issue, but there&#8217;s no telling whether future changes in the PMS code won&#8217;t mess with that eventually.</p>



<p>With <a href="https://mediaarea.net/en/MediaInfo">MediaInfo GUI</a> you can quickly check whether any given video file already has chapters, and export that list to a text file. You may want to do so in order to edit it and reload it back to its video source in case the existing timestamps don&#8217;t quite work for you (e.g. bad preview thumbnails), or to remove or add to the list. The equivalent with the MediaInfo CLI is:</p>



<pre class="wp-block-code"><code>mediainfo.exe input.mp4 &gt; metadata.txt</code></pre>



<p>The output will need to be cleaned up and reformatted a bit if you want to reinject it as per  Kyke Howell&#8217;s helper script mentioned above, but it&#8217;s not too bad. Alternatively you can use ffmpeg to extract that metadata as also shown by Kyle, with the major inconvenience that timestamps are shown as an integer based on a timebase, or you could use <a href="https://www.videohelp.com/software/MP4Box">mp4box</a> from the command line, which will generate a ttxt XML file (which then needs to be scrubbed) with hh:mm:ss timestamps (that&#8217;s the good part):</p>



<pre class="wp-block-code"><code>mp4box.exe &quot;FilePath&quot; -dump-chap &gt;chapters.ttxt</code></pre>



<p>If need be, you can also scrub existing metadata and chapters <a href="https://superuser.com/questions/441361/strip-metadata-from-all-formats-with-ffmpeg/428039#428039">with ffmpeg</a>.</p>



<p>Also, it seems you <a href="https://forums.plex.tv/t/force-generation-of-chapter-thumbnails/388975">can&#8217;t force</a> the generation of chapter thumbnails so you&#8217;ll have to wait for your scheduled process to kick in. Once they&#8217;re rendered, here&#8217;s what that looks like in the web UI (according to what I read chapter support varies among Plex clients):</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="809" src="https://www.oliviertravers.com/wp-content/uploads/2020/11/plex-chapters-1024x809.png" alt="" class="wp-image-8993" srcset="https://www.oliviertravers.com/wp-content/uploads/2020/11/plex-chapters-1024x809.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2020/11/plex-chapters-300x237.png 300w, https://www.oliviertravers.com/wp-content/uploads/2020/11/plex-chapters-768x607.png 768w, https://www.oliviertravers.com/wp-content/uploads/2020/11/plex-chapters-1536x1214.png 1536w, https://www.oliviertravers.com/wp-content/uploads/2020/11/plex-chapters-624x493.png 624w, https://www.oliviertravers.com/wp-content/uploads/2020/11/plex-chapters.png 1919w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">This guy is a fountain of <a href="https://www.oliviertravers.com/integrating-judo-bjj-one-art/">grappling</a> knowledge, but also talks slowly and repeats himself constantly. Trust me, you want to chapterize him!</figcaption></figure>



<h1 class="wp-block-heading" id="6-miscellaneous-library-customization-management-tips">6. Miscellaneous Library Customization &amp; Management Tips</h1>



<ul class="wp-block-list">
<li>If you want your library to look ultra clean, consider using <strong>custom posters</strong> and fanart such as those found on <a href="https://theposterdb.com/">The Poster Database</a>. I&#8217;ve used this for my thematic collections but for individual movies I&#8217;m waiting for that site to add a Plex agent and direct integration into the Poster tab shown when you edit an item. Some people even go through the trouble of <a href="https://www.reddit.com/r/PlexTitleCards/">customizing episode cards</a>, among other reasons to avoid spoilers (&#8220;what, this character in the thumbnail died two seasons ago?!&#8221;)</li>



<li><span style="font-size: 1rem;">You&#8217;ll probably want to customize which libraries are part of global search and featured in dashboards, i.e. </span><em style="font-size: 1rem;">On Deck </em><span style="font-size: 1rem;">and </span><em style="font-size: 1rem;">Recently Added</em><span style="font-size: 1rem;">. That&#8217;s done in the </span><em style="font-size: 1rem;">Advanced Settings</em><span style="font-size: 1rem;"> of each library.</span> Unfortunately it doesn&#8217;t seem possible to scope a search query to a specific library, and Plex&#8217;s search is by and large horrible.</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://www.oliviertravers.com/wp-content/uploads/2021/04/collections-posters.png"><img loading="lazy" decoding="async" width="1024" height="676" src="https://www.oliviertravers.com/wp-content/uploads/2021/04/collections-posters-1024x676.png" alt="" class="wp-image-9405" srcset="https://www.oliviertravers.com/wp-content/uploads/2021/04/collections-posters-1024x676.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2021/04/collections-posters-300x198.png 300w, https://www.oliviertravers.com/wp-content/uploads/2021/04/collections-posters-768x507.png 768w, https://www.oliviertravers.com/wp-content/uploads/2021/04/collections-posters-624x412.png 624w, https://www.oliviertravers.com/wp-content/uploads/2021/04/collections-posters.png 1292w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Collections Automatically Created with a Script, Looking Good with Custom Posters</figcaption></figure>



<h1 class="wp-block-heading" id="7-library-organization-wrap-up-be-deliberate-organized">7. Library Organization Wrap-Up: Be Deliberate &amp; Organized</h1>



<p>As a summary, to get your content properly organized with the minimum amount of friction, it&#8217;s essential that you:</p>



<ul class="wp-block-list">
<li>Choose the <strong>right library media type</strong> for your content, which can sometimes be counter intuitive. This means your <strong>source content needs to be properly organized</strong>, and you can&#8217;t drop everything in one morass of a Plex library.</li>



<li>Organize your content by type and follow the official <strong>naming conventions</strong> for your source folders and files.</li>



<li>Figure out whether readily available <a href="https://support.plex.tv/articles/categories/plex-media-server/scanners-agents/"><strong>scanners and agents</strong></a> will do the job, or if you have to handle metadata yourself. There&#8217;s for instance an agent to handle <a href="https://github.com/ZeroQI/YouTube-Agent.bundle">Youtube downloads</a>.</li>



<li>Set up each library&#8217;s <a href="https://support.plex.tv/articles/200288926-creating-libraries/"><strong>advanced settings</strong></a> deliberately as some of the defaults can have big consequences. This is best done when you first set up your library, though that can be edited later.</li>



<li>Use collections within and across libraries for TV remote-friendly access to categorized content.</li>



<li>Understand Plex&#8217;s limitations and either accept them or strop trying to do everything with one tool. Some things are just not meant to be.</li>



<li>Summary of the summary: RTFM, there&#8217;s more to Plex than first meets the eye and it&#8217;s well worth understanding what&#8217;s going on beneath the hood.</li>
</ul>



<h1 class="wp-block-heading" id="8-choosing-what-to-watch-next-with-trakt-moviewatch">8. Choosing What to Watch Next with Trakt, Moviewatch</h1>



<h2 class="wp-block-heading" id="8-1-keep-track-of-watch-status-and-wishlists-with-trakt-integration">8.1. Keep Track of Watch Status and Wishlists with Trakt Integration</h2>



<p>One of the primary criteria to choose something to watch is to filter out content you&#8217;ve already watched. Plex does keep track of that, but if you ever have to reset your library, that status is gone. Do you want to manually recheck hundreds of series and movies? If not, <a href="https://trakt.tv/">Trakt.tv</a> gives you a way to effectively back up your watched status to a third-party service, as well as help you discover other content you might like. There&#8217;s built-in <a href="https://blog.trakt.tv/plex-scrobbler-52db9b016ead">&#8220;scrobber&#8221; integration</a> between Plex Pass and Trakt VIP, but that&#8217;s two subscriptions you need to keep paying. If you have a bunch of distinct Plex and Trakt users, that&#8217;s the way to go.</p>



<p>In my case, I just have one master Plex account and one Trakt account, so here&#8217;s what I ended up doing to get the most out of the Plex-Trakt combo:</p>



<ol class="wp-block-list">
<li>Install the <a href="https://github.com/trakt/Plex-Trakt-Scrobbler">Trakt.tv (for Plex) plugin</a> via the Applications section of the Unofficial App Store (UAS) in Web.Tools. Contrarily to popular belief, Plex plugins are not entirely dead, I&#8217;ll get back to that in a minute.</li>



<li>Install Kitana.</li>



<li>Do an <a href="https://github.com/trakt/Plex-Trakt-Scrobbler/issues/586">initial full sync via Kitana</a> (unless your Trakt account is brand new). Now Plex and Trakt should agree with each other on what you&#8217;ve already watched then stay that way as you watch new content.</li>



<li>Create private watchlists in Trakt to add interesting TV shows and movies as I&#8217;m browsing that site.</li>



<li>Connect these watchlists to Sonarr v3 and Radarr to automate their downloading.
<ul class="wp-block-list">
<li>I found that I had to nudge Sonarr into processing a new list which is easy enough <a href="https://www.reddit.com/r/sonarr/comments/jpn5hp/v3_is_it_possible_to_change_the_interval_for/gdqvbgs?utm_source=share&amp;utm_medium=web2x&amp;context=3">via its API</a>.</li>



<li>Radarr will only handle your watchlist <a href="https://www.reddit.com/r/radarr/comments/kav8zc/trakt_list_seems_like_its_searching_in_the_wrong/">via the &#8220;Trakt User&#8221; list option</a>, &#8220;Trakt List&#8221; won&#8217;t work for some reason.</li>
</ul>
</li>



<li>With the <a href="https://chrome.google.com/webstore/detail/web-to-plex/kmcinnefmnkfnmnmijfmbiaflncfifcn">Web to Plex</a> browser extension you&#8217;ll see whether you have a movie/show in your server while browsing Trakt or Imdb.</li>
</ol>



<p>Find out more about the *arr automation apps in <a href="https://www.oliviertravers.com/synology-apps-containers-media-self-hosted/">this post</a>. To do the above prior to Sonarr/Radarr v3 you had to use <a href="https://github.com/l3uddz/traktarr">Traktarr</a>.</p>



<p>In summary:</p>



<ul class="wp-block-list">
<li>Content watched in Plex will automatically be marked as watched in Trakt.</li>



<li>Whenever you watch something outside of Plex, just flag it in Trakt and Plex will know.</li>



<li>Trakt watchlists are a good way to funnel content back into your Plex libraries if you&#8217;re willing to set up the *arr infrastructure (again see my <a href="https://www.oliviertravers.com/synology-apps-containers-media-self-hosted/" data-type="post" data-id="9092">NAS entry</a>, this is such a powerful stack).</li>
</ul>



<p>A side benefit is that I was able to resync my Plex and Trakt accounts that had grown out of sync.</p>



<p>The only thing that I was able to do via Kodi that I can&#8217;t do in Plex itself is the ability to rate content right after I watched it in the media player. Looks like that&#8217;s <a href="https://github.com/trakt/Plex-Trakt-Scrobbler/issues/87">not possible via a Plex plugin</a>.</p>



<h2 class="wp-block-heading" id="8-2-make-movie-night-fun-again-with-moviewatch">8.2. Make Movie Night Fun Again with Moviewatch</h2>



<p>A common refrain from people with large libraries is that it takes them forever to find something to watch as they&#8217;re overwhelmed by the sheer amount of choice they have. You can play with filters to narrow down options, but a very first-world solution to this very first-world problem is <a href="https://github.com/LukeChannings/moviematch">Moviewatch</a>, which gives you and your co-watchers a Tinder-like interface to swap through movie posters until there&#8217;s an agreement from all parties, at which point you&#8217;re one click away from launching the consensus movie in Plex.</p>



<h1 class="wp-block-heading" id="9-managing-extending-plex-beyond-the-ui-plugins-maintenance-data-analysis">9. Managing &amp; Extending Plex Beyond the UI: Plugins, Maintenance, Data Analysis</h1>



<h2 class="wp-block-heading" id="9-1-plugins-unsupported-but-not-dead">9.1. Plugins: Unsupported but Not Dead</h2>



<p>While <strong><a href="https://forums.plex.tv/c/third-party/plugins/19">plugins</a></strong> such as <a href="https://github.com/ukdtom/WebTools.bundle">Web.Tools</a> are no longer supported in the Plex UI, they still work in practice. As I just mentioned, one big piece of functionality they allow is free bidirectional integration with Trakt.</p>



<p>As a complement, <a href="https://github.com/pannal/Kitana">Kitana</a> provides a web frontend to these plugins (<a href="https://github.com/pannal/Kitana/issues/26#issuecomment-570200679">how to install Kitana via Portainer</a>) which comes handy in some cases.</p>



<div class="wp-block-group alignwide"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h2 class="wp-block-heading" id="9-2-maintenance-backups-do-it-or-else">9.2. Maintenance &amp; Backups: Do It or Else</h2>


<div class="wp-block-image">
<figure class="alignright size-large is-resized"><img loading="lazy" decoding="async" width="638" height="222" src="https://www.oliviertravers.com/wp-content/uploads/2020/10/plex-backup.png" alt="" class="wp-image-8871" style="width:282px;height:98px" srcset="https://www.oliviertravers.com/wp-content/uploads/2020/10/plex-backup.png 638w, https://www.oliviertravers.com/wp-content/uploads/2020/10/plex-backup-300x104.png 300w, https://www.oliviertravers.com/wp-content/uploads/2020/10/plex-backup-624x217.png 624w" sizes="auto, (max-width: 638px) 100vw, 638px" /><figcaption class="wp-element-caption">Scheduled backups: A Good Idea &#8482;</figcaption></figure></div>


<p>Plex Media Server occasionally stops for obscure reasons such as version updates. <a href="https://support.plex.tv/articles/202197488-scheduled-server-maintenance/">Scheduling <strong>server maintenance</strong></a> may save you hours of setup time if your Plex database becomes irremediably <a href="https://support.plex.tv/articles/201100678-repair-a-corrupt-database/">corrupted</a>, which can happen in case of abrupt shutdowns, so it&#8217;s highly recommended to put your server behind a UPS.</p>



<p><a href="https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/">Restoring from a backup</a> is very easy.</p>



<h2 class="wp-block-heading" id="9-3-programmatic-access-for-large-scale-management">9.3. Programmatic Access for Large Scale Management</h2>



<p>There are several ways to automate functions of the Plex server:</p>



<p><a href="https://kometa.wiki/" title="">Kometa</a> (fka<a href="https://github.com/meisnate12/Plex-Meta-Manager"> Plex-Meta-Manager</a> &#8211; PMM) is <em>&#8220;a Python 3 script that can be continuously run using YAML configuration files to update on a schedule the metadata of the movies, shows, and collections in your libraries as well as automatically build collections&#8221;</em>.<br><br>I&#8217;ve used it to build a variety of <a href="https://metamanager.wiki/en/latest/metadata/dynamic.html" title="dynamic collections">dynamic collections</a> such as Movies with commentary, Oscar winners, Imdb 250, or by audience based on Trakt lists. This is a game changer if you have more than 2,000 movies like I do, and it&#8217;s gained a lot of attention with Plex power users, probably now trumping all other options.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="KOMETA: The Ultimate Tech Guide - 4 HOURS LONG" width="625" height="352" src="https://www.youtube.com/embed/nTfCUtKWTYI?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p>Note that collections kind of span across libraries, even if they have different types, so you can for instance have a <em>Star Trek</em> collection that includes movies and TV shows.</p>



<figure class="wp-block-image size-large"><a href="https://www.oliviertravers.com/wp-content/uploads/2021/04/collection-cross-library.png"><img loading="lazy" decoding="async" width="1024" height="581" src="https://www.oliviertravers.com/wp-content/uploads/2021/04/collection-cross-library-1024x581.png" alt="" class="wp-image-9406" srcset="https://www.oliviertravers.com/wp-content/uploads/2021/04/collection-cross-library-1024x581.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2021/04/collection-cross-library-300x170.png 300w, https://www.oliviertravers.com/wp-content/uploads/2021/04/collection-cross-library-768x435.png 768w, https://www.oliviertravers.com/wp-content/uploads/2021/04/collection-cross-library-624x354.png 624w, https://www.oliviertravers.com/wp-content/uploads/2021/04/collection-cross-library.png 1358w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">If you use the same name for collections in different libraries, Plex will cross-reference them across libraries. Pictured here, <em>Top Rated</em> across the main movie library and the family movie library. You could use this to tie soundtracks to movies, or file TV series and movies in the same universe.</figcaption></figure>



<ul class="wp-block-list">
<li><a href="https://github.com/ShaneIsrael/plex-auto-genres"><strong>Plex-auto-genres</strong></a>: in the same spirit that the previous script, less involved but less powerful.</li>



<li><a href="https://github.com/JasonHHouse/Gaps/"><strong>Gaps</strong></a>: <em>&#8220;Find the missing movies in your Plex Server.&#8221;</em></li>



<li><a href="https://pypi.org/project/PlexAPI/"><strong>PlexAPI</strong></a>, a set of unofficial Python bindings whose goal is to <em>&#8220;match all capabilities of the official Plex Web Client&#8221;</em>, including navigating libraries, performing library actions such as scans, remote control, and listening to notifications. A collection of scripts that use this library can be found in <a href="https://github.com/blacktwin/JBOPS">this Github repository</a>.</li>



<li><a href="https://github.com/adamgot/python-plexlibrary"><strong>Python-PlexLibrary</strong></a>, a <em>&#8220;command line utility for creating and maintaining dynamic Plex libraries and playlists based on &#8216;recipes&#8217;.&#8221;</em></li>



<li><a href="https://github.com/Tautulli/Tautulli/wiki/Custom-Scripts" title="Tautulli scripts"><strong>Tautulli custom scripts</strong></a>. Most of these are for notifications but some can be used for library management. </li>



<li>An <a href="https://github.com/Arcanemagus/plex-api/wiki/Plex-Web-API-Overview"><strong>API</strong></a> that I haven&#8217;t tested yet.</li>



<li><a href="https://support.plex.tv/articles/115002267687-webhooks/"><strong>Webhooks</strong></a> that require Plex Pass.</li>



<li>RPA software that captures how you interact with a website or desktop app, such as <a href="https://flow.microsoft.com/en-us/ui-flows/">Power Automate</a>. I&#8217;d pursue this only if all else fails, but it&#8217;s an option.</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://www.oliviertravers.com/wp-content/uploads/2021/04/plex-collection.png"><img loading="lazy" decoding="async" width="1024" height="945" src="https://www.oliviertravers.com/wp-content/uploads/2021/04/plex-collection-1024x945.png" alt="" class="wp-image-9395" srcset="https://www.oliviertravers.com/wp-content/uploads/2021/04/plex-collection-1024x945.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2021/04/plex-collection-300x277.png 300w, https://www.oliviertravers.com/wp-content/uploads/2021/04/plex-collection-768x709.png 768w, https://www.oliviertravers.com/wp-content/uploads/2021/04/plex-collection-624x576.png 624w, https://www.oliviertravers.com/wp-content/uploads/2021/04/plex-collection.png 1374w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Collection automatically generated with Plex Meta Manager</figcaption></figure>



<h2 class="wp-block-heading" id="9-4-querying-the-plex-database-for-advanced-analytics">9.4. Querying the Plex Database for Advanced Analytics</h2>



<p>Plex stores its data in an SQLite file, which has <a href="https://github.com/mutanthost/plex_schema">this schema</a> that you can query <a href="https://forums.plex.tv/t/howto-get-a-list-of-all-your-media-files-from-the-plex-db/287180">like so</a>. I&#8217;ve used this to visualize my library in <strong><a href="https://www.oliviertravers.com/category/power-bi/">Microsoft Power BI</a></strong> as per the screenshot below. If you&#8217;re going to do this, work off a copy of the database just to be safe. Matthew Roche has additional details <a href="https://ssbipolar.com/2023/01/27/analyzing-plex-media-server-data-using-power-bi/" title="here">here</a>.</p>
</div></div>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="572" src="https://www.oliviertravers.com/wp-content/uploads/2020/10/plex-powerbi-1024x572.png?_t=1602075846" alt="" class="wp-image-8840" srcset="https://www.oliviertravers.com/wp-content/uploads/2020/10/plex-powerbi-1024x572.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2020/10/plex-powerbi-300x168.png 300w, https://www.oliviertravers.com/wp-content/uploads/2020/10/plex-powerbi-768x429.png 768w, https://www.oliviertravers.com/wp-content/uploads/2020/10/plex-powerbi-1536x858.png 1536w, https://www.oliviertravers.com/wp-content/uploads/2020/10/plex-powerbi-2048x1144.png 2048w, https://www.oliviertravers.com/wp-content/uploads/2020/10/plex-powerbi-624x349.png 624w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Plex data in Power BI &#8211; two of my favorite things together!</figcaption></figure>



<p>A low-tech alternative is to use <a href="https://forums.plex.tv/t/rel-exporttools/175915">ExportTools</a> to generate a CSV.</p>



<p>Finally, many people use <a href="https://tautulli.com/">Tautulli</a> to monitor their Plex server (I do so via a <a data-type="post" data-id="9092" href="https://www.oliviertravers.com/synology-apps-containers-media-self-hosted/">Docker container on my Synology NAS</a>), though it&#8217;s focused on analyzing viewership rather than library content.</p>



<h1 class="wp-block-heading">10. A Note on Hardware</h1>



<p>If you end up with lots of libraries and lots of content, you&#8217;ll be much better off running Plex off an SSD. My com.plexapp.plugins.library.db database alone is getting close to 1GB, and my overall metadata and cache Plex folder has gone beyond 60GB. The end user experience &#8211; whether browsing or searching libraries &#8211; noticeably slowed down as my libraries grew across all Plex clients (browser, Shield, Windows app, Android app), so I ended up adding a RAID1 array of two SSDs on my NAS.</p>



<h1 class="wp-block-heading" id="10-related-entries">11. Related Entries</h1>



<ul class="wp-block-list">
<li><a href="https://www.oliviertravers.com/synology-apps-containers-media-self-hosted/">Getting the Most Out of Your Synology Networked Attached Storage: Did You Know It Can Do That?</a> You&#8217;ll learn how to run Plex and its friends (Sonarr, Radarr, Overseerr, Tautulli, etc.) in Docker and much more.</li>



<li><a href="https://www.oliviertravers.com/nvidia-shield-tips-tricks-media-control/">Things I Found Out the Hard Way to Get the Most of the Nvidia Shield</a>. The Shield is an excellent Plex player and a decent entry-level Plex server.</li>
</ul>



<p><em>I started a <a href="https://www.reddit.com/r/PleX/comments/jt2pmu/tips_to_adapt_plex_to_different_needs_for/">thread on Reddit</a> mentioning this post and got lots of good feedback that I reflected above through many iterative edits.</em></p><p>The post <a href="https://www.oliviertravers.com/plex-complex-libraries-ultimate-media-server/">How to Bend Plex to Your Will to Handle Complex Libraries Without Losing Your Mind</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.oliviertravers.com/plex-complex-libraries-ultimate-media-server/feed/</wfw:commentRss>
			<slash:comments>122</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">8989</post-id>	</item>
		<item>
		<title>Making Sense of Power BI Programmatic Options: REST APIs, PowerShell, TMSL, TOM, Tabular Editor Scripting, Semantic Link</title>
		<link>https://www.oliviertravers.com/power-bi-programmatic-options-rest-apis-powershell-tmsl-tom-tabular-editor-scripting/</link>
					<comments>https://www.oliviertravers.com/power-bi-programmatic-options-rest-apis-powershell-tmsl-tom-tabular-editor-scripting/#respond</comments>
		
		<dc:creator><![CDATA[otravers]]></dc:creator>
		<pubDate>Tue, 16 Apr 2024 15:07:00 +0000</pubDate>
				<category><![CDATA[Power BI & Fabric]]></category>
		<guid isPermaLink="false">https://www.oliviertravers.com/?p=10635</guid>

					<description><![CDATA[<p>Back around 2015, Microsoft introduced the current Power BI platform to replace its &#8220;Power BI for Office 365&#8221; SharePoint/Excel-based offering that most people have long forgotten, with a focus of... <a href="https://www.oliviertravers.com/power-bi-programmatic-options-rest-apis-powershell-tmsl-tom-tabular-editor-scripting/">Read more &#187;</a></p>
<p>The post <a href="https://www.oliviertravers.com/power-bi-programmatic-options-rest-apis-powershell-tmsl-tom-tabular-editor-scripting/">Making Sense of Power BI Programmatic Options: REST APIs, PowerShell, TMSL, TOM, Tabular Editor Scripting, Semantic Link</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Back around 2015, Microsoft introduced the current Power BI platform to replace its &#8220;<a href="https://www.c5insight.com/Resources/Blog/tabid/148/entryid/607/wave-goodbye-to-power-bi-in-office-365-we-wont-miss-you.aspx" title="Power BI for Office 365">Power BI for Office 365</a>&#8221; SharePoint/Excel-based offering that most people have long <a href="https://www.c5insight.com/Resources/Blog/tabid/148/entryid/607/wave-goodbye-to-power-bi-in-office-365-we-wont-miss-you.aspx" title="forgotten">forgotten</a>, with a focus of offering a self-service experience to business users. This product became so successful that a few years later Power BI Premium was positioned as &#8220;<a href="https://powerbi.microsoft.com/en-us/blog/power-bi-as-a-superset-of-azure-analysis-services/" title="a superset of Analysis Services">a superset of Analysis Services</a>&#8220;, i.e. Power BI was to also become the future of Microsoft enterprise BI offering. But now came a conundrum, with two very distinct target audiences, toolsets, and approaches, living under one roof.</p>



<p>While working one dataset at a time can be done with Power BI Desktop &#8211; a piece of software clearly inspired by PowerPoint and Excel &#8211; Power BI Premium features inherited from Analysis Services, such as <a href="https://www.oliviertravers.com/row-level-security-object-data-masking-business-use-cases/" title="Row Level Security, Object Level Security, Data Masking, Sensitivity Labels: What Are the Business Use Cases?">Object Level Security</a> or Partitions, are only partially supported in that tool. A perhaps even more crippling limitation is that Power BI Desktop is handling one dataset at a time, with no scripting abilities that can scale across several datasets, let alone an entire enterprise.</p>



<p>We&#8217;ve already covered in depth how various <a href="https://www.oliviertravers.com/power-bi-third-party-tools-development-addons/" title="Third-Party Tools to Ease Power BI Development and Increase Analyst Productivity">third-party dev tools</a> have stepped in to complement Power BI Desktop. In this entry we will introduce in a logical sequence what are the programmatic options in the Power BI ecosystem. The intended audience is people coming from the self-service space to ease their way into enterprise tooling, as people coming from enterprise BI have already been using that stuff for a decade or more. Read all the options until the end as Microsoft Fabric is opening things up big time!</p>



<h1 class="wp-block-heading">1. There&#8217;s a REST API for That, Right? Right?!</h1>


<div class="wp-block-image">
<figure class="alignright size-full is-resized"><a href="https://www.oliviertravers.com/wp-content/uploads/2023/01/anacrap.png"><img loading="lazy" decoding="async" width="612" height="611" src="https://www.oliviertravers.com/wp-content/uploads/2023/01/anacrap.png" alt="" class="wp-image-10657" style="width:243px;height:243px" srcset="https://www.oliviertravers.com/wp-content/uploads/2023/01/anacrap.png 612w, https://www.oliviertravers.com/wp-content/uploads/2023/01/anacrap-300x300.png 300w, https://www.oliviertravers.com/wp-content/uploads/2023/01/anacrap-150x150.png 150w, https://www.oliviertravers.com/wp-content/uploads/2023/01/anacrap-180x180.png 180w, https://www.oliviertravers.com/wp-content/uploads/2023/01/anacrap-60x60.png 60w" sizes="auto, (max-width: 612px) 100vw, 612px" /></a><figcaption class="wp-element-caption">The First Rule of APIs: Randomly partial functional coverage</figcaption></figure></div>


<p>Microsoft has done a good job promoting the fact many things can be done with Power BI via its set of <a href="https://learn.microsoft.com/en-us/rest/api/power-bi/" title="REST APIs">REST APIs</a>, which they&#8217;ve made in part available to &#8220;citizen developers&#8221; via Power Automate UI connectors. This provides an accessible path and learning curve from performing &#8220;clicky draggy&#8221; UI-driven manual steps in Power BI Desktop to a workflow-based automated approach, within reach of power users that are not professional developers or IT sysadmins.</p>



<p>So people first thinking of automating Power BI tasks will be tempted to believe these APIs cover all possible automation scenarios. Let&#8217;s cut to the chase, that&#8217;s not the case. The scope of these APIs covers embedding, admin/governance, and content management. What they do <em>not</em> cover however are the <em>inners</em> of a Power BI dataset, so if you want to script data modeling steps such as creating a relationship between tables or establishing an <a href="https://www.oliviertravers.com/row-level-security-rls-business-intelligence/" title="Row Level Security &amp; Beyond in Business Intelligence Applications: A Practical Overview">RLS rule</a>, you&#8217;re out of luck with the REST APIs as of 2023.</p>



<h1 class="wp-block-heading">2. PowerShell to the Rescue?</h1>



<p>The first tool that the adventurous power user is likely to run into past the REST APIs is PowerShell, which Microsoft also has promoted to some extent to its Power BI user base. But here&#8217;s where things start to be confusing, as &#8220;PowerShell&#8221; means different things:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><em>“PowerShell is a cross-platform task automation solution made up of <strong>a command-line shell, a scripting language, and a configuration management framework</strong>. PowerShell runs on Windows, Linux, and macOS.”</em>&nbsp;</p>
<cite><a href="https://learn.microsoft.com/en-us/powershell/scripting/overview?view=powershell-7.3">documentation</a> &#8211; let&#8217;s name three things the same way, because we&#8217;re Very Smart People</cite></blockquote>


<div class="wp-block-image">
<figure class="alignright size-full is-resized"><a href="https://www.oliviertravers.com/wp-content/uploads/2023/01/powershell.jpg"><img loading="lazy" decoding="async" width="512" height="512" src="https://www.oliviertravers.com/wp-content/uploads/2023/01/powershell.jpg" alt="" class="wp-image-10647" style="width:253px;height:253px" srcset="https://www.oliviertravers.com/wp-content/uploads/2023/01/powershell.jpg 512w, https://www.oliviertravers.com/wp-content/uploads/2023/01/powershell-300x300.jpg 300w, https://www.oliviertravers.com/wp-content/uploads/2023/01/powershell-150x150.jpg 150w, https://www.oliviertravers.com/wp-content/uploads/2023/01/powershell-180x180.jpg 180w, https://www.oliviertravers.com/wp-content/uploads/2023/01/powershell-60x60.jpg 60w" sizes="auto, (max-width: 512px) 100vw, 512px" /></a><figcaption class="wp-element-caption">Citizen developer discovering an ancient inscription that reads &#8220;PowerShell&#8221;.<br>Carbon14 dates it to 8.000BC?</figcaption></figure></div>


<p>PowerShell can run on desktops but also in <a href="https://learn.microsoft.com/en-us/powershell/azure/?view=azps-9.2.0" target="_blank" rel="noreferrer noopener">Azure</a> and third-party clouds, which opens up automation and orchestration possibilities, albeit less in a less user-friendly way than UI-based Power Automate. For Power BI purposes, see <a href="https://github.com/microsoft/powerbi-powershell" title="these modules">these modules</a>, and for modeling purposes more specifically, <a href="https://learn.microsoft.com/en-us/analysis-services/powershell/analysis-services-powershell-reference?view=asallproducts-allversions" target="_blank" rel="noreferrer noopener">this list of cmdlets</a>. Among them, the <a href="https://learn.microsoft.com/en-us/powershell/module/sqlserver/invoke-ascmd?view=sqlserver-ps" target="_blank" rel="noreferrer noopener">Invoke-ASCmd cmdlet</a> lets you <em>“execute an XMLA script, TMSL script, Data Analysis Expressions (DAX) query, Multidimensional Expressions (MDX) query, or Data Mining Extensions (DMX) statement against an instance of Analysis Services.”</em></p>



<p>We&#8217;re about to talk more about TMSL and XMLA, if you&#8217;re interested in reviewing the alphabet soup inherited from Analysis Services then refer to <a href="https://www.oliviertravers.com/languages-learn-power-bi-developer-dax-m-sql/#312_XMLA_TMSL_TOM_ASSL_AMO_LINQ_BIML_-_Enterprise_BI_Tools_Marginally_Relevant_to_Modern_Self-Service" title="this entry">this entry</a>. PowerShell is definitely not a business user-friendly option, but it has its place for people used to admin automation via a command line, as it&#8217;s been around for a long time.</p>



<h1 class="wp-block-heading">3. Better Luck with Tabular Model Scripting Language (TMSL) &amp; Tabular Model Definition Language (TMDL)?</h1>



<p>With TMSL we&#8217;re fully transitioning to the Analysis Services toolset, with this mouthful:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>&#8220;Tabular Model Scripting Language (TMSL) is the command and object model definition syntax for tabular data models at compatibility level 1200 or higher. TMSL communicates with Analysis Services through the XMLA protocol, where the XMLA.Execute method accepts both JSON-based statement scripts in TMSL as well as the traditional XML-based scripts in Analysis Services Scripting Language (ASSL for XMLA).&#8221;</p>
<cite><a href="https://learn.microsoft.com/en-us/analysis-services/tmsl/tabular-model-scripting-language-tmsl-reference?view=asallproducts-allversions" title="documentation">documentation</a> &#8211; they sure love their jargon over at Microsoft</cite></blockquote>


<div class="wp-block-image">
<figure class="alignright size-full is-resized"><a href="https://www.oliviertravers.com/wp-content/uploads/2023/01/output.jpg"><img loading="lazy" decoding="async" width="512" height="512" src="https://www.oliviertravers.com/wp-content/uploads/2023/01/output.jpg" alt="" class="wp-image-10648" style="width:193px;height:193px" srcset="https://www.oliviertravers.com/wp-content/uploads/2023/01/output.jpg 512w, https://www.oliviertravers.com/wp-content/uploads/2023/01/output-300x300.jpg 300w, https://www.oliviertravers.com/wp-content/uploads/2023/01/output-150x150.jpg 150w, https://www.oliviertravers.com/wp-content/uploads/2023/01/output-180x180.jpg 180w, https://www.oliviertravers.com/wp-content/uploads/2023/01/output-60x60.jpg 60w" sizes="auto, (max-width: 512px) 100vw, 512px" /></a><figcaption class="wp-element-caption">TMSL: The Matrix Silicon Layer?<br>Not quite.</figcaption></figure></div>


<p>TMSL can be executed from SSMS, SSIS, SQL Agent, or the aforementioned PowerShell, the latter being how TMSL can be executed from cloud platforms. SSMS can generate basic TMSL scripts for you from its UI. With TMSL, we can unlock access to what&#8217;s going on <em>within</em> a tabular model and its tables, models, and relationships. It&#8217;s relatively accessible if you&#8217;re familiar with JSON files. Yet, it&#8217;s not the programmatic Graal because of functional and performance limitations. In my opinion TMSL&#8217;s best fit is to execute ad hoc operations via SSMS, rather than full-fledged automation.</p>



<p>In April 2023 Microsoft <a href="https://powerbi.microsoft.com/en-us/blog/announcing-public-preview-of-the-tabular-model-definition-language-tmdl/" title="introduced">introduced</a> TMDL, an alternative to TMSL that&#8217;s easier to read and edit. No more escaping of quotes in M and DAX expressions! That&#8217;s nice, but it&#8217;s not a fundamentally more scalable approach.</p>



<h1 class="wp-block-heading">4. Tabular Object Model (TOM): Now We&#8217;re Talking with Scalable, Powerful C# Scripting</h1>



<p>Dear Power BI citizen developer, you&#8217;re not in Kansas anymore:</p>


<div class="wp-block-image">
<figure class="alignright size-full is-resized"><a href="https://www.oliviertravers.com/wp-content/uploads/2023/01/ssastomobjectmodeldiagram.png"><img loading="lazy" decoding="async" width="500" height="863" src="https://www.oliviertravers.com/wp-content/uploads/2023/01/ssastomobjectmodeldiagram.png" alt="" class="wp-image-10640" style="width:319px;height:551px" srcset="https://www.oliviertravers.com/wp-content/uploads/2023/01/ssastomobjectmodeldiagram.png 500w, https://www.oliviertravers.com/wp-content/uploads/2023/01/ssastomobjectmodeldiagram-174x300.png 174w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><figcaption class="wp-element-caption">This guy models!</figcaption></figure></div>


<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p> &#8220;The Tabular Object Model (TOM) is an extension of the Analysis Management Object (AMO) client library, created to support programming scenarios for tabular models created at compatibility level 1200 and higher. As with AMO, TOM provides a programmatic way to handle administrative functions like creating models, importing and refreshing data, and assigning roles and permissions.</p>



<p>TOM exposes native tabular metadata, such as&nbsp;<strong>model</strong>,&nbsp;<strong>tables</strong>,&nbsp;<strong>columns</strong>, and&nbsp;<strong>relationships</strong>&nbsp;objects. A high-level view of the object model tree, provided below, illustrates how the component parts are related.&#8221;</p>
<cite><a href="https://learn.microsoft.com/en-us/analysis-services/tom/introduction-to-the-tabular-object-model-tom-in-analysis-services-amo?view=asallproducts-allversions" title="documentation">documentation</a> &#8211; what a way with words, these writers are such elegant poets!</cite></blockquote>



<p>With TOM you can build entire datasets programmatically from scratch, including advanced features such as custom partitions, translations, or perspectives that many Power BI users don&#8217;t even know exist. But to use it you&#8217;ll have to learn at least a modicum of the C# language, set up a desktop and/or cloud environment with the <a href="https://learn.microsoft.com/en-us/analysis-services/client-libraries?view=asallproducts-allversions" title="adequate libraries">adequate libraries</a> (i.e. .Net DLLs), and learn the syntax and scope of the various <a href="https://learn.microsoft.com/en-us/dotnet/api/microsoft.analysisservices?view=analysisservices-dotnet" title="AnalysisServices namespaces">AnalysisServices namespaces</a>. If you&#8217;re working with a tabular model, be careful not to accidentally drift in the Multidimensional version of AnalysisServices, which has several sections such as <a href="https://www.oliviertravers.com/aggregations-power-bi-sql-server-analysis-services/" title="Aggregation Options in Power BI and SQL Server Analysis Services">Aggregations</a> that don&#8217;t exist in the TOM.</p>



<p>By conquering the TOM super power, we&#8217;re now morphing into the final form of the enterprise developer end boss!</p>



<p>Read <a href="https://learn.microsoft.com/en-us/analysis-services/tom/tom-pbi-datasets?view=asallproducts-allversions" title="Programming Power BI datasets with the Tabular Object Model">Programming Power BI datasets with the Tabular Object Model</a> if you want to dive in, and watch the video below:</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Power BI Dev Camp: how to program datasets using the Tabular Object Model (TOM)" width="625" height="352" src="https://www.youtube.com/embed/Wt9jB2Had74?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h1 class="wp-block-heading">5. If the TOM is the Bees Knees, What About Tabular Editor Scripting? And Why All These Overlapping Options?</h1>


<div class="wp-block-image">
<figure class="alignright size-full is-resized"><a href="https://www.oliviertravers.com/wp-content/uploads/2023/01/Dungeon_Master_FF.webp"><img loading="lazy" decoding="async" width="1000" height="723" src="https://www.oliviertravers.com/wp-content/uploads/2023/01/Dungeon_Master_FF.webp" alt="" class="wp-image-10643" style="width:239px;height:173px" srcset="https://www.oliviertravers.com/wp-content/uploads/2023/01/Dungeon_Master_FF.webp 1000w, https://www.oliviertravers.com/wp-content/uploads/2023/01/Dungeon_Master_FF-300x217.webp 300w, https://www.oliviertravers.com/wp-content/uploads/2023/01/Dungeon_Master_FF-768x555.webp 768w, https://www.oliviertravers.com/wp-content/uploads/2023/01/Dungeon_Master_FF-624x451.webp 624w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></a><figcaption class="wp-element-caption">Citizen Developer morphed into BI Final Boss, ready to shred complex data modeling problems</figcaption></figure></div>


<p>Wait, there&#8217;s more? We&#8217;re almost there, but yes there&#8217;s an optional twist to TOM scripting. Tabular Editor is primarily known as a desktop GUI tool, but it is built on top of its own <a href="https://docs.tabulareditor.com/api/index.html" target="_blank" rel="noreferrer noopener">API using libraries</a> that can be scripted. The <a href="https://docs.tabulareditor.com/api/TabularEditor.TOMWrapper.html" target="_blank" rel="noreferrer noopener">TOMWrapper.dll</a> namespace&nbsp;is very similar to the underlying TOM but adds features needed by Tabular Editor and aims to offer more convenience and abstraction than Microsoft&#8217;s libraries. See <a href="https://www.youtube.com/watch?t=693&amp;v=ixRjQ8bbXLw&amp;feature=youtu.be" title="this video">this video</a> for more details.</p>



<p>Scripting in Tabular Editor also uses C#, so if you&#8217;re <a href="https://www.oliviertravers.com/bi-job-profiles-career-paths-niches/" title="upskilling">upskilling</a> for TOM you&#8217;re prepping for TE and vice versa.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="C# Fundamentals for Beginners" width="625" height="352" src="https://www.youtube.com/embed/0QUgvfuKvWU?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">C# for complete newbs</figcaption></figure>



<p>So what to make of all <a href="https://learn.microsoft.com/en-us/analysis-services/analysis-services-developer-documentation?view=asallproducts-allversions" title="these developer options">these developer options</a>? Microsoft has this to say:&nbsp;</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><em>“Although both TMSL and TOM expose the same objects, Table, Column and so forth, and the same operations, Create, Delete, Refresh, TOM does not use TMSL on the wire. TOM uses the MS-SSAS-T tabular protocol instead […]</em>&nbsp;</p>



<p><em>The decision to use one or the other will come down to the specifics of your requirements. The TOM library provides richer functionality compared to TMSL. Specifically, whereas TMSL only offers coarse-grained operations at the database, table, partition, or role level, TOM allows operations at a much finer grain. </em><strong><em>To generate or update models programmatically, you will need the full extent of the API in the TOM library</em></strong><em>.”</em></p>
<cite><a href="https://learn.microsoft.com/en-us/analysis-services/tom/introduction-to-the-tabular-object-model-tom-in-analysis-services-amo?view=asallproducts-allversions#tom-and-json" title="More documentation">More documentation</a> &#8211; what a joy!</cite></blockquote>



<p>And here they state explicitly that these tools are not mutually exclusive:&nbsp;</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><em>“TOM represents a new and powerful API for Power BI developers that is separate and distinct from the Power BI REST APIs. While there is some overlap between these two APIs, each of these APIs includes a significant amount of functionality not included in the other. Furthermore, there are scenarios that require a developer to use both APIs together to implement a full solution.”</em>&nbsp;</p>
<cite><a href="https://www.powerbidevcamp.net/articles/programming-datasets-with-TOM/" target="_blank" rel="noreferrer noopener">Programming Datasets with the Tabular Object Model (TOM)</a></cite></blockquote>



<p>I hope this clears things up.</p>



<h1 class="wp-block-heading">6. Microsoft Fabric&#8217;s Semantic Link: The New Frontier</h1>



<p>Fabric is bringing a very exciting opportunity to code against Power BI semantic models thanks to <a href="https://learn.microsoft.com/en-us/fabric/data-science/semantic-link-overview" title="">Semantic Link</a>. You can now refresh individual tables and partitions, as well as update any other aforementioned TOM properties, in a Python notebook! And such notebooks can easily be <a href="https://learn.microsoft.com/en-us/fabric/data-factory/notebook-activity" title="">orchestrated</a> as an activity within a Fabric Data Factory pipeline. Michael Kovalsky is building the <a href="https://github.com/m-kovalsky/fabric_cat_tools/#tabular-object-model-tom" title="">fabric_cat_tools library</a> so you don&#8217;t have to write your notebooks from scratch.</p>



<p>In conclusion, I think it&#8217;s unlikely that Microsoft will invest in adding advanced scripting in Power BI Desktop, as they seem content with relying on third-party tools while neglecting to keep SSMS/SSDT tooling up to date. If you want to manage Power BI datasets at scale, until recently there was no way around learning and using the APIs and XMLA endpoint scripting, as well as the cloud-based orchestration platform of your choice to make these API calls. In other words, you had to spin up some desktop tools, VMs, or Azure resources to deliver the entire automation.</p>



<p>But with Fabric, we finally see a viable, built-in, cloud-based programmatic approach that can use Python, a language that&#8217;s very popular in the data world. Sandeep Pawar who brought the <a href="https://fabric.guru/refreshing-individual-tables-and-partitions-with-semantic-link#heading-method-3-using-tom-semantic-link-vgt07" title="">Semantic Link developments</a> to my attention posted a suggestion to bring the PowerShell kernel to Fabric, go <a href="https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=79970a11-32fe-ed11-a81c-6045bdb98602" title="">vote for it</a>!</p>



<p>This entry is focused on <em>semantic model</em> automation, but there is also potential in the future for a similar approach for <em>reports</em>. I will post an update when the time is right.</p><p>The post <a href="https://www.oliviertravers.com/power-bi-programmatic-options-rest-apis-powershell-tmsl-tom-tabular-editor-scripting/">Making Sense of Power BI Programmatic Options: REST APIs, PowerShell, TMSL, TOM, Tabular Editor Scripting, Semantic Link</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.oliviertravers.com/power-bi-programmatic-options-rest-apis-powershell-tmsl-tom-tabular-editor-scripting/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">10635</post-id>	</item>
		<item>
		<title>Row Level Security &amp; Beyond in Business Intelligence Applications: A Practical Overview</title>
		<link>https://www.oliviertravers.com/row-level-security-rls-business-intelligence/</link>
					<comments>https://www.oliviertravers.com/row-level-security-rls-business-intelligence/#comments</comments>
		
		<dc:creator><![CDATA[otravers]]></dc:creator>
		<pubDate>Sun, 01 Oct 2023 10:00:00 +0000</pubDate>
				<category><![CDATA[Power BI & Fabric]]></category>
		<guid isPermaLink="false">https://www.oliviertravers.com/?p=8681</guid>

					<description><![CDATA[<p>The ability to filter data by user is critical whenever sensitive information is shared, whether internally to an organization or even more so externally. This is often known as &#8220;row... <a href="https://www.oliviertravers.com/row-level-security-rls-business-intelligence/">Read more &#187;</a></p>
<p>The post <a href="https://www.oliviertravers.com/row-level-security-rls-business-intelligence/">Row Level Security & Beyond in Business Intelligence Applications: A Practical Overview</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>The ability to filter data by user is critical whenever sensitive information is shared, whether internally to an organization or even more so externally. This is often known as &#8220;row level security&#8221; (RLS) in a number of relational databases and business intelligence tools.</p>



<p>The idea is that each row in a data table is evaluated against rules stated somewhere else in that database (or application) to check which parts of that row, if any, can be returned to any given user. Because managing by individual users is bound to collapse over the long run, I like to think of RLS as also meaning &#8220;role level security&#8221;, because it&#8217;s less about any specific people, and more about what function they have in their organization and thus what data they should be granted access to.</p>



<p>However, that phrasing is not universal, which can make it tedious to compare how different BI products implement this, if at all. RLS is often filed under &#8220;data level security&#8221; since it&#8217;s embedded, or at least closely associated, with the source data itself.</p>



<p>Object level security goes beyond the confines of rows to include tables and columns. It used to be available only in enterprise products but is making its way in the self-service BI space. Meanwhile data masking is an adjacent concept, where data is obfuscated rather than completely blocked.</p>



<p>This entry gives an overview of how some of the best-known players approach data-based security. It&#8217;s impossible to be exhaustive as BI is a very busy space, but this is probably as good a review as you&#8217;ll find anywhere online. The Power BI/Fabric section is very thorough and up-to-date with the latest developments as of Fall 2023.</p>



<h1 class="wp-block-heading" id="1-core-concepts-how-they-work-in-microsoft-power-bi">1. Core Concepts &amp; How They Work in Microsoft Power BI</h1>



<p>I&#8217;ll start with Power BI because it&#8217;s the tool I&#8217;m most familiar with, and also arguably the BI platform with the most momentum in the last couple of years. It&#8217;s also better documented and supported by a much broader community than most of its competitors. I should still mention that Tableau has been renowned for its community for a long time. Frankly, some other long-established platforms barely have a pulse.</p>



<p>This section is going to be the most detailed by far. Since it lays out core concepts that will apply to a large extent with many other tools, I advise you to at least skim it regardless of what you actually use.</p>



<h2 class="wp-block-heading" id="1-1-create-and-modify-roles-in-the-desktop-assign-users-to-roles-in-the-service-test-in-the-desktop-and-service">1.1. Create and Modify Roles in the Desktop, Assign Users to Roles in the Service, Test in the Desktop and Service</h2>



<p>Row level security was added to Power BI in June 2016, barely a year into the platform&#8217;s life, and roles and rulesets could initially be defined in the service. This was however deprecated years ago in favor of Power BI Desktop, the tool of choice for Power BI modeling. Whereas many other platforms use SQL for this purpose, in Power BI the DAX language is king, and that&#8217;s how you <a href="https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls">define table filtering expressions by role</a>.</p>



<p>Power BI Desktop also conveniently lets you impersonate these roles to verify in situ that they&#8217;ll get to see what they&#8217;re supposed to see, and only that. With many other platforms you need to use a separate browser (or incognito session) to perform such tests. In practice this only works with the simplest RLS implementations as we&#8217;ll see in a minute.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="What is Row-Level Security (RLS) in Power BI???" width="625" height="352" src="https://www.youtube.com/embed/MxU_FYSSnYU?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">RLS Basics</figcaption></figure>



<p>Defining roles user by user within the Power BI Desktop UI is sometimes called &#8220;static RLS&#8221;, as you hardcode expressions that you then need to update manually. With its February 2023 update, Power BI Desktop <a href="https://powerbi.microsoft.com/en-us/blog/power-bi-february-2023-feature-summary/#post-22137-_Toc126917178" title="added">added</a> a GUI to generate rules that looks similar to how filtering works in Power Query as well as the <a href="https://learn.microsoft.com/en-us/power-bi/transform-model/datamarts/datamarts-access-control#define-row-level-security-rls-roles-and-rules-for-datamarts" title="online RLS editor">online RLS editor</a> for datamarts. It&#8217;s a simpler way to generate static rules without having to write DAX, but its lack of support for dynamic rules limits its usefulness.</p>



<p>Indeed, an alternative method called &#8220;<strong>dynamic RLS</strong>&#8221; is much easier to maintain by adding a user table to the data model and/or role table, to filter users against their userprincipalname(), username(), or roles you assign to them. With Dynamic RLS you want to limit how many roles users need to be added to, hopefully down to a single role. Either way, make sure not to leave any of your intended users (who are only workspace viewers) without roles or they won&#8217;t be able to see any data at all. Yes, that means you&#8217;ll create a role without any table filter expression to convey that users belonging to that role can see everything.</p>



<p>As a side note, it is possible to implement RLS with guest users using Azure Active Directory B2B, though the whole thing with name@guestdomain.com vs name_guestdomain.com#EXT#@hostdomain.onmicrosoft.com user principal names is very confusing and poorly documented.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="What Do You Need to Implement Dynamic Row Level Security in Power BI" width="625" height="352" src="https://www.youtube.com/embed/l6hR2Me6Ang?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Dynamic row level security will ease maintenance</figcaption></figure>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Dynamic Row Level Security in Power BI" width="625" height="352" src="https://www.youtube.com/embed/Sge_g9hTXWE?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">But dynamic RLS may require a few <a href="https://blog.pragmaticworks.com/dynamic-row-level-security-in-power-bi">DAX backflips</a>, depending on your specific requirements</figcaption></figure>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Power BI Dev Camp Session 18 - Developer Deep Dive into Row Level Security (RLS)" width="625" height="352" src="https://www.youtube.com/embed/iBGEKKelgpA?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Watch this video if you need to go in depth on dynamic RLS. Factless fact tables (i.e. bridge tables) are a common pattern to achieve it.</figcaption></figure>



<p>Power BI Desktop is focused on encoding RLS business logic in DAX, but the administration of users and the groups they belong to cannot be done with it. Instead, that part belongs to the service &#8211; i.e. the <a href="https://app.powerbi.com/">app.powerbi.com</a> web application &#8211; and is accessible by dataset owners. From there you can also view reports as any of the predefined roles.</p>



<p>If you create roles in the service first, you&#8217;ll have to recreate them in the Desktop. The whole thing is clunky to say the least.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://www.oliviertravers.com/wp-content/uploads/2021/08/image.png"><img loading="lazy" decoding="async" width="594" height="181" src="https://www.oliviertravers.com/wp-content/uploads/2021/08/image.png" alt="" class="wp-image-9558" srcset="https://www.oliviertravers.com/wp-content/uploads/2021/08/image.png 594w, https://www.oliviertravers.com/wp-content/uploads/2021/08/image-300x91.png 300w" sizes="auto, (max-width: 594px) 100vw, 594px" /></a><figcaption class="wp-element-caption">In the service, go to the dataset&#8217;s Security section, then select &#8220;Test as role&#8221;</figcaption></figure></div>


<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Testing Row Level Security in Power BI Service" width="625" height="352" src="https://www.youtube.com/embed/qsJwKSKbwnc?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h2 class="wp-block-heading" id="1-2-map-roles-to-groups-or-people-but-really-to-groups">1.2. Map Roles to Groups or People, But Really, to Groups</h2>



<p>Unless you&#8217;re in a tiny organization with no staff turnover, I highly recommend mapping roles to groups rather than individual users, in order to minimize administration overhead as people come and go. In this context &#8220;group&#8221; means Azure Active Directory security groups and <a href="https://docs.microsoft.com/en-us/microsoft-365/admin/setup/create-distribution-lists?view=o365-worldwide">Active Directory distribution groups</a> (aka distribution lists), not O365 groups (sorry, &#8220;<a href="https://support.microsoft.com/en-us/office/learn-about-microsoft-365-groups-b565caa1-5c40-40ef-9915-60fdb2d97fa2">Microsoft 365 groups</a>&#8220;). The difference between AAD security groups and O/M365 groups is explained by Microsoft <a href="https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-groups-create-azure-portal">here</a>, with more details relevant to Power BI conveniently summarized by Gilbert Quevauvilliers <a href="https://www.fourmoo.com/2020/04/01/power-bi-which-groups-can-be-used-to-set-permissions-in-power-bi/">here</a>.</p>



<p>Even better, instead of manually assigning people to their respective AAD security groups, you can use <a href="https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/groups-dynamic-membership" title="dynamic membership rules">dynamic membership rules</a> that will automatically pick up changes in user properties. Add or remove someone to/from a department? Boom, they&#8217;re automatically added/removed to/from the corresponding AAD security group(s), which then trickles down to RLS rules.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Can you use GROUPS with Power BI Row-Level Security (RLS)???" width="625" height="352" src="https://www.youtube.com/embed/oxYQ2GGefrs?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Assign roles to groups rather than people, unless you hate yourself</figcaption></figure>



<p>To avoid having to input data in two places, you could retrieve AAD group members <a href="https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&amp;tabs=http">via the Graph API</a> as the authoritative source for your groups/roles. However, Microsoft recommends that you do so using <a href="https://docs.microsoft.com/en-us/graph/overview#access-microsoft-graph-data-at-scale-using-microsoft-graph-data-connect">Microsoft Graph Data Connect</a> (via Azure Data Factory) rather than Power Query, for a <a href="https://docs.microsoft.com/en-us/power-query/connecting-to-graph">variety of reasons</a>.</p>



<h2 class="wp-block-heading" id="1-3-embedded-dynamic-row-filters-via-customdata">1.3. Data Masking &amp; Object Level Security for Confidentiality Beyond RLS</h2>



<p>Bear in mind that RLS is not applied to workspace members that have edit permissions, which makes sense because having these permissions means they&#8217;re allowed to be dataset authors. And Power BI dataset authors can see all the data as exposed in the data sources they work with.</p>



<p>If you don&#8217;t want your BI developers to see all the source data, they need to be provided obfuscated sources that are otherwise structured exactly like the production sources. Microsoft SQL Server does that with <a href="https://docs.microsoft.com/en-us/sql/relational-databases/security/dynamic-data-masking?view=sql-server-ver15">dynamic data masking</a>, as shown in the video below. If you&#8217;ve been left wanting in the past at the lack of granular control in DDM rules, it&#8217;s worth revisiting with SQL Server 2022:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>&#8220;Starting with SQL Server 2022 (16.x), you can prevent unauthorized access to sensitive data and gain control by masking it to an unauthorized user at different levels of the database. You can grant or revoke UNMASK permission <strong>at the database-level, schema-level, table-level or at the column-level to a user or database role</strong>.&#8221;</p>
<cite><a href="https://learn.microsoft.com/en-us/sql/relational-databases/security/dynamic-data-masking?view=sql-server-ver16#granular" title="Documentation">Documentation</a></cite></blockquote>



<p>I&#8217;ve also worked with clients who provided me with CSVs structured like the real data but filled with bogus numbers, that they later substituted with their production databases. In this case I use Power Query parameters to make the swap easy for them. </p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Dynamic Data Masking from SQL Server to Power BI" width="625" height="352" src="https://www.youtube.com/embed/hsXMOxbS_J0?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">BI developers need valid data so that they can model and visualize it, but it doesn&#8217;t need to be the actual confidential data</figcaption></figure>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Masking Sensitive Data.. | Kendra Little &amp; Andrew Pierce | The New World of Data Privacy" width="625" height="352" src="https://www.youtube.com/embed/hwecL8kiA3s?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">A third-party option: Redgate&#8217;s advanced <a href="https://www.red-gate.com/products/dba/data-masker/">Data Masker</a></figcaption></figure>



<p>The core principle behind Power BI&#8217;s RLS is that it&#8217;s by definition all about <strong><a href="https://docs.microsoft.com/en-us/power-bi/guidance/rls-guidance">filtering <em>table rows</em></a></strong>, not model objects such as entire tables or columns, and definitely not measures. Analysis Services <a href="https://docs.microsoft.com/en-us/analysis-services/tabular-models/object-level-security?view=asallproducts-allversions">does support</a> table and <strong>column-level security</strong> (CLS), and <strong>object-level security</strong> (OLS) <a href="https://docs.microsoft.com/en-us/power-platform-release-plan/2020wave2/power-bi/object-level-security">was added to Power BI (Premium)</a> in 2021, meeting clear <a href="https://ideas.powerbi.com/ideas/idea/?ideaid=3c6dd5d0-a2f9-44ae-a213-3a8c0d14dfd0">demand for it</a>. Here is the <a href="https://powerbi.microsoft.com/en-us/blog/object-level-security-ols-now-available-for-public-preview-in-power-bi-premium/">public preview announcement</a>.</p>



<p>Object-level security is a more secure pattern as it not only hides the underlying data, but also the object&#8217;s names so that the existence of these objects is not revealed at all. With a bit of creativity you can <a href="https://www.sqlbi.com/articles/hiding-measures-by-using-object-level-security-in-power-bi/">use OLS to hide measures</a>.</p>



<p><a href="https://www.minceddata.info/2021/02/28/object-level-security-and-power-bi-datasets/">This entry</a> shows how you can restrict access to either an entire table or to a column using Tabular Editor <a data-type="post" data-id="8594" href="https://www.oliviertravers.com/power-bi-third-party-tools-development-addons/">as an external tool</a>, while Chris Webb explains a <a href="https://blog.crossjoin.co.uk/2022/05/22/stopping-some-users-seeing-certain-columns-or-measures-in-your-power-bi-report-with-object-level-security-and-field-parameters/">more user-friendly setup</a> that combines OLS, RLS, and field parameters to prevent charts from breaking when they include a forbidden column.</p>



<p>Note that the combination of RLS and OLS has to be done in the same role as a user can&#8217;t belong to both an RLS and an OLS role (<a href="https://www.youtube.com/watch?v=6mCSSyTfqIg">video</a>).</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Combining Object Level and Row Level Security in Power BI and Azure Analysis Services" width="625" height="352" src="https://www.youtube.com/embed/a0Oi3kz8ibk?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">OLS + RLS</figcaption></figure>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Row-Level Security and Object-Level Security together in Power BI??? Yup!" width="625" height="352" src="https://www.youtube.com/embed/ZYO7wGKVM0Y?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">OLS &amp; RLS <em>can</em> work together, provided you set your users right</figcaption></figure>



<p>If you&#8217;re willing to roll your own DAX, you can restrict access to measures by using a measure table (with a column mapping to roles) and dynamic measures. This is a very flexible way to set up measures (RLS or not) but be aware this technique can have an impact on the performance of larger models.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Power BI - Row-level Security (RLS) for Measures" width="625" height="352" src="https://www.youtube.com/embed/5XxUVbLVdQE?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p>By tweaking your model you can also emulate column-level security (CLS) as explained by Greg Deckler <a href="https://community.powerbi.com/t5/Community-Blog/Column-Level-Security/ba-p/1309392">here</a>.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Power BI Column Level Security - Part 1 - Direct Query Method" width="625" height="352" src="https://www.youtube.com/embed/Nm_4rAlS6Rw?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">The traditional approach for data masking/CLS is to have some access logic in the data source</figcaption></figure>



<p>Another consequence of filtering table rows is that these filters affect top-level aggregates too. Say your sales rep for New England should also be able to see the company&#8217;s total revenue, but not details at lower granularities. For this purpose, you&#8217;ll want to generate either summary or <a href="https://www.oliviertravers.com/aggregations-power-bi-sql-server-analysis-services/" title="Aggregation Options in Power BI and SQL Server Analysis Services">aggregation tables</a>, or <a href="https://dataveld.com/2018/02/10/unpivoting-sensitive-columns-in-power-bi-to-apply-row-level-security/">unpivot sensitive columns</a>, depending on your exact requirements and underlying data structure.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Object-Level Security in Power BI" width="625" height="352" src="https://www.youtube.com/embed/PAX5GP9SkTA?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">OLS demo</figcaption></figure>



<p>A related idea is to combine some form of data masking with RLS. With this approach you&#8217;ll want to rely on explicit measures and hide physical columns from end users, which is often a good practice anyway. See <a href="https://dataveld.com/2018/02/09/masking-measure-values-in-analysis-services-and-power-bi/">this entry</a> and the video below:</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Secure the Sensitive Data in Power BI   Data Masking better with Row Level Security" width="625" height="352" src="https://www.youtube.com/embed/ORxgSciSC5M?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">RLS + data masking</figcaption></figure>



<p>Check out my entry on Power BI <a href="https://www.oliviertravers.com/power-bi-third-party-tools-development-addons/">external tools</a>, they can help you set up and review RLS rules and measures. I wrote in further detail about <a href="https://www.oliviertravers.com/row-level-security-object-data-masking-business-use-cases/">RLS, OLS, and DDM here</a>.</p>



<p>As an aside, a neat trick that you can easily add since you already have a user table is highlighting data relevant to the selected user, e.g. the sales territory they&#8217;re in charge of:</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Power BI - Highlighting the Current User&#039;s Data" width="625" height="352" src="https://www.youtube.com/embed/uuwxWnAILr0?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Auto highlighter</figcaption></figure>



<p>At a conference sometime in 2021 Microsoft announced they&#8217;d add the ability to control access by report page via RLS, but they&#8217;ve since then <a href="https://www.youtube.com/watch?v=SaOj_-zh6aQ">walked that back</a> and it&#8217;s no longer part of their backlog.</p>



<h2 class="wp-block-heading">1.4. What About Automation?</h2>



<h3 class="wp-block-heading" id="1-3-embedded-dynamic-row-filters-via-customdata">1.4.1. Testing RLS Programmatically with the ExecuteQueries REST API and Power Automate</h3>


<div class="wp-block-image">
<figure class="alignright size-full"><a href="https://www.oliviertravers.com/wp-content/uploads/2022/05/pa-impersonate.png"><img loading="lazy" decoding="async" width="466" height="397" src="https://www.oliviertravers.com/wp-content/uploads/2022/05/pa-impersonate.png" alt="" class="wp-image-10095" srcset="https://www.oliviertravers.com/wp-content/uploads/2022/05/pa-impersonate.png 466w, https://www.oliviertravers.com/wp-content/uploads/2022/05/pa-impersonate-300x256.png 300w" sizes="auto, (max-width: 466px) 100vw, 466px" /></a><figcaption class="wp-element-caption">Check and log that RLS-restricted models spit out what they&#8217;re supposed to</figcaption></figure></div>


<p>In Power Automate you can run a DAX query against a Power BI dataset while impersonating another user using their UPN.</p>



<p>This provides an automatable and auditable way to do the equivalent of &#8220;test as a role&#8221; in the Power BI service, which up to now was available solely as manual UI feature. </p>



<p>Read details on how to do this <a href="https://powerbi.microsoft.com/en-us/blog/announcing-general-availability-of-the-executequeries-rest-api/">here</a>. In this example they&#8217;re getting the UPNs out of an Excel file, if I were to do this I&#8217;d look into getting them in <a href="https://temmyraharjo.wordpress.com/2021/11/06/how-to-consume-microsoft-graph-using-power-automate/">Power Automate from Graph</a> or from the <a href="https://docs.microsoft.com/en-us/connectors/azuread/">Azure AD connector</a>. I believe the former doesn&#8217;t require the same admin access as the latter, but it&#8217;s a bit more involved as it requires writing HTTP POST calls instead of merely using built-in Power Automate GUI actions.</p>



<h3 class="wp-block-heading">1.4.2. Rules Deployment Automation</h3>



<p><a href="https://www.oliviertravers.com/non-obvious-functional-behavior-in-power-bi-deployment-pipelines/">Deployment pipelines</a> ease managing Power BI artifacts across dev/test/production workspaces, but be careful, RLS/OLS role assignment <a href="https://learn.microsoft.com/en-us/power-bi/create-reports/deployment-pipelines-process#item-properties-that-are-not-copied">is not copied through them</a>. You&#8217;ll have to use <a href="https://www.oliviertravers.com/power-bi-programmatic-options-rest-apis-powershell-tmsl-tom-tabular-editor-scripting/" title="TMSL/TOM scripting">TMSL/TOM scripting</a> <a href="https://www.oliviertravers.com/power-bi-programmatic-options-rest-apis-powershell-tmsl-tom-tabular-editor-scripting/">to push </a>the deployment of your RLS/OLS rules in addition to moving datasets through pipeline stages.</p>



<p>On the other hand, you can easily align the aforementioned masked/unmasked SQL DDL schemas with Power BI workspaces by using <a href="https://learn.microsoft.com/en-us/power-bi/create-reports/deployment-pipelines-process#auto-binding-across-pipelines">auto-binding</a>, meaning that you can, say, used masked data as the source for the dev version of a dataset while an unmasked schema could underpin the production version of that same dataset.</p>



<h3 class="wp-block-heading">1.4.3. Reporting</h3>


<div class="wp-block-image">
<figure class="alignright size-full is-resized"><a href="https://www.oliviertravers.com/wp-content/uploads/2023/03/image.png"><img loading="lazy" decoding="async" src="https://www.oliviertravers.com/wp-content/uploads/2023/03/image.png" alt="" class="wp-image-10985" style="width:294px;height:199px" width="294" height="199" srcset="https://www.oliviertravers.com/wp-content/uploads/2023/03/image.png 552w, https://www.oliviertravers.com/wp-content/uploads/2023/03/image-300x203.png 300w" sizes="auto, (max-width: 294px) 100vw, 294px" /></a></figure></div>


<p>Since March 2023 the Power BI Scanner API <a href="https://powerbi.microsoft.com/en-us/blog/new-scanner-api-scenarios/" title="has been able">has been able</a> to return dataset sub-artifact metadata content including RLS configuration. This returns a JSON payload that enumerates roles with their names, permissions, members, and table permissions including filter expressions, as pictured in the screenshot on the right.</p>



<h2 class="wp-block-heading" id="1-3-embedded-dynamic-row-filters-via-customdata">1.5. Embedded Dynamic Row Filters via CustomData() or JavaScript Filters</h2>


<div class="wp-block-image">
<figure class="alignright size-large is-resized"><img loading="lazy" decoding="async" src="https://docs.microsoft.com/en-us/power-bi/developer/embedded/media/embedded-row-level-security/azure-analysis-services-database-create-role-row-filters.png" alt="" style="width:334px;height:303px" width="334" height="303"/><figcaption class="wp-element-caption">Injecting row filters from your app via CUSTOMDATA</figcaption></figure></div>


<p>The <a href="https://dax.guide/customdata/" title="CustomData DAX function">CustomData DAX function</a> comes from Analysis Services and <a href="https://powerbi.microsoft.com/en-us/blog/the-customdata-feature-is-now-generally-available-in-power-bi/">was added</a> to Power BI Premium/PPU/Embedded at the end of 2021. From the documentation:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>&#8220;The CustomData feature allows you to add a Row filter by passing a free text (string) using the CustomData connection string property. Unlike users and roles, CustomData can&#8217;t be set within a .pbix file. CustomData can be used in a role DAX query, and can be used without a role in a measure DAX query. The CustomData feature is part of token generation functionality for dashboard, report, and tile artifacts.&#8221;</p>
<cite><a href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-row-level-security#using-the-customdata-feature">Row Level Security with Power BI Embedded</a></cite></blockquote>



<p>I haven&#8217;t seen much written about this capability in Power BI yet and haven&#8217;t tested it, I&#8217;d love to hear from people who have. Its main purpose is to provide an alternative to Active Directory-based USERNAME authentication.</p>



<p>In embedded scenarios you could also use JavaScript filters to achieve something that looks similar to RLS when users consume reports, but they&#8217;d still have &#8220;access to the model schema tables, columns, and measures&#8221;.</p>



<h2 class="wp-block-heading">1.6. RLS in Microsoft Fabric</h2>



<p>With the May 2023 public preview launch of Fabric, Microsoft <a href="https://blog.fabric.microsoft.com/en-us/blog/microsoft-onelake-in-fabric-the-onedrive-for-data" title="announced">announced</a> this platform would eventually come with one security model across data engines. This vision started to be partially executed with the rollout of <a href="https://blog.fabric.microsoft.com/en-us/blog/announcing-column-level-row-level-security-for-fabric-warehouse-sql-endpoint/?trk=feed_main-feed-card_feed-article-content" title="RLS and CLS">RLS and CLS</a> for the Fabric Warehouse and SQL endpoint. Why partially? Because these RLS/CLS rules don&#8217;t apply to DirectLake mode and force a fallback to a much slower DirectQuery pattern. This is a significant limitation since DirectLake is one of Fabric&#8217;s most promising features for Power BI&#8217;s evolution.</p>



<h2 class="wp-block-heading" id="1-5-all-the-above-overhead-plus-the-performance-cost-mean-you-should-use-rls-only-when-you-need-to">1.7. All the Above Overhead Plus the Performance Cost Mean You Should Use RLS Only When You Need To </h2>



<p>Since RLS adds a filter to all DAX queries, there&#8217;s obviously a performance cost. That&#8217;s really a valid observation regardless of the tool, as SQL-based BI platforms will similarly add a WHERE clause to the underlying queries to pass along the RLS logic. That performance tax might be so small as to be imperceptible, or it might be the straw that breaks the back of a model already straining to deliver acceptable response times to its end users.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Show the API some Love - MKE Power Platform User Group" width="625" height="352" src="https://www.youtube.com/embed/ZM2i2Oyqn60?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Some data models are so huge that RLS is not a viable option and radical architectural choices might be needed instead</figcaption></figure>



<p>RLS also introduces extra modeling complexities such as <a href="https://prologika.com/solving-rls-gotchas/">conflicting with UseRelationship</a> or <a href="https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-bidirectional-filtering">bidirectional cross-filtering subtleties</a>. You may need to create pseudo dimensions just for RLS to work the way you want, for instance if you only want to apply RLS to specific fact tables.</p>



<p>Because RLS is based on the data model, when you&#8217;re building a Live Connection report you&#8217;ll have to set RLS rules in the parent Power BI or Analysis model, and you won&#8217;t be able to test RLS rules from Security settings, i.e. you&#8217;ll have to test the child report itself with a user who&#8217;s restricted by RLS. Speaking of which, dashboards aren&#8217;t listed in the Security test functionality either. </p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="RLS with TWO Fact tables in Power BI" width="625" height="352" src="https://www.youtube.com/embed/rvCAPoy2TXs?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">You&#8217;ll struggle implementing RLS if you&#8217;re afraid of the model view!</figcaption></figure>



<p>And if your users like <a href="https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-insights">automated insights</a>, well tough luck, they don&#8217;t work with RLS/OLS.</p>



<p>For these reasons as well as the administrative overhead that comes with its implementation, Microsoft actually recommends <em>not </em>to use RLS unless you really need to. With creative use of query parameters, hidden filters, and workspaces by role, you may roll out content appropriate to each audience without RLS. Like everything else, this should be a cost vs. benefit assessment.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Measuring RLS Performance in Power BI" width="625" height="352" src="https://www.youtube.com/embed/nRm-yQrh-ZA?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Measuring RLS performance in 27 easy steps&#8230;</figcaption></figure>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Case of the SLOW Power BI report: Hierarchies and RLS" width="625" height="352" src="https://www.youtube.com/embed/R3Eqk1ZRUOY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">&#8230;Because RLS can have a nontrivial performance cost in some scenarios</figcaption></figure>



<h2 class="wp-block-heading" id="1-6-rls-is-one-part-of-a-bigger-puzzle">1.7. RLS Is One Part of a Bigger Puzzle and Only Applies to Viewers</h2>



<p>RLS is just one piece of the broader Power BI security architecture, it doesn&#8217;t work in a vacuum. It bears repeating that it&#8217;s <strong>only applied to workspace members with the Viewer role</strong> (even if they have Build permissions to the dataset), while <em>&#8220;Admin, Member, or Contributor have edit permission for the dataset and, therefore, RLS doesn’t apply to them.&#8221;</em></p>



<p>Make sure to educate yourself on the overall framework and the nooks and crannies of the Power BI platform:</p>



<ul class="wp-block-list">
<li><a href="https://www.jamesserra.com/archive/2020/03/power-bi-security/">Power BI Security</a> by James Serra</li>



<li><a href="https://docs.microsoft.com/en-us/power-bi/guidance/whitepaper-powerbi-security">Power BI Security Whitepaper</a></li>



<li><a href="https://learn.microsoft.com/en-us/power-bi/guidance/powerbi-implementation-planning-security-overview" title="Power BI implementation planning: Security">Power BI implementation planning: Security</a></li>



<li><a href="https://www.oliviertravers.com/power-bi-dataset-dataflow-datamart-dataverse-sql-server/" title="Power BI Dataset vs. Dataflow vs. Datamart vs. Dataverse vs. SQL Server vs. Synapse – Are You Confused Just Yet?">Power BI datamarts</a> &#8211; you can <a href="https://docs.microsoft.com/en-us/power-bi/transform-model/datamarts/datamarts-access-control#row-level-security">implement RLS</a> there, upstream of datasets, i.e. &#8220;the configured RLS on datamarts automatically gets applied to downstream items, including the auto-generated datasets and reports.&#8221;</li>



<li>An important caveat is that as of February 2023, <a href="https://docs.microsoft.com/en-us/power-bi/create-reports/service-goals-introduction">metrics </a>(formerly known as goals) don&#8217;t support RLS.</li>
</ul>



<h1 class="wp-block-heading" id="2-salesforce-s-tableau-access-rights-are-defined-for-each-data-source-or-via-centralized-rls">2. Salesforce&#8217;s Tableau: Access Rights are Defined for Each Data Source or Via Centralized RLS</h1>



<p>Tableau <a href="https://help.tableau.com/current/server/en-us/rls_bestpractices.htm">recommends</a> using an &#8220;entitlement table&#8221; to define which users or groups can access what, as detailed in <a href="https://www.tableau.com/sites/default/files/whitepapers/tableau-rls-entitlement-tables_0.pdf">this whitepaper</a>. These entitlements are defined at the data source level.</p>



<p>The video below (and <a href="https://mkt.tableau.com/tc19/session-materials/presentations/19BI-057_Centralized%20Row-Level%20Security.pdf">its slides</a>), taken from the November 2019 Tableau conference, showed the state of RLS in Tableau at the time as well as plans to add to the product the ability to centralize how these policies are defined (i.e. do this once across data sources), via a user interface as well as a policy service API.  The fact that Tableau needs this reflects their historical lack of support for star schemas (<a href="https://help.tableau.com/current/pro/desktop/en-us/datasource_datamodel.htm">support for relationships</a> was only added in 2020). This functionality was actually added two years later <a href="https://www.techrepublic.com/article/tableaus-latest-release-adds-governance-security-and-scalability-features/">in Tableau 2021.3</a>.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Centralized Row-Level Security" width="625" height="352" src="https://www.youtube.com/embed/VpRRfYcmtQ8?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h1 class="wp-block-heading" id="3-tibco-spotfire">3. TIBCO SpotFire</h1>



<p>RLS in SpotFire is done via <a href="https://docs.tibco.com/pub/sfire-analyst/10.10.0/doc/html/en-US/TIB_sfire-analyst_UsersGuide/id/id_personalized_information_links.htm">personalized information links</a> that can be set up for individual users or groups. As always, a user table is recommended to keep things manageable over time.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Personalized Information Links (Row Level Security) in Spotfire 6.5" width="625" height="352" src="https://www.youtube.com/embed/puc9gjv8_VI?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h1 class="wp-block-heading" id="4-google-s-looker">4. Google&#8217;s Looker</h1>



<p>In Looker RLS is enforced via <a href="https://docs.looker.com/admin-options/settings/user-attributes#access_filters">access filters</a> (<a href="https://docs.looker.com/reference/explore-params/access_filter">access_filter</a> parameter), which are translated into WHERE clauses against the underlying SQL query sent to a source (Looker is a SQL-centric tool), while<a href="https://docs.looker.com/reference/model-params/access_grant"> access_grant</a> is their method to control broader access to LookML structures such as views or joins.</p>



<h1 class="wp-block-heading" id="5-google-data-studio-do-you-like-writing-sql-queries-for-everything">5. Google Data Studio: Do You Like Writing SQL Queries for Everything?</h1>



<p>I initially brushed off Data Studio as one of so many promising but half-baked toys that Google would eventually abandon, like <a href="https://www.dataversity.net/google-plans-to-discontinue-needlebase/">Needlebase</a>, <a href="https://gsuiteupdates.googleblog.com/2018/12/google-fusion-tables-to-be-shut-down-on.html">Fusion Tables</a>, and countless others, and found it very limited at launch. But I hear that it&#8217;s been getting better, and it seems to have been getting some traction. Since Google is clearly very serious about BigQuery and is the leader in web analytics, I think it&#8217;s worth keeping an eye on Data Studio if only by association. After all, Power BI didn&#8217;t amount to much in its initial Office version (the PowerView / Silverlight days), and the new architecture launched in 2015 only started to come together as something cohesive by late 2016 / early 2017.</p>



<p>Google offers <a href="https://developers.google.com/datastudio/solution/row-level-filtering">this walkthrough</a> to implement &#8220;row level filtering&#8221; from a BigQuery source. Shockingly convoluted in comparison to more mature products. The approach suggested in the video below is more straightforward, but still requires handwriting SQL queries. Looks like Google has a SQL fetish!</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Filtering by multiple addresses in Data Studio" width="625" height="469" src="https://www.youtube.com/embed/wmfsc1q0GeE?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h1 class="wp-block-heading" id="6-thoughtspot">6. ThoughtSpot</h1>



<p>ThoughtSpot admins have access to a <a href="https://docs.thoughtspot.com/5.2/admin/data-security/set-rls.html">Rule Builder</a> where they can type expressions with guidance from a Rule Assistant to select filtering <a href="https://docs.thoughtspot.com/5.2/reference/rls-rule-builder-reference.html#">functions and variables</a>, as well as check for syntax validity. RLS rules are <a href="https://docs.thoughtspot.com/6.0/admin/data-security/row-level-security.html#best-practices-for-using-rule-based-row-level-security">defined at the table level</a>, not for other objects such as searches, worksheets, or pinboards.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="ThoughtSpot Row Level Security" width="625" height="352" src="https://www.youtube.com/embed/8YwpVmkln-E?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Row Security by user or group</figcaption></figure>



<h1 class="wp-block-heading" id="7-amazon-quicksight">7. Amazon QuickSight</h1>



<p>Like Google Data Studio, Amazon QuickSight doesn&#8217;t even register in Gartner&#8217;s magic quadrant. However it&#8217;s hard to completely ignore because a) it&#8217;s from Amazon, the #1 cloud platform by far, 2) it&#8217;s cheap, and 3) after looking into it I think it&#8217;s at least worth considering for embedding scenarios.</p>



<p>Amazon restricts RLS to its <a href="https://aws.amazon.com/quicksight/pricing/">Enterprise edition</a>, via a <a href="https://docs.aws.amazon.com/quicksight/latest/user/restrict-access-to-a-data-set-using-row-level-security.html">file or query</a> you need to set up to state dataset rules, which can be stated as positive (i.e. granting access under specific conditions) or negative (i.e. denying) conditions. It&#8217;s all pretty straightforward, and this approach make it easily applicable to new reports and dashboards you may add after creating your RLS query/file.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="#7 Advanced Data Prep - Row Level Security" width="625" height="469" src="https://www.youtube.com/embed/W50Xr10hwbs?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">RLS in QuickSight</figcaption></figure>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Column Level Security" width="625" height="352" src="https://www.youtube.com/embed/u7l93DUWbJo?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">CLS in QuickSight</figcaption></figure>



<h1 class="wp-block-heading" id="8-metabase-enterprise-only">8. Metabase: Enterprise Only</h1>



<p>Metabase calls RLS &#8220;<a href="https://www.metabase.com/docs/latest/enterprise-guide/data-sandboxes.html">sandboxing</a>&#8220;, which is one of the features that&#8217;s not available in the free open source version and requires the $10K+/year <a href="https://www.metabase.com/enterprise/">Enterprise version</a>. Their implementation relies on either simple column mapping of the filtered table with the user table (pictured below) for all users in any specific <a href="https://www.metabase.com/docs/latest/administration-guide/05-setting-permissions.html">group</a>, or custom views that use a &#8220;saved question&#8221; to hardcode more complex conditions in a SQL statement. The latter lets you hide entire columns to certain users.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="533" height="474" src="https://www.oliviertravers.com/wp-content/uploads/2020/07/metabase-rls.jpg" alt="" class="wp-image-8682" srcset="https://www.oliviertravers.com/wp-content/uploads/2020/07/metabase-rls.jpg 533w, https://www.oliviertravers.com/wp-content/uploads/2020/07/metabase-rls-300x267.jpg 300w" sizes="auto, (max-width: 533px) 100vw, 533px" /><figcaption class="wp-element-caption">Screenshot taken from video below</figcaption></figure></div>


<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Reporting for your customers in under 10 minutes" width="625" height="469" src="https://www.youtube.com/embed/BEmtJ7kk2GA?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Sandboxing in Metabase Enterprise</figcaption></figure>



<h1 class="wp-block-heading" id="9-a-few-other-platforms">9. A Few Other Platforms</h1>



<p>I might spin off some of these into their own section eventually, but in the interest of publishing the entry before dying of old age, here are just bullet points for now:</p>



<ul class="wp-block-list">
<li><a href="https://knowledge.domo.com/Administer/Controlling_Access_in_Domo/055Setting_Up_Publication_Groups">Domo</a></li>



<li><a href="https://www.sisense.com/product/govern/data-level-security/">Sisense</a></li>



<li><a href="https://www.ometis.co.uk/row-and-column-level-security-in-qlik-sense-using-section-access/">QlikSense</a> (&#8220;section access&#8221;)</li>



<li><a href="https://data-flair.training/blogs/qlikview-security/">QlikView</a></li>



<li><a href="https://community.microstrategy.com/s/article/Add-row-and-column-level-security-to-your-data-directly-from-MicroStrategy-Workstation?language=en_US">MicroStrategy</a></li>



<li><a href="https://wiki.yellowfinbi.com/display/USER74/Restricting+Data+with+Access+Filters#RestrictingDatawithAccessFilters-Overview">Yellowfin</a> (&#8220;access filters&#8221;)</li>
</ul>



<h1 class="wp-block-heading" id="10-conclusion-bringing-light-and-safety-to-shadow-it">10. Conclusion: Bringing Light and Safety to Shadow IT?</h1>



<p>This review showed that many tools have a broadly similar approach to row level security, though under different names and with varying levels of sophistication. Meanwhile, the ability to secure other objects such as columns is usually absent from the modern wave of user-facing &#8220;self-service&#8221; BI tools, and reserved to data warehouse and enterprise BI tools. For instance column-level security can be found in platforms such as:</p>



<ul class="wp-block-list">
<li><a href="https://cloud.google.com/bigquery/docs/column-level-security-intro">BigQuery</a></li>



<li><a href="https://docs.snowflake.com/en/user-guide/security-column-intro.html">Snowflake</a> (<a href="https://www.snowflake.com/blog/column-level-security-in-snowflake/#:~:text=Snowflake%20is%20happy%20to%20announce,other%20types%20of%20sensitive%20data.">introduced</a> in preview in July 2020)</li>



<li><a href="https://docs.microsoft.com/en-us/azure/synapse-analytics/sql-data-warehouse/column-level-security">Azure Synapse</a> (formerly Azure DataWarehouse) &#8211; see also its support for <a href="https://www.sqlshack.com/dynamic-data-masking-in-azure-synapse-analytics/">dynamic data masking</a></li>



<li>SQL Server / Azure Analysis Services, whether on premises or in the cloud, <a href="https://www.mssqltips.com/sqlservertip/5284/object-security-in-analysis-services-tabular-2017/#:~:text=There%20are%20different%20methods%20to,in%20Analysis%20Services%20Tabular%202017%3A&amp;text=Object%2Dlevel%20security%20%2D%20This%20feature,the%20focus%20of%20this%20tip.">since SSAS 2017</a></li>
</ul>



<p>The fact that Power BI added OLS shows that platform&#8217;s shift towards enterprise governance concerns.</p>



<p>RLS in &#8220;governed self-service&#8221; BI tools can be seen as a stepping stone between the all-or-nothing workspace/report/dashboard approach to security common to pure self-service BI platforms on one end, and enterprise-grade object security at the data warehouse level on the other end of the spectrum. &#8220;Managed self-service&#8221; if you will, not as out of control as &#8220;dark shadow IT&#8221; while not as ponderous as traditional enterprise IT.</p>



<p>As always, it&#8217;s all about your requirements. Organizations should work backwards from their data: how sensitive is it, and what&#8217;s the worst that could happen assuming that data &#8220;got out.&#8221;</p>



<p>If you like exhaustive (and exhausting?) entries like this one, read: <a href="https://www.oliviertravers.com/power-bi-third-party-tools-development-addons/">Third-Party Tools to Ease Power BI Development and Increase Analyst Productivity</a>.</p><p>The post <a href="https://www.oliviertravers.com/row-level-security-rls-business-intelligence/">Row Level Security & Beyond in Business Intelligence Applications: A Practical Overview</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.oliviertravers.com/row-level-security-rls-business-intelligence/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">8681</post-id>	</item>
		<item>
		<title>Third-Party Tools to Ease Power BI Development and Increase Analyst Productivity</title>
		<link>https://www.oliviertravers.com/power-bi-third-party-tools-development-addons/</link>
					<comments>https://www.oliviertravers.com/power-bi-third-party-tools-development-addons/#comments</comments>
		
		<dc:creator><![CDATA[otravers]]></dc:creator>
		<pubDate>Fri, 15 Sep 2023 17:40:00 +0000</pubDate>
				<category><![CDATA[Power BI & Fabric]]></category>
		<guid isPermaLink="false">https://www.oliviertravers.com/?p=8594</guid>

					<description><![CDATA[<p>While some cloud BI tools such as Amazon QuickSight do all their authoring in the browser, Microsoft chose to develop a dedicated client creatively named Power BI Desktop. Its initial... <a href="https://www.oliviertravers.com/power-bi-third-party-tools-development-addons/">Read more &#187;</a></p>
<p>The post <a href="https://www.oliviertravers.com/power-bi-third-party-tools-development-addons/">Third-Party Tools to Ease Power BI Development and Increase Analyst Productivity</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>While some cloud BI tools such as Amazon QuickSight do all their authoring in the browser, Microsoft chose to develop a dedicated client creatively named Power BI Desktop. Its initial release as &#8220;Power BI Designer&#8221; back in December 2014 was <a href="https://www.needlestacker.com/viz-tech-microsoft-power-bi/">underwhelming and unstable</a>.</p>



<p>But Microsoft stuck to its guns, and by combining Power Query for ETL, the great vertiPaq engine to handle data models in memory, and a decent if uninspired visualization layer, Power BI Desktop gradually grew into a must-use tool for BI developers and analysts working in the Microsoft ecosystem. The relentless stream of monthly updates &#8211; even if the pace eventually slowed down somewhat &#8211; has been a sight to behold.</p>



<p>Yet anyone doing more than cursory development with Power BI Desktop will grow frustrated by its limitations and inconsistencies, especially if you&#8217;re used to tools made for professional developers. Third-party solutions emerged from the user community over the years, and eventually Microsoft wisely chose to embrace them officially.</p>



<p>After their introduction in 2020, third-party tools are now firmly anchored in the enterprise Power BI world, even if they tend to be embraced more by consultants than the in-house developers that tend to have locked desktop environments.</p>



<h1 class="wp-block-heading">Introductory Musings on Product Positioning and Historical Developments</h1>



<p><em>This section is meant to put in context the emergence of third-party tools in the Power BI ecosystem. It&#8217;s safe to skip if all you want is operational goodies.</em></p>



<p>Microsoft program managers have stated that they intended to add more authoring tools to the Power BI service eventually, but I believe running the data model on a desktop tool &#8211; locally or in a virtual machine &#8211; will remain relevant for the foreseeable future, provided you have enough RAM (in my experience, getting to 32GB makes a big difference). It&#8217;s really cool to be running Analysis Services on your own PC if you stop to think about what&#8217;s under the hood.</p>



<p>Power BI Desktop however suffers from the jack-of-all-trades curse in that it doesn&#8217;t excel (bad pun? say it ain&#8217;t so!) at anything:</p>



<ul class="wp-block-list">
<li><strong>The ETL user experience</strong> is good for &#8220;regular end users&#8221; thanks to Power Query&#8217;s macro-recorder like GUI, but it can be extremely slow and is not very developer friendly. The &#8220;Advanced Editor&#8221; eventually graduated from obnoxious to lackluster with the addition of color-coding and intellisense, but it remains underwhelming for more demanding use.</li>



<li><strong>DAX authoring</strong> in the formula bar can be aggravating because of silly usability snags.</li>



<li><strong>Application Lifecycle Management</strong> remains a weak point.</li>
</ul>



<p>Whether you&#8217;re looking at the M side or the DAX side, there&#8217;s a general <strong>lack of a &#8220;big picture&#8221; perspective</strong> of your code base, with things such as global search-and-replace or dependency tracking being obvious gaps. The maturity seen in traditional development tools is nowhere to be seen, which is a bit frustrating coming from a vendor with such a rich history of working with and for developers. I understand Microsoft has business users in mind with this product, but even &#8220;regular people&#8221; eventually need this type of support.</p>



<p>Instead, in the past couple of years it&#8217;s become clear that Microsoft has been more focused on turning Power BI Desktop into the &#8220;clicky draggy PowerPoint of data&#8221; than making it a very developer-friendly tool. The user community made a concerted effort to fill in the gaps, and with its July 2020 update, Power BI Desktop became officially <a href="https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-july-2020-feature-summary/#_Launch_external_tools">aware of third-party tools</a> and gave them the ability to write back to the model.</p>



<p>I have mixed feelings about this as I feel it&#8217;s a cop out from making improvements that should be native to the core tool, but if Microsoft is not going to focus on developer productivity, I&#8217;ll take it. Interestingly, this ribbon <a href="https://powerbi.microsoft.com/en-us/blog/announcing-public-preview-of-external-tools-in-power-bi-desktop/">was contributed</a> by third-party developer Daniel Otykier. To be fair, that openness to community tools makes Microsoft looks much better than old school enterprise vendors such as Oracle, as Paul Turley <a href="https://sqlserverbi.blog/2020/07/19/power-bi-external-tools-reading-the-tea-leaves/">posted here</a>. This is now a self-fulfilling prophecy, as Microsoft <a href="https://www.sqlbi.com/articles/development-tools-for-tabular-models-in-2021/">concluded</a> that enterprise BI development tools are met with community tools, ergo they can spend their resources addressing more mainstream user needs. The folks at SQLbi reached the logical conclusion:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>&#8220;We suggest moving the development of enterprise-level Tabular models to Tabular Editor, and choosing the version (free open-source or commercial supported) according to the company’s productivity requirements and budget. We also suggest adopting DAX Studio to optimize data models and DAX expressions, as well as participating in crowdfunding to support its development.&#8221;</p>
<cite>Marco Russo &#8211; <a href="https://www.sqlbi.com/articles/development-tools-for-tabular-models-in-2021/">Development tools for Tabular models in 2021</a></cite></blockquote>



<p>As of the end of 2023 there&#8217;s finally a welcome shift in attitude from Microsoft, with developer-focused features such as support for calculation groups or the <a href="https://powerbi.microsoft.com/en-us/blog/deep-dive-into-dax-query-view-and-writing-dax-queries/" title="DAX query view">DAX query view</a>.</p>



<p>I&#8217;ll also note that Power Query is really a separate product, and in my opinion it would be better off as its own desktop tool that can go back and forth with Excel files, Power BI datasets, Power BI dataflows, PowerApps dataflows, Azure Data Factory wrangling dataflows, Power Query in Power Automate, you name it&#8230; but I digress.</p>



<h1 class="wp-block-heading">OK Olivier, Nice History Notes, But Why Should I Bother Again?</h1>



<p>If you don&#8217;t feel like you&#8217;re outgrowing Power BI Desktop, you&#8217;re probably using Power BI at a fairly small scale, which is entirely fine, but the Power BI platform has grown far beyond basic self-service BI. And even at a small scale, the effects of time alone make the need for auditing and documentation tooling ever clearer.</p>



<p>While you might wonder what the fuss is about if you&#8217;re just getting started with a new, small model from scratch, the need for more powerful tooling becomes more apparent as you:</p>



<ul class="wp-block-list">
<li>Add more models</li>



<li>Use more advanced functionality, from <a href="https://www.oliviertravers.com/row-level-security-rls-business-intelligence/">row level security</a> to aggregations to calculation groups</li>



<li>Run into performance issues</li>



<li>Have more than one developer</li>



<li>Need to maintain all this as your Power BI use becomes more and more complex over time: more data, more measures, more users, more workspaces, higher expectations, personnel rotation, etc. etc.</li>
</ul>



<p>Trust me on this, Power BI Desktop alone is not enough to do sustained serious work on the Power BI platform.</p>



<h1 class="wp-block-heading">Enough Already, I&#8217;m Convinced! Getting Started with 3rd-Party Tools in the Power BI Desktop Ribbon</h1>



<p>First off, external tools will only show up in the ribbon if specific JSON files are present on your PC, which requires you to use versions of these tools not older than July 2020. So start by installing the latest DAX Studio et. al. if you haven&#8217;t already done so.</p>


<div class="wp-block-image">
<figure class="alignright size-large"><img loading="lazy" decoding="async" width="203" height="143" src="https://www.oliviertravers.com/wp-content/uploads/2020/07/external-tools.png" alt="Computer, enhance!" class="wp-image-8627"/><figcaption class="wp-element-caption">Computer, Enhance!</figcaption></figure></div>


<p><s>Another significant dependency is that you need to enable the <a href="https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-enhanced-dataset-metadata">enhanced dataset metadata</a> preview, otherwise the icons will be displayed as disabled. I ran into issues with this feature when I tested it, so like some other consultants I follow, I stayed away from it for fear of wreaking production models.</s> Edit: since I initially wrote this entry, enhanced dataset metadata made it to General Availability, I haven&#8217;t run into problems since. This is a good example of why you want to stay close to the Power BI Desktop release cycle. It&#8217;s OK to be behind by a month or two, but if your IT locked you with a version from a year ago then you&#8217;ll be missing out on structurally important changes.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="EXTERNAL TOOLS in Power BI Desktop... are MISSING???" width="625" height="352" src="https://www.youtube.com/embed/jScicVBrr0s?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Watch this if you don&#8217;t see your external tools or want to add new ones, otherwise you&#8217;ll get Adam&#8217;s annoyed frown stuck on your face and you don&#8217;t want that</figcaption></figure>



<p>Without further ado, here&#8217;s an overview of what these tools are about, focusing on ETL and data modeling for now. You can download and install them separately or use the &#8220;<a href="https://powerbi.tips/product/business-ops-beta/">Business Ops Installer</a>&#8221; to get them in one swoop, but I&#8217;m told the latter is not necessarily up-to-date. In March 2021 support of external tools <a href="https://powerbi.microsoft.com/en-us/blog/support-of-external-tools-in-power-bi-desktop-is-ga/">reached General Availability</a>.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="PowerBI.tips - PUG - External Tools &amp; Business Ops" width="625" height="352" src="https://www.youtube.com/embed/QBK-qtSEBiQ?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h1 class="wp-block-heading">1. DAX Studio: Diving Deep Into your Data Models, with a Side Dish of VertiPaq Analyzer</h1>



<p>If you&#8217;re going to use a single third-party tool to complement Power BI Desktop, <a href="https://daxstudio.org/">DAX Studio</a> is it. It lets you see under the hood of your data model in ways that Power BI Desktop can&#8217;t. There&#8217;s a learning curve to it, mainly because there&#8217;s a steep learning curve to DAX. Don&#8217;t just EVALUATE it, adopt it (bad pun intended).</p>



<p>Here&#8217;s <a href="https://exceleratorbi.com.au/getting-started-dax-studio/">how to get started</a> with it, including how to connect to the ever-changing IP port if you&#8217;re not going to use the new integration with Power BI Desktop. There&#8217;s a lot going on here and explaining DAX Studio in detail is beyond the scope of this entry.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Creating a calculated table with DAX Studio" width="625" height="352" src="https://www.youtube.com/embed/yZnl2P9ik9g?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Marco Russo seen playing the world&#8217;s smallest violin as he&#8217;s mercilessly picking on your dire lack of DAX skills</figcaption></figure>



<p>Years ago SQLBI created another tool to analyze storage structures in PBI and Analysis Services models called <a href="https://www.sqlbi.com/tools/vertipaq-analyzer/"><strong>VertiPaq Analyzer</strong></a>. It&#8217;s very useful in case you&#8217;ve added many tables to your model and are now faced with a big PBIX file, which can lead to performance issues or even push you beyond what&#8217;s allowed in shared capacity (capping datasets at 1GB each) or even dedicated capacities.</p>



<p>The metrics returned by VertiPaq Analyzer are now available in DAX Studio, and can be output to small <a href="https://www.sqlbi.com/blog/marco/2019/09/15/vertipaq-analyzer-2-0-preview-1/">.vpax</a> files that contain just metadata and stats, but not actual data, and can be opened in Excel to see further details. This will help you diagnose that, say, using GUIDs takes a lot of room in your model that could be saved by <a href="https://exceleratorbi.com.au/replace-guids-with-a-surrogate-key-for-better-performance/">using surrogate keys</a> instead.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Introducing VertiPaq Analyzer in DAX Studio" width="625" height="352" src="https://www.youtube.com/embed/oP41X_IVa4k?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">With a proper Italian diet, you too can be thin like Marco.</figcaption></figure>



<p>Finally, DAX Studio also gives you the ability to <a href="https://daxstudio.org/documentation/features/output-modes/">export</a> the underlying data to Excel without facing the <a href="https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-export-data#limitations-and-considerations">volume restrictions </a>imposed by Power BI Desktop and the service.</p>



<p>In 2022 SQL BI launched <a href="https://www.sqlbi.com/tools/bravo-for-power-bi/"><strong>Bravo</strong></a>, a much simpler tool to find which tables and columns take the most space in your model, reformat your DAX, create a Date table, and export data. </p>



<h1 class="wp-block-heading">2. Tabular Editor: Unlocking Calculation Groups &amp; Working at Scale</h1>



<p>Tabular Editor is alongside with DAX Studio, the other heavy hitter in the Power BI tooling world. Two versions are available: the <a href="https://github.com/TabularEditor/TabularEditor">free open-source 2.0</a>, and the <a href="https://tabulareditor.com/">commercial version 3</a>. TE3 adds DAX editing, debugging, querying, and scripting; a C# macro recorder; and generally speaking, more polish and productivity than can be found in the free version. A detailed feature comparison can be found <a href="https://docs.tabulareditor.com/#feature-overview">here</a>.</p>



<h2 class="wp-block-heading">2.1. Cut Down Redundant Measures and Control Formatting with Calculation Groups </h2>



<p><a href="https://www.sqlbi.com/tools/tabular-editor/">Tabular Editor</a> was originally built with Analysis Services in mind. It has however become very relevant to Power BI which now supports <a href="https://docs.microsoft.com/en-us/analysis-services/tabular-models/calculation-groups?view=asallproducts-allversions">calculation groups</a> &#8211; including in a shared capacity aka Power BI Pro &#8211; but lacks a user interface to create them.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Calculation groups debut in Power BI Desktop" width="625" height="352" src="https://www.youtube.com/embed/DqwcVF09rtA?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Heh, I know you guys are hopeless at DAX but let me try yet again. So once upon a time Filter Context and Row Context were in a boat&#8230;</figcaption></figure>



<p>A DAX limitation that&#8217;s been frustrating me to no end is the fact that FORMAT turns numbers into strings, making it useless to control how chart axes, labels etc. look. Calculation groups however let you apply a format string expression to measures without that side effect. This unlocks much more flexible visualizations, as explained by Business Intelligist in the next video.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Finally! Format $ or %  For the Same Measure On the Same Chart (..the Calculation Group bug fixed!)" width="625" height="352" src="https://www.youtube.com/embed/xV8x7OTXIkE?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Yes!!!</figcaption></figure>



<p>For more use cases, read <a href="https://apexinsights.net/blog/10-uses-for-calculation-groups">10 ways you can use Calculation Groups in Power BI</a> and watch the video below, there&#8217;s really a lot going on here.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Using Calculation Groups to give end users much more insight with much less DAX" width="625" height="352" src="https://www.youtube.com/embed/c71-P70qPAY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Think of calculation groups as DAX measure transformations</figcaption></figure>



<h2 class="wp-block-heading">2.2. Other Tubular Efficiency Gains with Tabular Editor</h2>



<p>There&#8217;s much more to the tool than just support for calculation groups, with many other features that can accelerate large scale work. Its measure dependency tree for one is a good example of functionality that I feel should be native to Power BI Desktop. Because you&#8217;re working against model metadata rather than the model itself, changes are instantaneous where Power BI Desktop can feel sluggish whenever you update expensive DAV measures with big dependency chains.</p>



<p>Where DAX Studio is the tool of choice <em>within</em> a model, Tabular Editor is the strongest tool <em>across </em>models. It will cut through a lot of repetitive work in case you&#8217;re working on a many different datasets over time. </p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="NEW way to create measures in Power BI!" width="625" height="352" src="https://www.youtube.com/embed/kuo3HOxY788?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">It&#8217;s not DAX if it&#8217;s not formatted.</figcaption></figure>



<p>Scripting and custom actions in particular deserve to be explored as an entirely new way to approach DAX development beyond the confines of Power BI Desktop. See how Matt Allington <a href="https://exceleratorbi.com.au/edit-replace-code-inside-all-dax-measures-using-tabular-editor/">uses it to edit/replace code</a> inside all DAX measures, among other <a href="https://github.com/otykier/TabularEditor/wiki/Useful-script-snippets">useful script snippets</a>. See all its advanced features <a href="https://github.com/otykier/TabularEditor/wiki/Advanced-features">here</a>, and this <a href="https://github.com/itsnotaboutthecell/Power-BI-Sessions/tree/master/An%20Introduction%20to%20Tabular%20Editor">Introduction to Tabular Editor</a> by Alex Powers.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="PowerBI.Tips - Tutorial - Intro to Tabular Editor" width="625" height="352" src="https://www.youtube.com/embed/c-jZMzsvKnM?list=PLn1m_aBmgsbGvz4SsmO_fkeThjDUSWFkf" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Tell your friends you&#8217;re a Tabular Editor advanced user, I&#8217;m sure they&#8217;ll be impressed</figcaption></figure>



<p>Reid Havens for instance posted a very useful two-line script to expose DAX code to end users via the measure description field:</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Showing DAX Expressions When Using Power BI Datasets (Live)" width="625" height="352" src="https://www.youtube.com/embed/Wkap4yZmO9M?list=PLzN99cpDw6oCNYx56KKZjtltlvPXv_tCi" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Do your users keep asking what&#8217;s the formula behind a DAX measure?</figcaption></figure>



<h1 class="wp-block-heading">3. Power BI Sidetools</h1>



<p>This tool reveals a very good understanding of productivity bottlenecks inherent to Power BI development. It&#8217;s a bit of a Swiss Army knife, with:</p>



<ul class="wp-block-list">
<li><a href="https://thebipower.fr/index.php/2021/04/05/dax-debugger/">DAX debugger</a> that autogenerates debug tables as you write measures and their variables</li>



<li>Export tool to <a href="https://thebipower.fr/index.php/2020/10/30/easily-export-to-excel-with-power-bi-sidetools/">refreshable Excel files</a></li>



<li>Saving DAX and M codes to files</li>



<li>VS Code integration</li>
</ul>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Power BI Sidetools - All Kinds of AWESOME (with Didier Terrien)" width="625" height="352" src="https://www.youtube.com/embed/z04v4vy7T50?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">The insides of your PBIX files, revealed</figcaption></figure>



<h1 class="wp-block-heading">4. Visual Studio Code: M and TOM Advanced Work; Notepad++; Visual Studio</h1>



<h2 class="wp-block-heading">4.1. Syntax Highlighting for M and DAX</h2>



<p>We just mentioned <a href="https://code.visualstudio.com/">Visual Studio Code</a> as a complement to Power BI Side Tools. The first and most straightforward use for this free and nimble editor is to install its <a href="https://marketplace.visualstudio.com/items?itemName=PowerQuery.vscode-powerquery&amp;ssr=false#overview">Power Query / M extension</a> and use it as an ETL editor. It&#8217;s not going to be recognized by Power BI Desktop as a substitute for its advanced editor, so you&#8217;ll have to copy and paste. At first I thought I had to save a query to a .pq file for the M code to be recognized as such, but kind souls on Twitter pointed me to the &#8220;<a href="https://code.visualstudio.com/docs/languages/overview#:~:text=Changing%20the%20language%20for%20the%20selected%20file&amp;text=However%2C%20at%20times%20you%20may,language%20for%20the%20current%20file.">Select Language Mode</a>&#8221; menu (shortcut: Ctrl+K M) in the bottom right corner:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="533" src="https://www.oliviertravers.com/wp-content/uploads/2020/07/vs-code-language-1024x533.jpg" alt="" class="wp-image-8597" srcset="https://www.oliviertravers.com/wp-content/uploads/2020/07/vs-code-language-1024x533.jpg 1024w, https://www.oliviertravers.com/wp-content/uploads/2020/07/vs-code-language-300x156.jpg 300w, https://www.oliviertravers.com/wp-content/uploads/2020/07/vs-code-language-768x400.jpg 768w, https://www.oliviertravers.com/wp-content/uploads/2020/07/vs-code-language-1536x799.jpg 1536w, https://www.oliviertravers.com/wp-content/uploads/2020/07/vs-code-language-624x325.jpg 624w, https://www.oliviertravers.com/wp-content/uploads/2020/07/vs-code-language.jpg 1818w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Heard in the Microsoft corridors: &#8220;let me show you my PowerPoint presentation of PowerShell code extracting PowerQuery code to ease Power BI development&#8221;</figcaption></figure>



<p>There&#8217;s a <a href="https://marketplace.visualstudio.com/items?itemName=jianfajun.dax-language">similar extension for DAX</a>.</p>



<h2 class="wp-block-heading">4.2. PowerShell Scripting Black Arts</h2>



<p>But wait! Undeterred by the lack of ribbon integration, the fearless Ben Grubaudo came up with a solution using PowerShell to <a href="https://bengribaudo.com/blog/2020/07/16/5356/editing-report-spreadsheet-mashups-in-vscode">write back from VS Code</a> to Power BI and Excel files. Bananas, as they say in Power BI lingo! You&#8217;ll need to <a href="https://adamtheautomator.com/updating-to-powershell-7/">install PowerShell 7</a> if you don&#8217;t have it already (here&#8217;s <a href="https://adamtheautomator.com/check-powershell-version/">how to check</a>).</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="814" src="https://www.oliviertravers.com/wp-content/uploads/2020/07/ps-vsc-1024x814.png" alt="" class="wp-image-8639" srcset="https://www.oliviertravers.com/wp-content/uploads/2020/07/ps-vsc-1024x814.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2020/07/ps-vsc-300x238.png 300w, https://www.oliviertravers.com/wp-content/uploads/2020/07/ps-vsc-768x610.png 768w, https://www.oliviertravers.com/wp-content/uploads/2020/07/ps-vsc-624x496.png 624w, https://www.oliviertravers.com/wp-content/uploads/2020/07/ps-vsc.png 1516w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Launching VS Code via PowerShell Core 7 to load all the M code from a PBIX file in one page. This is loaded in a temporary file, change it then save and close it if you want the edits saved back into the PBIX source. Do this on a backup file!</figcaption></figure>



<p>If you want to execute PS scripts from within VS Code, you&#8217;ll want to select it as the shell you&#8217;re executing in VS Code (otherwise you might be running commands against PowerShell 5, which won&#8217;t work). If you&#8217;ve never done development before, well, welcome to dependency hell (wait till you try npm or Python)! In the case of Edit-Datamashup, it needs to be executed from outside of VS Code with VS Code closed, but other scripts such as <a href="https://bengribaudo.com/blog/2020/05/04/5221/searching-power-query">Search-DataMashup</a> can be launched from within VS Code.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="157" src="https://www.oliviertravers.com/wp-content/uploads/2020/07/powershell-vsc-1024x157.png" alt="" class="wp-image-8632" srcset="https://www.oliviertravers.com/wp-content/uploads/2020/07/powershell-vsc-1024x157.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2020/07/powershell-vsc-300x46.png 300w, https://www.oliviertravers.com/wp-content/uploads/2020/07/powershell-vsc-768x117.png 768w, https://www.oliviertravers.com/wp-content/uploads/2020/07/powershell-vsc-624x95.png 624w, https://www.oliviertravers.com/wp-content/uploads/2020/07/powershell-vsc.png 1269w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Running a PowerShell 7 terminal from within VS Code.</figcaption></figure>



<p>Incidentally, Microsoft just released <a href="https://devblogs.microsoft.com/python/announcing-pylance-fast-feature-rich-language-support-for-python-in-visual-studio-code/">Pylance</a>, a <a href="https://code.visualstudio.com/api/language-extensions/language-server-extension-guide">language server</a> for Python, to provide autocomplete, error-checking, jump-to-definition, code formatting, and other goodies while writing and reviewing code. When you realize how sophisticated is the tooling of more mature general-purpose languages, the DAX authoring experience in Power BI Desktop then looks downright primitive. Microsoft&#8217;s design choice, centered on an Excel-like formula bar, is both a blessing to ease entry for a mass audience, and a curse when you undoubtedly eventually need to work beyond its confines.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="251" src="https://www.oliviertravers.com/wp-content/uploads/2020/07/formula-bar-1024x251.png" alt="" class="wp-image-8636" srcset="https://www.oliviertravers.com/wp-content/uploads/2020/07/formula-bar-1024x251.png 1024w, https://www.oliviertravers.com/wp-content/uploads/2020/07/formula-bar-300x73.png 300w, https://www.oliviertravers.com/wp-content/uploads/2020/07/formula-bar-768x188.png 768w, https://www.oliviertravers.com/wp-content/uploads/2020/07/formula-bar-624x153.png 624w, https://www.oliviertravers.com/wp-content/uploads/2020/07/formula-bar.png 1331w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">The formula bar works as a one-off editor, but doesn&#8217;t scale when you have dozens of inter-dependent measures</figcaption></figure>



<h2 class="wp-block-heading">4.3. Tabular Object Model: Advanced Sorcery</h2>



<p>VS Code can also be connected to a Power BI data model via the <a href="https://docs.microsoft.com/en-us/analysis-services/tom/introduction-to-the-tabular-object-model-tom-in-analysis-services-amo?view=asallproducts-allversions">Tabular Object Model (TOM)</a>, as described by Phil Seamark <a href="https://dax.tips/2020/07/09/using-visual-studio-code-with-power-bi/">here</a>. While you probably won&#8217;t want to go through that rather involved process for day-to-day work, this is a promising approach for bulk work such as copying measures between reports or migrating from Azure Analysis Services to Power BI Premium.</p>



<p>Watch Phil&#8217;s blog for follow-ups on this, starting with <a href="https://dax.tips/2020/07/30/automatically-create-measures-in-power-bi-using-vs-code/amp/?__twitter_impression=true">Automatically create measures in Power BI using VS Code</a> (C# code sample).</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Tabular Object Model Hierarchy" width="625" height="352" src="https://www.youtube.com/embed/NFz-NaGXZ4w?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Don&#8217;t let TOM and .bim intimidate you, it&#8217;s just metadata. This is accessible from Tabular Editor too.</figcaption></figure>



<h2 class="wp-block-heading">4.4. Notepad++: The Original Option for Syntax Highlighting M Code</h2>



<p>Before this existed in any Microsoft tool, <a href="https://www.mattmasson.com/2014/11/notepad-language-file-for-the-power-query-formula-language-m/">Matt Masson</a> and <a href="https://ssbi-blog.de/blog/technical-topics-english/power-query-editor-using-notepad/">Lars Schreiber</a> added support for <a href="https://sascha-kasper.com/download/m-power-query-syntax-highlighting-in-notepad/">M as a user-defined language</a> for the beloved <a href="https://notepad-plus-plus.org/">Notepad++</a>. From a code-formatting perspective, it&#8217;s functionally equivalent to the VS Code option above, so it&#8217;s more about which code editor you prefer to use.</p>



<p>Note however that Lars stopped supporting the tool as Power BI and Excel improved their PQ editors, so you might be missing out on newer M functions. I still thought I&#8217;d mention it if only for the historical record or in case you can&#8217;t/won&#8217;t run VS Code. </p>



<h2 class="wp-block-heading">4.5. Visual Studio: for SSAS Die-Hards and Custom Connector Developers</h2>



<p>The full-fledged Visual Studio is a very distant grandfather to the open source VS Code. I&#8217;ve used it a couple times to work against Power BI &#8211; namely to migrate a Power BI model to SSAS &#8211; but like Paul Turley details <a href="https://sqlserverbi.blog/2020/07/03/i-am-done-using-visual-studio/">in this post</a>, it&#8217;s a bit of a bloated product so good luck with that. I&#8217;m mentioning it here for completeness, in practice it sees little use in the Power BI community.</p>



<p>For a completely separate use case there&#8217;s the <a href="https://marketplace.visualstudio.com/items?itemName=Dakahn.PowerQuerySDK">Power Query SDK</a> that&#8217;s designed to help with the development of custom connectors and is overkill for &#8220;regular&#8221; M ETL.</p>



<h1 class="wp-block-heading">5. ALM Toolkit: A substitute for Git That Knows PBIXes Inside Out</h1>



<p>A PBIX file is really a <a href="https://www.fourmoo.com/2017/05/02/what-makes-up-a-power-bi-desktop-pbix-file/">zip file with XML and JSON files in it</a>. To the best of my knowledge this has been reverse engineered by the community but is not officially documented for the public, and &#8220;hacking&#8221; these internals, while useful in a number of scenarios, is not supported. A drawback of how this file format is structured is that it&#8217;s just a binary file to traditional source control tools such as Git.</p>



<p>To alleviate that, Microsoft&#8217;s Christian Wade and MAQ Software developed the <a href="http://alm-toolkit.com/">ALM toolkit</a> (guys, get an SSL certificate for your website!). ALM Toolkit also lets you make <a href="https://docs.microsoft.com/en-us/power-bi/connect-data/incremental-refresh-xmla#metadata-only-deployment">metadata-only model updates</a>, unlike Power BI Desktop which overwrites the dataset. This is especially important to avoid erasing historical partitions created for incremental refresh. Ideally you&#8217;ll use this tool in combination with <a href="https://www.oliviertravers.com/non-obvious-functional-behavior-in-power-bi-deployment-pipelines/" data-type="post" data-id="10240">deployment pipelines</a>.</p>



<p>The Target in the Power BI service follows this syntax, where WorkspaceName and DatasetName are the assets names, not their IDs from the URL.</p>



<pre class="wp-block-code"><code>Dataset: powerbi://api.powerbi.com/v1.0/myorg/WorkspaceName;DatasetName</code></pre>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="PowerBI.Tips - Tutorial - ALM ToolKit with Christian Wade" width="625" height="352" src="https://www.youtube.com/embed/yKvMrQlUrCU?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Christian appears to be smiling, but he&#8217;s crying inside because guys in a cube don&#8217;t have ALM Toolkit installed on their laptops.</figcaption></figure>



<h1 class="wp-block-heading">6. Measure Killer; Power BI Comparer; Power BI Model Documenter</h1>



<p>The always helpful Imke Feldmann created two pointed tools well worth mentioning here, even though they&#8217;re separate PBIT/XLXM templates rather than external tools you can open from the toolbar. Read the instructions carefully as they won&#8217;t work unless you disable privacy restrictions that get in the way of running native database queries.</p>



<ul class="wp-block-list">
<li><a href="https://www.thebiccountant.com/2021/08/23/power-bi-cleaner-gen2-now-covers-analysis-services-models-as-well/">Power BI Cleaner</a> lets you identify unused measures, calculated columns, relationships, and pretty much everything else in a model except incremental load policies. If you&#8217;ve grown a large model over months or years, it&#8217;s very likely you have some cruft in there. Emke stopped supporting her tool and is pointing to <a href="https://en.brunner.bi/measurekiller" title="">Measure Killer</a> as the next best thing.</li>



<li><a href="https://www.thebiccountant.com/2019/09/14/compare-power-bi-files-with-power-bi-comparer-tool/">Power BI Comparer</a> is an Excel template that counts and tracks down changes between two PBIT files. &#8220;Git blame&#8221; for Power BI if you will. <a href="https://www.pbiexplorer.com/" title="">PBI Explorer</a> is a newer tool also handling this and much more.</li>
</ul>



<p>Marc Lelijveld created a somewhat similar tool with <a href="https://data-marc.com/model-documenter/">Model Documenter</a>. </p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="How to use Power BI External Tools to Document Models" width="625" height="352" src="https://www.youtube.com/embed/akk1KhntU-M?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption"><br>Rory Neary walking through model documentation</figcaption></figure>



<h1 class="wp-block-heading">7. Power BI Helper to Fix That Mess!</h1>



<p><a href="https://radacad.com/power-bi-helper">This tool</a> from Radacad feels a bit less single-minded in its focus than everything I&#8217;ve listed so far, but if you inherit messy, undocumented Power BI entities it may prove useful in getting a handle over what&#8217;s going on. Features run the gamut from exporting and beautifying M script to auditing columns, tables, and relationships, to publishing and copying across workspaces. <a href="https://radacad.com/install-power-bi-helper-as-an-external-tool-for-power-bi">It is now</a> &#8220;ribbon ready&#8221;.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Power BI Helper December 2019 Feature Summary" width="625" height="352" src="https://www.youtube.com/embed/9eHPc0zTS6U?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">You&#8217;ll get hooked on tracking down dependencies&#8230;</figcaption></figure>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Power BI Cleaner - External Tool (with Imke Feldmann)" width="625" height="352" src="https://www.youtube.com/embed/rBb-NWf42fA?start=685&#038;feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Cut the Cruft!</figcaption></figure>



<h1 class="wp-block-heading">8. Analyze in Excel</h1>



<p>I&#8217;ve always been frustrated by Analyze in Excel&#8217;s reliance on jumping through several hoops and using the old .odc office data connectors as opposed to loading Power BI datasets from Get Data in Excel. SQL BL strikes yet again by bringing Excel much closer to Power BI Desktop with the  <a href="https://github.com/sql-bi/AnalyzeInExcel">AnalyzeInExcel external tool</a>. This has become less useful now that you can <a href="https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-connect-excel-power-bi-datasets">Get Data from a Power BI dataset</a> in Excel.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Announcing Analyze in Excel for Power BI Desktop" width="625" height="352" src="https://www.youtube.com/embed/3fAE_qQCxZg?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h1 class="wp-block-heading">9. Beyond M and DAX: R and Python with Power BI</h1>



<p>R and later Python were the original third-party tools recognized in some capacity by Power BI, namely to <a href="https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-r-visuals">generate visuals</a> by sideloading the respective engines and <a href="https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-r-ide">IDEs</a>. You can also use R or Python in Power Query, but that&#8217;s done via the native Power BI UI, not in third-party editors. These capabilities have existed for years, and their core purpose is to bring the world of R/Python <em>into</em> Power BI.</p>



<p>The new external tool functionality opens up opportunities for additional ways to use these languages directly on top of Power BI Desktop. David Eldersveld lists some scenarios in <a href="https://dataveld.com/2020/07/20/python-as-an-external-tool-for-power-bi-desktop-part-1/">this entry</a>:</p>



<ul class="wp-block-list">
<li>Code model documentation.</li>



<li>Export as much data as your local RAM will allow (as an alternative to using DAX Studio for that purpose)</li>



<li> Visualize the Power BI data in a fully interactive way with <a href="https://coggle.it/diagram/XvkJm57l7aRP0FU7/t/notebooks-dashboards">Python libraries such as Altair or Bokeh</a> by loading the data into a panda dataframe. R/Python visuals in Power BI are turned into static images so they can be the recipient of cross filtering but not the emitter. </li>



<li>Blend Power BI data with other sources in Python.</li>



<li>Run DAX queries from a Python script or <a href="https://dataveld.com/2020/08/17/jupyter-as-an-external-tool-for-power-bi-desktop-python-part-4/">Jupyter notebook</a>, a bit like <a href="https://count.co/">count.co</a> in spirit. I can see how I might use this for tests, training, and documentation.</li>
</ul>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Power BI Desktop Jupyter External Tool - Sample Notebook" width="625" height="352" src="https://www.youtube.com/embed/E6phRKwDB14?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Python BI</figcaption></figure>



<p>Some of these ideas are very intriguing as they might help expose and &#8220;unlock&#8221; Power BI data models beyond the confines of the Power BI service. I&#8217;ll have to think more about how deployment would work, but this could be big for embedded scenarios without having to shell out big bucks for Power BI Embedded.</p>



<h1 class="wp-block-heading">10. More External Tools and How to Build Your Own</h1>



<p>Read <a href="https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-external-tools">the official documentation</a> that explains the underlying architecture and limitations of external tools, then see these entries for examples of what can be built and how to do so:</p>



<ul class="wp-block-list">
<li>Kasper de Jonge&#8217;s: <a href="https://www.kasperonbi.com/creating-a-time-intelligence-external-tools-app-for-power-bi-desktop/">Creating a Time intelligence “External Tools” app for Power BI Desktop</a></li>



<li>Erik Svensen
<ul class="wp-block-list">
<li><a href="https://eriksvensen.wordpress.com/2020/07/27/powerbi-external-tool-to-connect-excel-to-the-current-pbix-file/">External tool to connect Excel to the current PBIX file</a></li>



<li>Same with <a href="https://eriksvensen.wordpress.com/2020/08/20/connect-your-powerbi-desktop-model-to-tableau-desktop-via-external-tools-in-powerbi/">Tableau Desktop</a></li>



<li><a href="https://eriksvensen.wordpress.com/2020/08/25/power-bi-external-tool-open-power-bi-report-builder-part-1/">Power BI Report Builder</a></li>
</ul>
</li>



<li>Phil Seamark: <a href="https://dax.tips/2020/10/19/use-vs-code-to-create-power-bi-external-tool/">Connect to an AS model</a></li>



<li>Soheil Bakhshi: <a href="https://biinsight.com/quick-tips-registering-sql-server-profiler-as-an-external-tool/" title="">Registering SQL Server Profiler as an External Tool in Power BI Desktop</a></li>



<li>Steve Campbell: <a href="https://powerbi.tips/2020/08/hot-swap-report-connections-external-tools/">Hot Swap Report Connections</a></li>



<li>Marcus Wegener: <a href="https://www.thinkbi.de/2021/03/14/export-power-bi-desktop-data-preparation-to-dataflow/">Export2Dataflow</a></li>
</ul>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="How To Create External Tools for Power BI" width="625" height="352" src="https://www.youtube.com/embed/rsobSGvh_EM?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">Nice and easy</figcaption></figure>



<h1 class="wp-block-heading">11. Monkey Tools for (Excel) Data Models</h1>



<p>Technically <a href="https://www.excelguru.ca/content.php?341-Monkey-Tools">Monkey Tools</a> is an Excel add-in, but some of its more advanced features are also valuable to Power BI modelers. Namely, QuerySleuth gives you a dependency/precedent tree view of your queries, while ModelSleuth helps document data models.</p>



<p>Unlike the aforementioned tools, this one is a paid product.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Vancouver Power BI &amp; Modern Excel User Group Meeting - June 2020" width="625" height="352" src="https://www.youtube.com/embed/JxvBtsLfQAM?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div><figcaption class="wp-element-caption">This is the end of a long post and we ran out of pithy captions.</figcaption></figure>



<h1 class="wp-block-heading">12. BI-Related Tools Beyond This Entry&#8217;s Scope</h1>



<p>As I said there&#8217;s a broader BI ecosystem with many other tools helping with the various facets in BI projects:</p>



<ul class="wp-block-list">
<li><a href="https://www.oliviertravers.com/power-bi-datamarts-sql-server-desktop-tools-connection/" data-type="post" data-id="10120">Data access</a>, e.g. Azure Storage Explorer, Azure Data Studio, or SQL Server Management Studio</li>



<li>Administration and governance, e.g. BI Sentinel, Power Update</li>



<li>Write-back and planning: Inforiver, Power Planner, Acterys (<a href="https://twitter.com/Acterysfpa/status/1288598307946688512">available as an External Tool</a>)</li>



<li><a href="https://www.oliviertravers.com/advanced-power-bi-custom-visuals-options-developement/" data-type="post" data-id="9615">Custom visuals</a> such as Charticulator, Power BI Report Builder (which will be added to the external tool ribbon)</li>
</ul>



<h1 class="wp-block-heading">13. Further Related Musings</h1>



<ul class="wp-block-list">
<li><a href="https://www.oliviertravers.com/power-bi-programmatic-options-rest-apis-powershell-tmsl-tom-tabular-editor-scripting/" title="Making Sense of Power BI Programmatic Options: REST APIs, PowerShell, TMSL, TOM, Tabular Editor Scripting">Making Sense of Power BI Programmatic Options</a></li>



<li><a href="https://www.oliviertravers.com/spreadsheets-structured-data-queries/">Spreadsheets Get Smarter About Structured Data, At A Steep Price</a></li>



<li><a href="https://www.oliviertravers.com/power-bi-the-missing-productivity-features/">Power BI: The Missing Productivity Features</a></li>



<li><a href="https://www.oliviertravers.com/code-documentation-haaaalp/">Ideas to Improve Software Documentation, Raise Productivity of Mere Mortals</a></li>
</ul><p>The post <a href="https://www.oliviertravers.com/power-bi-third-party-tools-development-addons/">Third-Party Tools to Ease Power BI Development and Increase Analyst Productivity</a> first appeared on <a href="https://www.oliviertravers.com">Olivier Travers</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.oliviertravers.com/power-bi-third-party-tools-development-addons/feed/</wfw:commentRss>
			<slash:comments>10</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">8594</post-id>	</item>
	</channel>
</rss>