diff --git a/docs/web/adding-data-sources/images/mariadb-data-source-item.jpg b/docs/web/adding-data-sources/images/mariadb-data-source-item.jpg new file mode 100644 index 00000000..7cb98a6f Binary files /dev/null and b/docs/web/adding-data-sources/images/mariadb-data-source-item.jpg differ diff --git a/docs/web/adding-data-sources/images/mariadb-data-source.jpg b/docs/web/adding-data-sources/images/mariadb-data-source.jpg new file mode 100644 index 00000000..fbd55f7f Binary files /dev/null and b/docs/web/adding-data-sources/images/mariadb-data-source.jpg differ diff --git a/docs/web/adding-data-sources/mariadb.md b/docs/web/adding-data-sources/mariadb.md new file mode 100644 index 00000000..e92c2c6a --- /dev/null +++ b/docs/web/adding-data-sources/mariadb.md @@ -0,0 +1,290 @@ +--- +pagination_next: web/authentication +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# MariaDB Data Source + +## Introduction + +MariaDB is a community-developed, commercially supported open-source relational database that is a drop-in replacement for MySQL. This topic explains how to connect to MariaDB data sources in your Reveal application to visualize and analyze your data. + + +## Server Configuration + +### Installation + + + + +**Step 1** - Install the Reveal MariaDB connector package + +For ASP.NET applications, you need to install a separate NuGet package to enable MariaDB support: + +```bash +dotnet add package Reveal.Sdk.Data.MariaDB +``` + +**Step 2** - Register the MariaDB data source in your application: + +```csharp +builder.Services.AddControllers().AddReveal(builder => +{ + builder.DataSources.RegisterMariaDB(); +}); +``` + + + + +For Node.js applications, the MariaDB data source is already included in the main Reveal SDK package. No additional installation is required beyond the standard Reveal SDK setup. + + + + + +### Connection Configuration + + + + +```csharp +// Create a data source provider +public class DataSourceProvider : IRVDataSourceProvider +{ + public async Task ChangeDataSourceItemAsync(IRVUserContext userContext, string dashboardId, RVDataSourceItem dataSourceItem) + { + // Required: Update the underlying data source + await ChangeDataSourceAsync(userContext, dataSourceItem.DataSource); + + if (dataSourceItem is RVMariaDBDataSourceItem mariadbItem) + { + // Configure specific item properties as needed + if (mariadbItem.Id == "mariadb_sales_data") + { + mariadbItem.Table = "orders"; + } + } + + return dataSourceItem; + } + + public Task ChangeDataSourceAsync(IRVUserContext userContext, RVDashboardDataSource dataSource) + { + if (dataSource is RVMariaDBDataSource mariadbDS) + { + // Configure connection properties + mariadbDS.Host = "localhost"; + mariadbDS.Port = 3306; + mariadbDS.Database = "your-db-name"; + } + + return Task.FromResult(dataSource); + } +} +``` + + + + +```javascript +// Create data source providers +const dataSourceItemProvider = async (userContext, dataSourceItem) => { + // Required: Update the underlying data source + await dataSourceProvider(userContext, dataSourceItem.dataSource); + + if (dataSourceItem instanceof reveal.RVMariaDBDataSourceItem) { + // Configure specific item properties if needed + if (dataSourceItem.id === "mariadb_sales_data") { + dataSourceItem.table = "orders"; + } + } + + return dataSourceItem; +} + +const dataSourceProvider = async (userContext, dataSource) => { + if (dataSource instanceof reveal.RVMariaDBDataSource) { + // Configure connection properties + dataSource.host = "localhost"; + dataSource.port = 3306; + dataSource.database = "your-db-name"; + } + + return dataSource; +} +``` + + + + +```typescript +// Create data source providers +const dataSourceItemProvider = async (userContext: IRVUserContext | null, dataSourceItem: RVDataSourceItem) => { + // Required: Update the underlying data source + await dataSourceProvider(userContext, dataSourceItem.dataSource); + + if (dataSourceItem instanceof RVMariaDBDataSourceItem) { + // Configure specific item properties if needed + if (dataSourceItem.id === "mariadb_sales_data") { + dataSourceItem.table = "orders"; + } + } + + return dataSourceItem; +} + +const dataSourceProvider = async (userContext: IRVUserContext | null, dataSource: RVDashboardDataSource) => { + if (dataSource instanceof RVMariaDBDataSource) { + // Configure connection properties + dataSource.host = "localhost"; + dataSource.port = 3306; + dataSource.database = "your-db-name"; + } + + return dataSource; +} +``` + + + + + +:::danger Important +Any changes made to the data source in the `ChangeDataSourceAsync` method are not carried over into the `ChangeDataSourceItemAsync` method. You **must** update the data source properties in both methods. We recommend calling the `ChangeDataSourceAsync` method within the `ChangeDataSourceItemAsync` method passing the data source item's underlying data source as the parameter as shown in the examples above. +::: + +### Authentication + +Authentication for MariaDB is typically handled with username and password. For detailed information on authentication options, see the [Authentication](web/authentication.md) topic. + + + + +```csharp +public class AuthenticationProvider : IRVAuthenticationProvider +{ + public Task ResolveCredentialsAsync(IRVUserContext userContext, RVDashboardDataSource dataSource) + { + IRVDataSourceCredential userCredential = null; + if (dataSource is RVMariaDBDataSource) + { + userCredential = new RVUsernamePasswordDataSourceCredential("your_username", "your_password"); + } + return Task.FromResult(userCredential); + } +} +``` + + + + +```javascript +const authenticationProvider = async (userContext, dataSource) => { + if (dataSource instanceof reveal.RVMariaDBDataSource) { + return new reveal.RVUsernamePasswordDataSourceCredential("your_username", "your_password"); + } + return null; +} +``` + + + + +```ts +const authenticationProvider = async (userContext: IRVUserContext | null, dataSource: RVDashboardDataSource) => { + if (dataSource instanceof RVMariaDBDataSource) { + return new RVUsernamePasswordDataSourceCredential("your_username", "your_password"); + } + return null; +} +``` + + + + + +## Client-Side Implementation + +On the client side, you only need to specify basic properties like ID, title, and subtitle for the data source. The actual connection configuration happens on the server. + +### Creating Data Sources + +**Step 1** - Add an event handler for the `RevealView.onDataSourcesRequested` event. + +```js +const revealView = new $.ig.RevealView("#revealView"); +revealView.onDataSourcesRequested = (callback) => { + // Add data source here + callback(new $.ig.RevealDataSources([], [], false)); +}; +``` + +**Step 2** - In the `RevealView.onDataSourcesRequested` event handler, create a new instance of the `RVMariaDBDataSource` object. Set the `title` and `subtitle` properties. After you have created the `RVMariaDBDataSource` object, add it to the data sources collection. + +```js +revealView.onDataSourcesRequested = (callback) => { + const mariadbDS = new $.ig.RVMariaDBDataSource(); + mariadbDS.title = "MariaDB"; + mariadbDS.subtitle = "Data Source"; + + callback(new $.ig.RevealDataSources([mariadbDS], [], false)); +}; +``` + +When the application runs, create a new Visualization and you will see the newly created MariaDB data source listed in the "Select a Data Source" dialog. + +![](images/mariadb-data-source.jpg) + +### Creating Data Source Items + +Data source items represent specific tables or datasets within your MariaDB data source that users can select for visualization. On the client side, you only need to specify ID, title, and subtitle. + +```js +revealView.onDataSourcesRequested = (callback) => { + // Create the data source + const mariadbDS = new $.ig.RVMariaDBDataSource(); + mariadbDS.title = "My MariaDB Datasource"; + mariadbDS.subtitle = "MariaDB"; + + // Create a data source item + const mariadbDSI = new $.ig.RVMariaDBDataSourceItem(mariadbDS); + mariadbDSI.id = "mariadb_sales_data"; + mariadbDSI.title = "My MariaDB Datasource Item"; + mariadbDSI.subtitle = "MariaDB"; + + callback(new $.ig.RevealDataSources([mariadbDS], [mariadbDSI], true)); +}; +``` + +When the application runs, create a new Visualization and you will see the newly created MariaDB data source item listed in the "Select a Data Source" dialog. + +![](images/mariadb-data-source-item.jpg) + +:::warning Error Messages +MariaDB is MySQL-compatible, and it is common for drivers and error messages to reference MySQL even when connected to MariaDB. +::: + +## Additional Resources + +- [MariaDB Documentation](https://mariadb.com/kb/en/documentation/) +- [Sample Source Code on GitHub](https://github.com/RevealBi/sdk-samples-javascript/tree/main/DataSources/MariaDB) + +## API Reference + + + + +* [RVMariaDBDataSource](https://help.revealbi.io/api/aspnet/latest/Reveal.Sdk.Data.MariaDB.RVMariaDBDataSource.html) - Represents a MariaDB data source +* [RVMariaDBDataSourceItem](https://help.revealbi.io/api/aspnet/latest/Reveal.Sdk.Data.MariaDB.RVMariaDBDataSourceItem.html) - Represents a MariaDB data source item + + + + +* [RVMariaDBDataSource](https://help.revealbi.io/api/javascript/latest/classes/rvmariadbdatasource.html) - Represents a MariaDB data source +* [RVMariaDBDataSourceItem](https://help.revealbi.io/api/javascript/latest/classes/rvmariadbdatasourceitem.html) - Represents a MariaDB data source item + + + diff --git a/docs/web/authentication.md b/docs/web/authentication.md index 28d46908..5c5ee5ab 100644 --- a/docs/web/authentication.md +++ b/docs/web/authentication.md @@ -236,6 +236,7 @@ The `RVUsernamePasswordDataSourceCredential` is supported for the following data - Microsoft Dynamics CRM (On-Premises and Online) - Microsoft SQL Server - MySQL +- MariaDB - OData Services - Oracle - PostgreSQL diff --git a/docs/web/custom-queries.md b/docs/web/custom-queries.md index ce6656bf..2bb66c10 100644 --- a/docs/web/custom-queries.md +++ b/docs/web/custom-queries.md @@ -16,6 +16,7 @@ Custom Queries are supported for the following data sources: - Microsoft Azure Synapse Analytics - [Microsoft SQL Server](adding-data-sources/ms-sql-server.md) - [MySQL](adding-data-sources/mysql.md) +- [MariaDB](adding-data-sources/mariadb.md) - [Oracle](adding-data-sources/oracle.md) - [PostgreSQL](adding-data-sources/postgres.md) - [Snowflake](adding-data-sources/snowflake.md) diff --git a/docs/web/known-issues.md b/docs/web/known-issues.md index 34fd8fcd..aff69817 100644 --- a/docs/web/known-issues.md +++ b/docs/web/known-issues.md @@ -61,7 +61,7 @@ body > pre.rv-multiline-editor { ## Grid Row Paging -- Paging is supported in the following providers: SQL Server, MySQL, BigQuery, MongoDB, PostgreSQL, Snowflake, SyBase, Redshift, Databricks, Cube.dev, Athena, and Oracle. +- Paging is supported in the following providers: SQL Server, MySQL, MariaDB, BigQuery, MongoDB, PostgreSQL, Snowflake, SyBase, Redshift, Databricks, Cube.dev, Athena, and Oracle. - Providers that support stored procedures will have grid paging disabled when a stored procedure is selected as these can't be queried like tables to return a range of rows. - Paging is not available when processing data on server is false - When sorting a grid with paging enabled in regular view mode the column sorts will be applied from left to right. This means if you sort the last column and then sort the first column, they won't be applied in that order, but rather from left to right. diff --git a/i18n/en/docusaurus-plugin-content-docs/current.json b/i18n/en/docusaurus-plugin-content-docs/current.json index 814e35a9..6ef77c7a 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current.json +++ b/i18n/en/docusaurus-plugin-content-docs/current.json @@ -243,6 +243,10 @@ "message": "MySQL", "description": "The label for the doc item 'MySQL' in sidebar 'webSidebar', linking to the doc web/adding-data-sources/mysql" }, + "sidebar.webSidebar.doc.MariaDB": { + "message": "MariaDB", + "description": "The label for the doc item 'MariaDB' in sidebar 'webSidebar', linking to the doc web/adding-data-sources/mariadb" + }, "sidebar.webSidebar.doc.Custom Queries": { "message": "Custom Queries", "description": "The label for the doc item 'Custom Queries' in sidebar 'webSidebar', linking to the doc web/custom-queries" diff --git a/i18n/ja/code.json b/i18n/ja/code.json index f7a82d20..0fc5f09d 100644 --- a/i18n/ja/code.json +++ b/i18n/ja/code.json @@ -1,11 +1,9 @@ { "homepage.hero.title": { - "message": "Reveal は初めてですか? 私たちにお任せください!", - "description": "The title of the hero section on the homepage" + "message": "Reveal は初めてですか? 私たちにお任せください!" }, "homepage.hero.subtitle": { - "message": "統合、データ可視化のデザイン、ダッシュボードの作成などに関するヘルプを入手してください。", - "description": "The subtitle of the hero section on the homepage" + "message": "統合、データ可視化のデザイン、ダッシュボードの作成などに関するヘルプを入手してください。" }, "theme.ErrorPageContent.title": { "message": "エラーが発生しました", @@ -642,5 +640,98 @@ "theme.SearchModal.footer.backToSearchText": { "message": "検索に戻る", "description": "The back to search text for footer" + }, + "homepage.hero.cta.getStarted": { + "message": "Get Started" + }, + "homepage.hero.cta.exploreAi": { + "message": "Explore AI SDK" + }, + "homepage.ai.badge": { + "message": "NEW" + }, + "homepage.ai.title": { + "message": "AI-Powered Analytics" + }, + "homepage.ai.description": { + "message": "Generate dashboards from natural language, get AI insights from your data, and build conversational analytics — all with a few lines of code." + }, + "homepage.ai.capability1": { + "message": "Natural Language Dashboards" + }, + "homepage.ai.capability2": { + "message": "AI Insights & Forecasts" + }, + "homepage.ai.capability3": { + "message": "Conversational Chat" + }, + "homepage.ai.cta": { + "message": "Start building with AI" + }, + "homepage.frameworks.html": { + "message": "HTML / JavaScript" + }, + "homepage.frameworks.react": { + "message": "React" + }, + "homepage.frameworks.angular": { + "message": "Angular" + }, + "homepage.frameworks.aspnet": { + "message": "ASP.NET" + }, + "homepage.frameworks.node": { + "message": "Node.js" + }, + "homepage.frameworks.springboot": { + "message": "Spring Boot" + }, + "homepage.frameworks.title": { + "message": "Choose Your Stack" + }, + "homepage.frameworks.subtitle": { + "message": "Step-by-step getting started guides for your preferred framework." + }, + "homepage.sdk.web.link.getStarted": { + "message": "Getting Started" + }, + "homepage.sdk.web.link.dataSources": { + "message": "Data Sources" + }, + "homepage.sdk.web.link.apiRef": { + "message": "API Reference" + }, + "homepage.sdk.web.link.playground": { + "message": "Developer Playground" + }, + "homepage.sdk.ai.link.overview": { + "message": "Overview" + }, + "homepage.sdk.ai.link.getStarted": { + "message": "Getting Started" + }, + "homepage.sdk.ai.link.insights": { + "message": "Insights API" + }, + "homepage.sdk.ai.link.chat": { + "message": "Chat API" + }, + "homepage.sdk.web.title": { + "message": "Web SDK" + }, + "homepage.sdk.web.subtitle": { + "message": "Embedded Analytics" + }, + "homepage.sdk.web.description": { + "message": "Embed interactive dashboards and data visualizations into any web application. Supports 30+ data sources with full customization." + }, + "homepage.sdk.ai.title": { + "message": "AI SDK" + }, + "homepage.sdk.ai.subtitle": { + "message": "Intelligent Analytics" + }, + "homepage.sdk.ai.description": { + "message": "Add AI-powered insights, natural language dashboards, and conversational analytics using LLMs like OpenAI, Anthropic, and Google." } } diff --git a/i18n/ja/docusaurus-plugin-content-docs/current.json b/i18n/ja/docusaurus-plugin-content-docs/current.json index 01a2447b..13265678 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current.json +++ b/i18n/ja/docusaurus-plugin-content-docs/current.json @@ -243,6 +243,10 @@ "message": "MySQL", "description": "The label for the doc item 'MySQL' in sidebar 'webSidebar', linking to the doc web/adding-data-sources/mysql" }, + "sidebar.webSidebar.doc.MariaDB": { + "message": "MariaDB", + "description": "The label for the doc item 'MariaDB' in sidebar 'webSidebar', linking to the doc web/adding-data-sources/mariadb" + }, "sidebar.webSidebar.doc.Custom Queries": { "message": "カスタム クエリ", "description": "The label for the doc item 'Custom Queries' in sidebar 'webSidebar', linking to the doc web/custom-queries" diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/web/adding-data-sources/images/mariadb-data-source-item.jpg b/i18n/ja/docusaurus-plugin-content-docs/current/web/adding-data-sources/images/mariadb-data-source-item.jpg new file mode 100644 index 00000000..7cb98a6f Binary files /dev/null and b/i18n/ja/docusaurus-plugin-content-docs/current/web/adding-data-sources/images/mariadb-data-source-item.jpg differ diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/web/adding-data-sources/images/mariadb-data-source.jpg b/i18n/ja/docusaurus-plugin-content-docs/current/web/adding-data-sources/images/mariadb-data-source.jpg new file mode 100644 index 00000000..fbd55f7f Binary files /dev/null and b/i18n/ja/docusaurus-plugin-content-docs/current/web/adding-data-sources/images/mariadb-data-source.jpg differ diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/web/adding-data-sources/mariadb.md b/i18n/ja/docusaurus-plugin-content-docs/current/web/adding-data-sources/mariadb.md new file mode 100644 index 00000000..e92c2c6a --- /dev/null +++ b/i18n/ja/docusaurus-plugin-content-docs/current/web/adding-data-sources/mariadb.md @@ -0,0 +1,290 @@ +--- +pagination_next: web/authentication +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# MariaDB Data Source + +## Introduction + +MariaDB is a community-developed, commercially supported open-source relational database that is a drop-in replacement for MySQL. This topic explains how to connect to MariaDB data sources in your Reveal application to visualize and analyze your data. + + +## Server Configuration + +### Installation + + + + +**Step 1** - Install the Reveal MariaDB connector package + +For ASP.NET applications, you need to install a separate NuGet package to enable MariaDB support: + +```bash +dotnet add package Reveal.Sdk.Data.MariaDB +``` + +**Step 2** - Register the MariaDB data source in your application: + +```csharp +builder.Services.AddControllers().AddReveal(builder => +{ + builder.DataSources.RegisterMariaDB(); +}); +``` + + + + +For Node.js applications, the MariaDB data source is already included in the main Reveal SDK package. No additional installation is required beyond the standard Reveal SDK setup. + + + + + +### Connection Configuration + + + + +```csharp +// Create a data source provider +public class DataSourceProvider : IRVDataSourceProvider +{ + public async Task ChangeDataSourceItemAsync(IRVUserContext userContext, string dashboardId, RVDataSourceItem dataSourceItem) + { + // Required: Update the underlying data source + await ChangeDataSourceAsync(userContext, dataSourceItem.DataSource); + + if (dataSourceItem is RVMariaDBDataSourceItem mariadbItem) + { + // Configure specific item properties as needed + if (mariadbItem.Id == "mariadb_sales_data") + { + mariadbItem.Table = "orders"; + } + } + + return dataSourceItem; + } + + public Task ChangeDataSourceAsync(IRVUserContext userContext, RVDashboardDataSource dataSource) + { + if (dataSource is RVMariaDBDataSource mariadbDS) + { + // Configure connection properties + mariadbDS.Host = "localhost"; + mariadbDS.Port = 3306; + mariadbDS.Database = "your-db-name"; + } + + return Task.FromResult(dataSource); + } +} +``` + + + + +```javascript +// Create data source providers +const dataSourceItemProvider = async (userContext, dataSourceItem) => { + // Required: Update the underlying data source + await dataSourceProvider(userContext, dataSourceItem.dataSource); + + if (dataSourceItem instanceof reveal.RVMariaDBDataSourceItem) { + // Configure specific item properties if needed + if (dataSourceItem.id === "mariadb_sales_data") { + dataSourceItem.table = "orders"; + } + } + + return dataSourceItem; +} + +const dataSourceProvider = async (userContext, dataSource) => { + if (dataSource instanceof reveal.RVMariaDBDataSource) { + // Configure connection properties + dataSource.host = "localhost"; + dataSource.port = 3306; + dataSource.database = "your-db-name"; + } + + return dataSource; +} +``` + + + + +```typescript +// Create data source providers +const dataSourceItemProvider = async (userContext: IRVUserContext | null, dataSourceItem: RVDataSourceItem) => { + // Required: Update the underlying data source + await dataSourceProvider(userContext, dataSourceItem.dataSource); + + if (dataSourceItem instanceof RVMariaDBDataSourceItem) { + // Configure specific item properties if needed + if (dataSourceItem.id === "mariadb_sales_data") { + dataSourceItem.table = "orders"; + } + } + + return dataSourceItem; +} + +const dataSourceProvider = async (userContext: IRVUserContext | null, dataSource: RVDashboardDataSource) => { + if (dataSource instanceof RVMariaDBDataSource) { + // Configure connection properties + dataSource.host = "localhost"; + dataSource.port = 3306; + dataSource.database = "your-db-name"; + } + + return dataSource; +} +``` + + + + + +:::danger Important +Any changes made to the data source in the `ChangeDataSourceAsync` method are not carried over into the `ChangeDataSourceItemAsync` method. You **must** update the data source properties in both methods. We recommend calling the `ChangeDataSourceAsync` method within the `ChangeDataSourceItemAsync` method passing the data source item's underlying data source as the parameter as shown in the examples above. +::: + +### Authentication + +Authentication for MariaDB is typically handled with username and password. For detailed information on authentication options, see the [Authentication](web/authentication.md) topic. + + + + +```csharp +public class AuthenticationProvider : IRVAuthenticationProvider +{ + public Task ResolveCredentialsAsync(IRVUserContext userContext, RVDashboardDataSource dataSource) + { + IRVDataSourceCredential userCredential = null; + if (dataSource is RVMariaDBDataSource) + { + userCredential = new RVUsernamePasswordDataSourceCredential("your_username", "your_password"); + } + return Task.FromResult(userCredential); + } +} +``` + + + + +```javascript +const authenticationProvider = async (userContext, dataSource) => { + if (dataSource instanceof reveal.RVMariaDBDataSource) { + return new reveal.RVUsernamePasswordDataSourceCredential("your_username", "your_password"); + } + return null; +} +``` + + + + +```ts +const authenticationProvider = async (userContext: IRVUserContext | null, dataSource: RVDashboardDataSource) => { + if (dataSource instanceof RVMariaDBDataSource) { + return new RVUsernamePasswordDataSourceCredential("your_username", "your_password"); + } + return null; +} +``` + + + + + +## Client-Side Implementation + +On the client side, you only need to specify basic properties like ID, title, and subtitle for the data source. The actual connection configuration happens on the server. + +### Creating Data Sources + +**Step 1** - Add an event handler for the `RevealView.onDataSourcesRequested` event. + +```js +const revealView = new $.ig.RevealView("#revealView"); +revealView.onDataSourcesRequested = (callback) => { + // Add data source here + callback(new $.ig.RevealDataSources([], [], false)); +}; +``` + +**Step 2** - In the `RevealView.onDataSourcesRequested` event handler, create a new instance of the `RVMariaDBDataSource` object. Set the `title` and `subtitle` properties. After you have created the `RVMariaDBDataSource` object, add it to the data sources collection. + +```js +revealView.onDataSourcesRequested = (callback) => { + const mariadbDS = new $.ig.RVMariaDBDataSource(); + mariadbDS.title = "MariaDB"; + mariadbDS.subtitle = "Data Source"; + + callback(new $.ig.RevealDataSources([mariadbDS], [], false)); +}; +``` + +When the application runs, create a new Visualization and you will see the newly created MariaDB data source listed in the "Select a Data Source" dialog. + +![](images/mariadb-data-source.jpg) + +### Creating Data Source Items + +Data source items represent specific tables or datasets within your MariaDB data source that users can select for visualization. On the client side, you only need to specify ID, title, and subtitle. + +```js +revealView.onDataSourcesRequested = (callback) => { + // Create the data source + const mariadbDS = new $.ig.RVMariaDBDataSource(); + mariadbDS.title = "My MariaDB Datasource"; + mariadbDS.subtitle = "MariaDB"; + + // Create a data source item + const mariadbDSI = new $.ig.RVMariaDBDataSourceItem(mariadbDS); + mariadbDSI.id = "mariadb_sales_data"; + mariadbDSI.title = "My MariaDB Datasource Item"; + mariadbDSI.subtitle = "MariaDB"; + + callback(new $.ig.RevealDataSources([mariadbDS], [mariadbDSI], true)); +}; +``` + +When the application runs, create a new Visualization and you will see the newly created MariaDB data source item listed in the "Select a Data Source" dialog. + +![](images/mariadb-data-source-item.jpg) + +:::warning Error Messages +MariaDB is MySQL-compatible, and it is common for drivers and error messages to reference MySQL even when connected to MariaDB. +::: + +## Additional Resources + +- [MariaDB Documentation](https://mariadb.com/kb/en/documentation/) +- [Sample Source Code on GitHub](https://github.com/RevealBi/sdk-samples-javascript/tree/main/DataSources/MariaDB) + +## API Reference + + + + +* [RVMariaDBDataSource](https://help.revealbi.io/api/aspnet/latest/Reveal.Sdk.Data.MariaDB.RVMariaDBDataSource.html) - Represents a MariaDB data source +* [RVMariaDBDataSourceItem](https://help.revealbi.io/api/aspnet/latest/Reveal.Sdk.Data.MariaDB.RVMariaDBDataSourceItem.html) - Represents a MariaDB data source item + + + + +* [RVMariaDBDataSource](https://help.revealbi.io/api/javascript/latest/classes/rvmariadbdatasource.html) - Represents a MariaDB data source +* [RVMariaDBDataSourceItem](https://help.revealbi.io/api/javascript/latest/classes/rvmariadbdatasourceitem.html) - Represents a MariaDB data source item + + + diff --git a/sidebars.ts b/sidebars.ts index 63e3e6b6..e6874abc 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -90,6 +90,7 @@ const sidebars: SidebarsConfig = { { type: "doc", label: "Google Sheets", id: "web/adding-data-sources/google-sheets" }, { type: "doc", label: "In Memory Data", id: "web/adding-data-sources/in-memory-data" }, { type: "doc", label: "JSON", id: "web/adding-data-sources/json" }, + { type: "doc", label: "MariaDB", id: "web/adding-data-sources/mariadb" }, { type: "doc", label: "MongoDB", id: "web/adding-data-sources/mongodb" }, { type: "doc", label: "MS SQL Server", id: "web/adding-data-sources/ms-sql-server" }, { type: "doc", label: "MySQL", id: "web/adding-data-sources/mysql" }, diff --git a/src/components/DataSourcesTable/index.tsx b/src/components/DataSourcesTable/index.tsx index 8765c632..325143a6 100644 --- a/src/components/DataSourcesTable/index.tsx +++ b/src/components/DataSourcesTable/index.tsx @@ -25,6 +25,7 @@ const DataSources: DataSourceItem[] = [ { title: "In-Memory Data", topic: "../adding-data-sources/in-memory-data" }, { title: "JSON", topic: "../adding-data-sources/json" }, // { title: "Marketo", topic: "", nuget: "Reveal.Sdk.Data.Marketo" }, do not advertise + { title: "MariaDB", topic: "../adding-data-sources/mariadb", nuget: "Reveal.Sdk.Data.MariaDB" }, { title: "Microsoft Analysis Services", topic: "", nuget: "Reveal.Sdk.Data.Microsoft.AnalysisServices" }, { title: "Microsoft Azure Analysis Services", topic: "", nuget: "Reveal.Sdk.Data.Microsoft.AnalysisServices" }, { title: "Microsoft Azure SQL Database", topic: "", nuget: "Reveal.Sdk.Data.Microsoft.SqlServer" },