MariaDB.Contents is a Power Query M function that returns a navigation table, allowing the listing of databases on the specified MariaDB server or tables and views from a specified MariaDB database on the server, depending on whether a database name is provided.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
MariaDB.Contents(
MariaDB Data Source as text,
optional database as nullable text,
optional CreateNavigationProperties as nullable logical,
) as table
Description
Returns a navigation table.
- Without a
databasename
, returns a table of databases on the specified MariaDB serverservername
. - With a
databasename
, returns or a table of tables and views from the specified MariaDB databasedatabasename
on the serverservername
.
databasename
can be provided in either of the input parameters:
- In the MariaDB Data Source string after a semicolon. This approach allows using database-specific credentials. See details below.
- As the optional Database parameter. This approach allows using same credentials for all databases on the specified server
servername
.
The MariaDB Data Source string uniquely identifies a data source in Power BI and allows using different credentials for each data source. Credentials for a data source are configured in Power BI Data source settings screen. MariaDB Power BI connector supports Basic authentication per server or per database. E.g. it is possible to connect with different credentials to databases residing on the same MariaDB server.
CreateNavigationProperties
is a parameter for Odbc.DataSource.
A logical value that sets whether to generate navigation properties on the returned tables. Navigation properties are based on foreign key relationships reported by the driver. These properties show up as “virtual” columns that can be expanded in the query editor, creating the appropriate join.
If calculating foreign key dependencies is an expensive operation for your driver, you may want to set this value to false.
Default: TRUE
Examples
Returns a table of MariaDB tables and views functions from the MariaDB database databasename
on server servername
.
MariaDB.Contents( "servername", "databasename" )
/* Output:
#table( {"Name", "Description", "Data", "Kind"}, {
{"airlines", null, #table( ... ), "Table"},
{"airports", null, #table( ... ), "Table"},
{"flights", null, #table( ... ), "Table"}
} )
*/
Returns a table of databases on the specified MariaDB server using the default port 3306 to connect. Equivalent to MariaDB.Contents( "servername:3306" )
.
MariaDB.Contents( "servername" )
/* Output:
#table( {"Name", "Description", "Data", "Kind"}, {
{"mysql", null, #table( ... ), "Database"},
{"flights", null, #table( ... ), "Database"}
} )
*/
Returns a table of databases on the specified MariaDB server servername
using the provided port number portnumber
to connect.
MariaDB.Contents( "servername:portnumber" )
/* Output:
#table( {"Name", "Description", "Data", "Kind"}, {
{"mysql", null, #table( ... ), "Database"},
{"flights", null, #table( ... ), "Database"}
} )
*/
Returns a table of MariaDB tables and views from the MariaDB database databasename
on server servername
.
The result is similar to MariaDB.Contents( "servername", "databasename" )
, but the string servername;databasename
identifies a unique data source and allows using dedicated credentials for the database databasename
.
MariaDB.Contents( "servername;databasename" )
/* Output:
#table( {"Name", "Description", "Data", "Kind"}, {
{"airlines", null, #table( ... ), "Table"},
{"airports", null, #table( ... ), "Table"},
{"flights", null, #table( ... ), "Table"}
} )
*/
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy