Direct export
Members whose role includesbb.sql.export click Export on a query result. Like query access, Bytebase checks bb.sql.export against the databases the query reads, and against schemas and tables when the role is scoped to them. See Export data for formats, row limits, and query re-execution.
SQL Editor User and SQL Editor Read User do not include bb.sql.export. To let someone query and export without running DDL or DML, grant SQL Editor Exporter, or add bb.sql.export to a custom role.
Just-in-time data export
To put exports behind approval, assign roles withoutbb.sql.export, such as SQL Editor Read User. SQL Editor hides Export on their results. When Allow access grants is on for the project, they can request an access grant instead:
-
Click Request export on the query result. The Request access grant drawer opens with Export pre-checked. You can also check Export in any access grant request.

-
The approver sees on the request issue that the grant allows exporting the result.

- Once approved, run the approved statement and export its result before the grant expires.
export: Yes to show only export grants, and re-request expired grants from there.

Export destinations
By default, Export downloads the result to your machine. When the project has a SharePoint folder, you can upload straight to SharePoint instead. See Export to SharePoint.Turn off downloads
A Workspace Admin or Workspace DBA can turn off local downloads to keep SQL Editor exports in company storage:- Go to Settings > General.
-
In the SQL Editor section, turn off Allow downloading exports, and click Update.


