Publish data from MariaDB
Ingest query results from MariaDB
MariaDB speaks the MySQL wire protocol, so the MySQL connector reads it: the connection type
is MySQLSrcConn and the source class is MySQLSrc. Each entry in queries produces one
output table.
There are several ways to pass secrets into Tabsdata. See Secrets Management for more info if you are planning to have an LLM register secrets into Tabsdata's credential store.
Listed 1 directory, called tabsdata 3 times (ctrl+o to expand)
MariaDB is read through the MySQL connector, and its guide and connection template are loaded. Four values left, then I generate and register. Reply with them one per line, or point me at a file that has them:
- collection name
- connection URI
- user and password
- tables to read
Read 1 file, called tabsdata 2 times (ctrl+o to expand)
Password found. Reading back what is not secret: uri mysql://maria.internal:3306/sales, collection sales_src, tables orders and customers.
Called tabsdata 4 times (ctrl+o to expand)
Connection written to , with the MySQL connector type and the MariaDB URI, and collection sales_src created from it in group sources. Connection check passed.
Called tabsdata 2 times (ctrl+o to expand)
The publisher, registered in sales_src:
@publisher(
source=MySQLSrc(
queries=[
"SELECT * FROM orders",
"SELECT * FROM customers",
],
),
output_tables=["orders", "customers"],
)
def read_sales(
orders: TableFramesSpec,
customers: TableFramesSpec,
) -> tuple[TableFrameSpec, TableFrameSpec]:
return (orders[0], customers[0])
Called tabsdata 6 times (ctrl+o to expand)
Execution committed, 0 failures.
Two tables are live in sales_src, one per query, in the order the queries were listed:
┌───────────┬─────────────────────────┬────────┬─────────┐ │ table │ from │ rows │ columns │ ├───────────┼─────────────────────────┼────────┼─────────┤ │ orders │ SELECT * FROM orders │ 48,112 │ 9 │ ├───────────┼─────────────────────────┼────────┼─────────┤ │ customers │ SELECT * FROM customers │ 3,204 │ 7 │ └───────────┴─────────────────────────┴────────┴─────────┘
The mysql:// scheme is correct for MariaDB. Nothing in the connection or the publisher
names MariaDB specifically, so a server migrated between the two needs no change here.