Database (Destination) / Import Sheets

You can now create or replace tables in your database based on a table in Google Sheets or another table in your database. You can either use auto-import, or create a new block and set the Destination as "Database".

Via Auto Import / Export

Auto import gives you a quick and simple option for importing tables in a Google Spreadsheet into your database. Watch the following video demonstration, or follow the steps below:

  1. Go to the SeekWell Web App and type command / control + k, then search for "Import sheet to SQL Database".

  2. Select Spreadsheet and select your source Spreadsheet. If you don’t see your source Spreadsheet in the drop-down menu, start typing its name or scroll to the bottom of the list and select Refresh Sheets.

  3. Select Destination to choose your destination database. You may need to add your database as a source, if you have not done so already.

  4. [Optional] Select Schema and enter the name of a specific schema where you would like to import your tables.

  5. [Optional] Under Table Name and to the right of each Sheet name, enter the table names you want your tables to be called. By default, tables will be called their Sheet name. You can also click the sheet name to deselect any Sheets in the Spreadsheet that you don’t want to import into your database. Then select Import Sheets on the bottom right.

  6. Double-check that your new table was successfully created.

If you have gaps in your data (e.g. data in A:D, an empty column in E, and data F:G) then you will have to specify a range under the name of that Sheet.

Via a new block with Database as destination

You can also create a new database table by creating a new block and setting the Destination as Database. Watch the following demonstration video, or follow the steps below:

  1. Start a new block in the SeekWell Web App and choose the source of the data you want to create/replace a new table with. In this example, we use a table from Google Sheets as the source data, so we choose Sheets/CSV/Block as our source.

  2. Write SQL to fetch the data you want to use. If you want the entire table of your source data to be created/replaced in your destination database, simply SELECT * from your source table. If your source data is in a Google Sheet, remember to alias the Sheet in double curly braces, or {{}}, and change the Parameter type to *Sheets*. Then enter your correct Spreadsheet and Sheet names under Parameters on the right.

  3. Check that the correct data returns when you run your SQL query.

  4. Open the field under Destination and select Database.

  5. Select Operation and select Create/Replace as your operation.

  6. Select Database and choose the correct database you want to create/replace your new table in from the drop-down.

  7. Enter the name of the table to be created/replaced (for example, dummy.import_users).

    If your destination database is Snowflake, the table name is case-sensitive, so double-check that your destination table name is correct.
  8. Select Save.

  9. Run the SQL and double-check that your new table was created/replaced. If your source data changes often, you can use Repeat to set a schedule for replacing your new table (for example, at weekly, daily, hourly intervals).

We currently only support creating / replacing tables. If you need the ability to "upsert", please contact us as this feature is currently in beta.

Was this page helpful?