-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from RevealBi/data-source/azure-synapse-analy…
…tics Data source/azure synapse analytics
- Loading branch information
Showing
7 changed files
with
104 additions
and
16 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
e2e/Sandbox/DashboardCreators/MSAzureSynapseAnalyticsDashboard.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using Reveal.Sdk.Dom; | ||
using Reveal.Sdk.Dom.Data; | ||
using Reveal.Sdk.Dom.Visualizations; | ||
using System.Collections.Generic; | ||
|
||
namespace Sandbox.DashboardFactories | ||
{ | ||
internal class MSAzureSynapseAnalyticsDashboard : IDashboardCreator | ||
{ | ||
public string Name => "MS Azure Synapse Analytics Data Source"; | ||
|
||
public RdashDocument CreateDashboard() | ||
{ | ||
var document = new RdashDocument("Azure Synapse Analytics Dashboard"); | ||
|
||
var dataSource = new MicrosoftAzureSynapseAnalyticsDataSource() | ||
{ | ||
Id = "azureSynapseDSId", | ||
Title = "Synapse data source title", | ||
Host = "revealdb01.infragistics.local", | ||
Database = "Northwind", | ||
Port = 1433, | ||
TrustServerCertificate = false | ||
}; | ||
var dataSourceItem = new MicrosoftAzureSynapseAnalyticsDataSourceItem("MS Azure Synapse DS Item", dataSource) | ||
{ | ||
Id = "azureSynapseDSItemId", | ||
Title = "Synapse DS item title", | ||
Database = dataSource.Database, | ||
Table = "Categories", | ||
Fields = new List<IField> | ||
{ | ||
new NumberField("CategoryID"), | ||
new TextField("CategoryName"), | ||
new TextField("Description") | ||
} | ||
}; | ||
|
||
document.Visualizations.Add(new GridVisualization("List Categories", dataSourceItem) | ||
.SetColumns("CategoryID", "CategoryName", "Description")); | ||
|
||
return document; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 1 addition & 6 deletions
7
src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftAzureSynapseAnalyticsDataSourceFixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 14 additions & 1 deletion
15
src/Reveal.Sdk.Dom/Data/DataSourceItems/MicrosoftAzureSynapseAnalyticsDataSourceItem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
namespace Reveal.Sdk.Dom.Data | ||
{ | ||
internal class MicrosoftAzureSynapseAnalyticsDataSourceItem : MicrosoftSqlServerDataSourceItem | ||
public class MicrosoftAzureSynapseAnalyticsDataSourceItem : MicrosoftSqlServerDataSourceItem | ||
{ | ||
public MicrosoftAzureSynapseAnalyticsDataSourceItem(string title) : | ||
base(title, new MicrosoftAzureSynapseAnalyticsDataSource()) | ||
{ } | ||
|
||
public MicrosoftAzureSynapseAnalyticsDataSourceItem(string title, DataSource dataSource) : | ||
base(title, dataSource) | ||
{ } | ||
|
||
public MicrosoftAzureSynapseAnalyticsDataSourceItem(string title, MicrosoftAzureSynapseAnalyticsDataSource dataSource) | ||
: base(title, dataSource) | ||
{ } | ||
|
||
protected override DataSource CreateDataSourceInstance(DataSource dataSource) | ||
{ | ||
return Create<MicrosoftAzureSynapseAnalyticsDataSource>(dataSource); | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/Reveal.Sdk.Dom/Data/DataSources/MicrosoftAzureSynapseAnalyticsDataSource.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters