<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: External Tool Connection in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/External-Tool-Connection/m-p/1932896#M30278</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="310210" data-lia-user-login="ClaudioPat" class="lia-mention lia-mention-user"&gt;ClaudioPat&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please check whether your custom connector has access to&amp;nbsp;&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;C:\Users\ABS01\source\repos\PbixSerialize\PbixSerialize\Program.cs:riga 21&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;I think you can try to run it by &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="0"&gt;&lt;SPAN&gt;administrator.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rico Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jul 2021 09:55:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-07-01T09:55:31Z</dc:date>
    <item>
      <title>External Tool Connection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/External-Tool-Connection/m-p/1928416#M30217</link>
      <description>&lt;P&gt;I am trying to write a little utility as an external tool.&lt;/P&gt;&lt;P&gt;For now I was just trying to connect to the server and get the database model.&lt;/P&gt;&lt;P&gt;This is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using System;
using System.IO;
using Microsoft.AnalysisServices.Tabular;

namespace PbixTool
{
    class Program
    {
        static void Main(string[] args)
        {
            var server_port = args[0];
            var database_name = args[1];
            Console.WriteLine($"Server port: {server_port}, Database: {database_name}");
            string ConnectionString = "DataSource=" + server_port;
            using (Server server = new Server())
            {
                try
                {
                    server.Connect(ConnectionString);
                    var db = server.Databases[database_name];
                    Console.WriteLine(db.Model);
                }
                catch (Exception ex)
                {
                    //log exceptions somewhere
                    Console.WriteLine(ex.ToString());
                }
            }
            Console.WriteLine("Press Enter to close this console window.");
            Console.ReadLine();
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I registered the built exe as an external tool as explained here: &lt;A href="https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-external-tools-register" target="_self"&gt;Register an external tool.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When I run the external tool from an empty pbix I don't get any error and I get this output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Server port: localhost:57713, Database: f19f7559-9afc-45ad-8f3b-a7bc98ac400e
Microsoft.AnalysisServices.Tabular.Model
Press Enter to close this console window.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;If I then try to create a sample table with enter data in the model, or if I try to run in on any pbix with a model, I get this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Server port: localhost:57713, Database: f19f7559-9afc-45ad-8f3b-a7bc98ac400e
Microsoft.AnalysisServices.Tabular.TomInternalException: An internal error has occured.
   in Microsoft.AnalysisServices.Tabular.ObjectFactory.CreatePartitionSourceFromType(PartitionSourceType type)
   in Microsoft.AnalysisServices.Tabular.Partition.RecreatePartitionSourceIfMismatchWithPartitionType()
   in Microsoft.AnalysisServices.Tabular.Partition.ReadAllBodyProperties(IPropertyReader reader)
   in Microsoft.AnalysisServices.Tabular.DdlUtil.LoadDataTable(ObjectType objectType, DataTable table, Dictionary`2 objectMap, StringComparerInfo comparerInfo)
   in Microsoft.AnalysisServices.Tabular.DdlUtil.LoadObjectsFromSchema(DataSet schema, ObjectType[] types, Dictionary`2&amp;amp; objectMap, StringComparerInfo comparerInfo)
   in Microsoft.AnalysisServices.Tabular.DdlUtil.LoadModelFromSchema(DataSet schema, ObjectType[] objectTypes, Dictionary`2&amp;amp; objectMap, StringComparerInfo comparerInfo)
   in Microsoft.AnalysisServices.Tabular.DdlUtil.DiscoverModel(Database db)
   in Microsoft.AnalysisServices.Tabular.Database.LoadModel()
   in Microsoft.AnalysisServices.Tabular.Database.get_Model()
   in PbixSerialize.Program.Main(String[] args) in C:\Users\ABS01\source\repos\PbixSerialize\PbixSerialize\Program.cs:riga 21
Press Enter to close this console window.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case I created a table through enter data, named 'Table', with one column 'Column1' and a single value '1'.&lt;/P&gt;&lt;P&gt;Line 21 is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Console.WriteLine(db.Model);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Indeed I get the same error anytime I try to retrieve the Model.&lt;/P&gt;&lt;P&gt;Any idea on how to interpret the error and how to solve it?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 13:56:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/External-Tool-Connection/m-p/1928416#M30217</guid>
      <dc:creator>ClaudioPat</dc:creator>
      <dc:date>2021-06-29T13:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: External Tool Connection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/External-Tool-Connection/m-p/1932896#M30278</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="310210" data-lia-user-login="ClaudioPat" class="lia-mention lia-mention-user"&gt;ClaudioPat&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please check whether your custom connector has access to&amp;nbsp;&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;C:\Users\ABS01\source\repos\PbixSerialize\PbixSerialize\Program.cs:riga 21&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;I think you can try to run it by &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="0"&gt;&lt;SPAN&gt;administrator.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rico Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 09:55:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/External-Tool-Connection/m-p/1932896#M30278</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-01T09:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: External Tool Connection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/External-Tool-Connection/m-p/1935228#M30304</link>
      <description>&lt;P&gt;I solved the problem.&lt;/P&gt;&lt;P&gt;It regards the library included.&lt;/P&gt;&lt;P&gt;With Nuget instead of installing "Microsoft.AnalysisServices.Tabular" which apparently is an old version one should install "Microsoft.AnalysisServices.retail.amd64".&lt;/P&gt;&lt;P&gt;This solved the problem.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 11:27:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/External-Tool-Connection/m-p/1935228#M30304</guid>
      <dc:creator>ClaudioPat</dc:creator>
      <dc:date>2021-07-02T11:27:09Z</dc:date>
    </item>
  </channel>
</rss>

