Export to database
Use the Export to database cell to append dataframes to tables attached to your notebooks. Combined with scheduled runs, this will help you have the tables in your project regularly updated with fresh data.
Suppose you retrieved data from an attached database and do some calculations. Now, you want to write the content of the dataframe containing the results of your calculations to the table. If you set up a schedule for this notebook, you ensure that the table is updated regularly and the other users work with the up-to-date source.
Export a DataFrame to a table
Go to Attached data on the left-hand sidebar.
Click Connect SQL cell for this database and select Export to database cell from the expanded list.
In the Export to database cell, expand the lists in each field to provide the following:
Target database connection: the connection with the database containing the required table
Source dataframe: the dataframe that you want to append
Database: the database with the table you want to update
Schema: the schema containing the required target table
Table: the table that you want to append the source dataframe to
Run the cell by clicking the Run icon in the upper-left corner of the cell.
If any column matches are found, the output of the cell will return the number of successfully added rows.