Database Export Stage
The Database Export stage writes the prepared data in the flow directly to a table in an external database — with no intermediate file. Use it when the destination is another system or a corporate repository: data warehouse, ERP staging, BI database. Database Export is in the Analytics and Export category in the toolbar and is available in Turbo AI processes.
The main market databases are supported — SQL Server, Oracle, PostgreSQL, MySQL, SAP HANA, Databricks, and Google BigQuery, among others.
Before you begin
Register the destination database credential in Settings > Credentials (category Database) and validate it with Test connection.
Permissions: the credential user needs write permission on the destination table — and execute permission if you use SQL commands before or after the load.
Database without internet access: the connection can be made via site-to-site VPN/VPC. Contact Dattos support to assess this setup.
How to configure
Connect to the stage the source whose data should be written from, and configure:
Name: identifies the stage in the flow.
Database credential: credential registered with access to the destination database; the + New database credential shortcut creates a new one without leaving the stage.
Destination table: table that receives the data, in
schema.tableformat (letters, numbers, and underscore only).Clear table before loading (TRUNCATE): when enabled, empties the destination table before writing — useful for full replacement loads.
Pre-execution SQL: optional command executed in the database before loading (e.g., delete the period that will be reloaded).
Post-execution SQL: optional command executed after loading (e.g., update a control table).
Usage example
The data team wants to send reconciliation pending items to the corporate data warehouse, reloading only the current month on each run. In the stage, it selects the warehouse credential, defines the financeiro.pendencias_conciliacao table, keeps TRUNCATE disabled, and uses pre-execution SQL to delete the period that will be reloaded. On each run, the warehouse receives the updated snapshot — with no files and no manual intervention.
Best practices
Choose the load strategy with the data team: full replacement (TRUNCATE enabled) or incremental load (pre-execution SQL clearing only the reloaded period).
Validate the layout of the destination table — the columns in the flow output must be compatible with the table columns.
To feed BI tools, also consider Data Lake, which provides direct read access to the results, with no loading.
Related articles
Database Export Stage
Text File Export Stage
Document Export Stage
Data Lake: connect your BI or spreadsheet
Database Stage