How to use TabularStructureDiscoveryFactory method of NBi.Core.Structure.Tabular.TabularStructureDiscoveryFactory class

Best NBi code snippet using NBi.Core.Structure.Tabular.TabularStructureDiscoveryFactory.TabularStructureDiscoveryFactory

TabularStructureDiscoveryFactoryTest.cs

Source:TabularStructureDiscoveryFactoryTest.cs Github

copy

Full Screen

...9{1011 [TestFixture]12 [Category("Olap")]13 public class TabularStructureDiscoveryFactoryTest14 {1516 [Test]17 public void Execute_TabularDateDimensionWithHeighTeenHierarchies_ListStructureContainingSevenTeenElements()18 {19 var conn = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());20 var factory = new TabularStructureDiscoveryFactory(conn);21 var cmd = factory.Instantiate(Target.Hierarchies, TargetType.Object,22 new CaptionFilter[] {23 new CaptionFilter(Target.Perspectives, "Internet Operation"),24 new CaptionFilter(Target.Dimensions, "Date")25 });2627 var structs = cmd.Execute();2829 Assert.That(structs.Count(), Is.EqualTo(17));30 }313233 [Test]34 public void Execute_TabularCalendarHierarchyWithSixLevels_ListStructureContainingSixElements()35 {36 var conn = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());37 var factory = new TabularStructureDiscoveryFactory(conn);38 var cmd = factory.Instantiate(Target.Levels, TargetType.Object,39 new CaptionFilter[] {40 new CaptionFilter(Target.Perspectives, "Internet Operation"),41 new CaptionFilter(Target.Dimensions, "Date"),42 new CaptionFilter(Target.Hierarchies, "Calendar")43 });44 45 var structs = cmd.Execute();4647 Assert.That(structs.Count(), Is.EqualTo(6));48 }495051 [Test]52 public void Execute_TabularMonthLevelWithTwoProperties_ListStructureContainingNoElement()53 {54 var conn = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());55 var factory = new TabularStructureDiscoveryFactory(conn);56 var cmd = factory.Instantiate(Target.Properties, TargetType.Object,57 new CaptionFilter[] {58 new CaptionFilter(Target.Perspectives,"Adventure Works"),59 new CaptionFilter(Target.Dimensions,"Date"),60 new CaptionFilter(Target.Hierarchies,"Calendar"),61 new CaptionFilter(Target.Levels,"Month")62 });63 64 var structs = cmd.Execute();6566 Assert.That(structs.Count(), Is.EqualTo(0));67 }686970 [Test]71 public void Execute_TabularMeasureGroupsForFinance_ThreeElements()72 {73 var conn = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());74 var factory = new TabularStructureDiscoveryFactory(conn);75 var cmd = factory.Instantiate(Target.MeasureGroups, TargetType.Object,76 new CaptionFilter[] {77 new CaptionFilter(Target.Perspectives,"Internet Operation"),78 });7980 var structs = cmd.Execute();8182 Assert.That(structs.Count(), Is.EqualTo(3));83 }848586 [Test]87 public void Execute_TabularMeasuresForMeasureGroupInternetSales_SeventeenElements()88 {89 var conn = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());90 var factory = new TabularStructureDiscoveryFactory(conn);91 var cmd = factory.Instantiate(Target.Measures, TargetType.Object,92 new CaptionFilter[] {93 new CaptionFilter(Target.Perspectives,"Internet Operation"),94 new CaptionFilter(Target.MeasureGroups,"Internet Sales")95 });9697 var structs = cmd.Execute();9899 Assert.That(structs.Count(), Is.EqualTo(17));100 }101102103 [Test]104 public void Execute_TabularSchemas_FourElements()105 {106 var conn = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());107 var factory = new TabularStructureDiscoveryFactory(conn);108 var cmd = factory.Instantiate(Target.Perspectives, TargetType.Object,109 new CaptionFilter[] {110 });111112 var structs = cmd.Execute();113114 Assert.That(structs.Count(), Is.EqualTo(4));115 }116117 [Test]118 public void Execute_TabularTablesForInternetOperation_FifteenElements()119 {120 var conn = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());121 var factory = new TabularStructureDiscoveryFactory(conn);122 var cmd = factory.Instantiate(Target.Tables, TargetType.Object,123 new CaptionFilter[] {124 new CaptionFilter(Target.Perspectives,"Internet Operation"),125 });126127 var structs = cmd.Execute();128129 Assert.That(structs.Count(), Is.EqualTo(15));130 }131132 [Test]133 public void Execute_TabularColumnsForInternetSales_TwentySevenElements()134 {135 var conn = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());136 var factory = new TabularStructureDiscoveryFactory(conn);137 var cmd = factory.Instantiate(Target.Columns, TargetType.Object,138 new CaptionFilter[] {139 new CaptionFilter(Target.Perspectives,"Internet Operation"),140 new CaptionFilter(Target.Tables,"Internet Sales"),141 });142143 var structs = cmd.Execute();144145 Assert.That(structs.Count(), Is.EqualTo(27));146 }147148 [Test]149 public void Execute_OnSchemaNamedInternetOperation_ListStructureContainingTenTables()150 {151 var conn = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());152 var factory = new TabularStructureDiscoveryFactory(conn);153 var cmd = factory.Instantiate(Target.Tables, TargetType.Object,154 new CaptionFilter[] {155 new CaptionFilter(Target.Perspectives, "Internet Operation")});156157 var structs = cmd.Execute();158159 Assert.That(structs.Count(), Is.EqualTo(15));160 }161162 [Test]163 public void Execute_OnTableNamedCurrency_ListStructureContainingThreeColumns()164 {165 var conn = new AdomdConnection(ConnectionStringReader.GetAdomdTabular());166 var factory = new TabularStructureDiscoveryFactory(conn);167 var cmd = factory.Instantiate(Target.Columns, TargetType.Object,168 new CaptionFilter[] {169 new CaptionFilter(Target.Perspectives, "Internet Operation"),170 new CaptionFilter(Target.Tables, "Currency")171 });172173 var structs = cmd.Execute();174175 Assert.That(structs.Count(), Is.EqualTo(3));176 }177178 //[Test]179 //[Ignore]180 //public void Execute_TabularDateDimensionLinkedToThreeMeasureGroups_ListStructureContainingThreeElements() ...

Full Screen

Full Screen

StructureDiscoveryFactoryProvider.cs

Source:StructureDiscoveryFactoryProvider.cs Github

copy

Full Screen

...34 protected virtual void Initialize()35 {36 dico.Add(Olap, typeof(OlapStructureDiscoveryFactory));37 dico.Add(Relational, typeof(RelationalStructureDiscoveryFactory));38 dico.Add(Tabular, typeof(TabularStructureDiscoveryFactory));39 }4041 public IStructureDiscoveryFactory Instantiate(string connectionString)42 {43 var sessionFactory = new ClientProvider();44 var connection = sessionFactory.Instantiate(connectionString).CreateNew() as IDbConnection;45 var dbType = MapConnectionTypeToDatabaseType(connection);4647 if (!dico.Keys.Contains(dbType))48 throw new ArgumentException();4950 var factoryType = dico[dbType];51 var ctor = factoryType.GetConstructor(new Type[]{typeof(IDbConnection)});52 var factory = (IStructureDiscoveryFactory)ctor.Invoke(new object[] { connection }); ...

Full Screen

Full Screen

TabularStructureDiscoveryFactory.cs

Source:TabularStructureDiscoveryFactory.cs Github

copy

Full Screen

...12using NBi.Core.Structure.Olap;1314namespace NBi.Core.Structure.Tabular15{16 class TabularStructureDiscoveryFactory : OlapStructureDiscoveryFactory17 {18 public TabularStructureDiscoveryFactory(IDbConnection connection)19 : base(connection)20 {21 }2223 protected override IDiscoveryCommandBuilder InstantiateBuilder(Target target, TargetType type)24 {25 if (type != TargetType.Object)26 throw new ArgumentOutOfRangeException();2728 switch (target)29 {30 case Target.Perspectives:31 return new PerspectiveDiscoveryCommandBuilder();32 case Target.MeasureGroups: ...

Full Screen

Full Screen

TabularStructureDiscoveryFactory

Using AI Code Generation

copy

Full Screen

1using System;2using System.Collections.Generic;3using System.Linq;4using System.Text;5using System.Threading.Tasks;6using NBi.Core.Structure.Tabular;7{8 {9 static void Main(string[] args)10 {11 var factory = new TabularStructureDiscoveryFactory();12 var discovery = factory.Instantiate(new TabularStructureDiscoveryRequest13 {14 ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Integrated Security=True;Application Name=NBi",15 });16 var result = discovery.Execute();17 foreach (var row in result.Rows)18 Console.WriteLine(string.Join(", ", row.Values));19 }20 }21}22using System;23using System.Collections.Generic;24using System.Linq;25using System.Text;26using System.Threading.Tasks;27using NBi.Core.Structure.Tabular;28{29 {30 static void Main(string[] args)31 {32 var factory = new TabularStructureDiscoveryFactory();33 var discovery = factory.Instantiate(new TabularStructureDiscoveryRequest34 {35 ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Integrated Security=True;Application Name=NBi",36 });37 var result = discovery.Execute();38 foreach (var row in result.Rows)39 Console.WriteLine(string.Join(", ", row.Values));40 }41 }42}43using System;44using System.Collections.Generic;45using System.Linq;46using System.Text;47using System.Threading.Tasks;48using NBi.Core.Structure.Tabular;49{50 {51 static void Main(string[] args)52 {53 var factory = new TabularStructureDiscoveryFactory();54 var discovery = factory.Instantiate(new TabularStructureDiscoveryRequest55 {56 ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Integrated Security=True;Application Name=NBi",

Full Screen

Full Screen

TabularStructureDiscoveryFactory

Using AI Code Generation

copy

Full Screen

1using System;2using System.Collections.Generic;3using System.Linq;4using System.Text;5using System.Threading.Tasks;6using NBi.Core.Structure.Tabular;7using NBi.Core.Structure;8using System.Data;9{10 {11 static void Main(string[] args)12 {13 TabularStructureDiscoveryFactory factory = new TabularStructureDiscoveryFactory();14 TabularStructureDiscoveryArgs args1 = new TabularStructureDiscoveryArgs();15 args1.ConnectionString = "Provider=MSOLAP;Data Source=ServerName;Initial Catalog=DatabaseName;Integrated Security=SSPI";16 args1.StructureType = StructureType.Tables;17 TabularStructureDiscoveryRequest request = new TabularStructureDiscoveryRequest(args1);18 TabularStructureDiscoveryCommand command = new TabularStructureDiscoveryCommand(factory, request);19 DataTable dt = new DataTable();20 dt = command.Execute();21 foreach (DataRow row in dt.Rows)22 {23 foreach (DataColumn col in dt.Columns)24 {25 Console.WriteLine(row[col]);26 }27 }28 Console.ReadLine();29 }30 }31}

Full Screen

Full Screen

TabularStructureDiscoveryFactory

Using AI Code Generation

copy

Full Screen

1using NBi.Core.Structure.Tabular;2using NBi.Core.Structure.Tabular.Factory;3using System;4using System.Collections.Generic;5using System.Linq;6using System.Text;7using System.Threading.Tasks;8{9 {10 static void Main(string[] args)11 {12 var factory = new TabularStructureDiscoveryFactory();13 var discoveryRequest = factory.Instantiate("DSN=Test;Catalog=AdventureWorks2012;");14 var discovery = factory.GetDiscoveryCommand(discoveryRequest);15 var result = discovery.Execute();16 Console.WriteLine(result.Tables[0].Rows.Count);17 Console.ReadLine();18 }19 }20}

Full Screen

Full Screen

TabularStructureDiscoveryFactory

Using AI Code Generation

copy

Full Screen

1using NBi.Core.Structure.Tabular;2using NBi.Core.Structure;3using System;4using System.Collections.Generic;5using System.Linq;6using System.Text;7using System.Threading.Tasks;8using System.Data.SqlClient;9{10 {11 static void Main(string[] args)12 {13 var connectionString = "Data Source=.;Initial Catalog=AdventureWorksDW2017;Integrated Security=True";14 var factory = new TabularStructureDiscoveryFactory();15 var discovery = factory.Instantiate(new DiscoveryRequest(connectionString, DiscoveryTarget.Tables));16 var tables = discovery.Execute();17 foreach (var table in tables)18 {19 Console.WriteLine(table);20 }21 Console.ReadLine();22 }23 }24}

Full Screen

Full Screen

TabularStructureDiscoveryFactory

Using AI Code Generation

copy

Full Screen

1using System;2using System.Collections.Generic;3using System.Linq;4using System.Text;5using System.Threading.Tasks;6using NBi.Core.Structure.Tabular;7using NBi.Core.Structure;8using NBi.Core;9using System.Data;10{11 {12 static void Main(string[] args)13 {14 var factory = new TabularStructureDiscoveryFactory();15 var request = factory.Instantiate("MyServer");16 request.ConnectionString = "Data Source=MyServer;Initial Catalog=AdventureWorksDW2012;Integrated Security=True";17 request.Database = "AdventureWorksDW2012";18 request.Tables = new[] { "DimProduct" };19 request.Columns = new[] { "ProductKey" };20 var result = request.Execute();21 result.Display();22 }23 }24}

Full Screen

Full Screen

TabularStructureDiscoveryFactory

Using AI Code Generation

copy

Full Screen

1using System;2using System.Collections.Generic;3using System.Linq;4using System.Text;5using System.Threading.Tasks;6using NBi.Core.Structure.Tabular;7using NBi.Core.Structure;8using NBi.Core;9using NBi.Core.ResultSet;10using NBi.Core.ResultSet.Lookup;11using NBi.Core.ResultSet.Comparer;12using NBi.Core.ResultSet.Resolver;13using NBi.Core.Scalar.Resolver;14using NBi.Core.Query;15using NBi.Core.Query.Resolver;16using NBi.Core.Query.Command;17using NBi.Core.Query.Command.Text;18using NBi.Core.Query.Client;19using NBi.Core.Query.Client.SqlClient;20using NBi.Core.Query.Client.OleDb;21using NBi.Core.Query.Client.Oracle;22using NBi.Core.Query.Client.MySql;23using NBi.Core.Query.Client.Presto;24using NBi.Core.Query.Client.SqLite;25using NBi.Core.Query.Client.PgSql;26using NBi.Core.Query.Client.Redshift;27using NBi.Core.Query.Client.SapHana;28using NBi.Core.Query.Client.SqLite;29using NBi.Core.Query.Client.Access;30using NBi.Core.Query.Client.SqLite;31using NBi.Core.Query.Client.Csv;32using NBi.Core.Query.Client.MySql;33using NBi.Core.Query.Client.Presto;34using NBi.Core.Query.Client.SqLite;35using NBi.Core.Query.Client.PgSql;36using NBi.Core.Query.Client.Redshift;37using NBi.Core.Query.Client.SapHana;38using NBi.Core.Query.Client.SqLite;39using NBi.Core.Query.Client.Access;40using NBi.Core.Query.Client.SqLite;41using NBi.Core.Query.Client.Csv;42using NBi.Core.Query.Client.MySql;43using NBi.Core.Query.Client.Presto;44using NBi.Core.Query.Client.SqLite;45using NBi.Core.Query.Client.PgSql;46using NBi.Core.Query.Client.Redshift;47using NBi.Core.Query.Client.SapHana;48using NBi.Core.Query.Client.SqLite;49using NBi.Core.Query.Client.Access;50using NBi.Core.Query.Client.SqLite;51using NBi.Core.Query.Client.Csv;52using NBi.Core.Query.Client.MySql;

Full Screen

Full Screen

TabularStructureDiscoveryFactory

Using AI Code Generation

copy

Full Screen

1using NBi.Core.Structure.Tabular;2TabularDiscoveryRequest discoveryRequest = TabularStructureDiscoveryFactory.CreateDiscoveryRequest("Server=ServerName;Catalog=CatalogName;Trusted_Connection=True;");3using NBi.Core.Structure.Tabular;4TabularDiscoveryRequest discoveryRequest = TabularStructureDiscoveryFactory.CreateDiscoveryRequest("Provider=SQLNCLI11.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=CatalogName;Data Source=ServerName;");5using NBi.Core.Structure.Tabular;6TabularDiscoveryRequest discoveryRequest = TabularStructureDiscoveryFactory.CreateDiscoveryRequest("Provider=SQLNCLI11.1;Password=Password;Persist Security Info=True;User ID=Username;Initial Catalog=CatalogName;Data Source=ServerName;");7using NBi.Core.Structure.Tabular;8TabularDiscoveryRequest discoveryRequest = TabularStructureDiscoveryFactory.CreateDiscoveryRequest("Provider=SQLNCLI11.1;Password=Password;Persist Security Info=True;User ID=Username;Initial Catalog=CatalogName;Data Source=ServerName;");9using NBi.Core.Structure.Tabular;10TabularDiscoveryRequest discoveryRequest = TabularStructureDiscoveryFactory.CreateDiscoveryRequest("Provider=SQLNCLI11.1;Password=Password;Persist Security Info=True;User ID=Username;Initial Catalog=CatalogName;Data Source=ServerName;");

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run NBi automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used method in TabularStructureDiscoveryFactory

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful