Use the catalog command group to browse and manage workspace catalogs, databases, tables, volumes, files, data assets, and NL2SQL requests, and use data-share to manage cross-workspace data publications and subscriptions. Complete Configuration and Authentication before running these commands.
Browse the resource tree and manage catalogs, databases, and tables¶
Inspect the workspace resource tree and list catalogs first to obtain numeric catalog, database, and table IDs before mutating resources:
Export table data to a local file, truncate rows, or drop a table.
To inspect the JSON schema payload accepted by create-table offline, run moi-clischemacatalogcreate-table.
Warning
catalogtruncate-table, delete-table, delete-database, and catalogdelete immediately clear or drop target data objects. Always verify the full resource path, numeric ID, and workspace first with catalogtable-full-path--table-id<id> or catalogdatabase-info--database-id<id>.
Placing a local file into a database volume is a two-step workflow: upload the file bytes with catalogupload to obtain a file_id, then attach that file_id to the target volume with catalogcreate-file:
# 1) Create a volume inside a database (skip if using an existing volume)
moi-cli-authpat-ocatalogcreate-volume\--database-id"$DATABASE_ID"\--name"raw_reports"# 2) Stage the local file and extract the returned file_idFILE_ID="$(moi-cli-authpat-ocatalogupload--file-path./sales_2026.csv\|jq-er'.file_id // .id')"# 3) Attach the uploaded file reference to the target volume and list files
moi-cli-authpat-ocatalogcreate-file\--volume-id"$VOLUME_ID"\--file-ids"$FILE_ID"
moi-cli-authpat-ocatalogfiles--volume-id"$VOLUME_ID"# 4) Download the file from the volume to a local path
moi-cli-authpatcatalogdownload-file\--volume-id"$VOLUME_ID"\--file-id"$FILE_ID"\--output./downloaded_sales_2026.csv
Submit a natural-language-to-SQL request scoped to a database.
Cross-workspace data publishing and subscriptions (data-share)¶
data-share establishes read-only sharing relationships across workspaces without copying or deleting underlying source tables.
Publisher: verify source tables and target workspaces, then create a publication¶
# 1) Inspect publishable source tables, check name availability, and verify target workspace names
moi-cli-authpat-odata-sharesource-tables--source-database-id"$SOURCE_DB_ID"
moi-cli-authpat-odata-sharecheck-publish-name--name"finance_orders_share"
moi-cli-authpat-odata-shareresolve-workspace-names--ids"$TARGET_WORKSPACE_ID"# 2) Create the publication and confirm its summary
moi-cli-authpat-odata-sharecreate-publish\--name"finance_orders_share"\--source-database-id"$SOURCE_DB_ID"\--selected\--table-ids"$TABLE_ID_1,$TABLE_ID_2"\--target-workspace-ids"$TARGET_WORKSPACE_ID"\--remark"Shared order tables for BI workspace"
moi-cli-authpat-odata-sharepublishes
moi-cli-authpat-odata-sharepublish-summary
Subscriber: list available shares and mount a local subscription database¶
Switch to the receiving workspace to list available publications and subscribe:
catalogupload and catalogupload-private enforce a default 64MiB per-command memory read cap; pass --max-upload-bytes<bytes> when uploading larger files (see Command Reference).
Private file uploads (upload-private, upload-private-file, upload-private-bytes) remain governed by workspace role permissions and volume access boundaries.
Running data-sharedelete-publish or data-shareunsubscribe revokes cross-workspace table visibility immediately; confirm that downstream dashboards, SQL queries, and workflows no longer depend on the shared database beforehand.