Export to Snowflake

Section header image mobile

Streamline your Snowflake database updates effortlessly with Coefficient's "Export to Snowflake" feature. Coefficient empowers you to easily synchronize your Google Sheets/Excel with your database, supporting bulk updates and providing seamless record management through Update, Insert, and Delete actions—eliminating the need for extra scripts or queries. ❄️💨

What is Export to Snowflake?

How to Export to Snowflake?

Re-Use an Existing Mapping

Export to Snowflake Actions

Update

Insert

Delete

Schedule an Export to Snowflake

FAQs for Export to Snowflake

 

What is Export to Snowflake?

The Export to Snowflake feature enables you to modify data in Google Sheets/Excel and leverage the power of Coefficient to seamlessly push (or write back) those updates into Snowflake using UPDATE, INSERT, or DELETE actions.

ℹ️ NOTE: You need to use your Snowflake connection with Coefficient to use this feature. Due to security reasons, shared data sources are NOT supported with this feature.

How to Export to Snowflake?

ℹ️ PRO TIP: We recommend creating a Snowflake import of your data into Google Sheets/Excel using Coefficient before performing the Export to Snowflake. This allows us to detect/map certain fields automatically. (this is not required - but HIGHLY recommended) 😎

(Example: We are going to update the "title", "description", and "replacement cost" fields from our Snowflake table, coeff_film)

1. Open the Coefficient sidebar and click on the “Export to...” button.

ExportToSalesforce.png

2. Select the data source you would like to export your data to. (ie, Snowflake)

Screenshot 2023-12-20 at 7.43.44 PM.png

3. Select the Tab and Header row (the Header row is not the Coefficient header, but the row with the Snowflake field headers in it) then hit "Next".

Screenshot 2023-12-20 at 7.47.24 PM.png

ℹ️ NOTE: Coefficient automatically selects the sheet you have open as the Tab for this Export. If it is a different tab, you will need to click the drop-down and select it.

4. Designate the table in your database where you are updating the record. Make sure you choose the right Action from the list (ie: Update) then hit "Next".

Screenshot 2023-12-20 at 7.55.42 PM.png

5. Complete the Field Mappings for this Export. Coefficient REQUIRES a Primary Key or ID field to be mapped for certain Actions (UPDATE and DELETE) so that the updates made are to the correct records in your database.

Screenshot 2023-12-20 at 7.58.40 PM.png

ℹ️  Primary Keys:

UPDATE and DELETE Actions - Primary keys are REQUIRED for these actions.

INSERT Actions - This MAY or MAY NOT be required for your Export to Snowflake. If the primary key is set to auto-populate in your database, you can skip the mapping of the ID column, as the database SHOULD automatically create/assign a value for these newly inserted records. If you choose not to map the ID column, the ID value assigned to new records will take the last record and increment the new ID by +1.

6. Advanced Settings:

Column for Results: Each time you Export to Snowflake, Coefficient will write information back to your sheet related to that update. Coefficient will try to guess what the first empty column is in your sheet and suggest that as the column to use to populate this information. We will write 3 columns to the sheet, (1) the Record ID (2) Result (OK, ERROR, etc.), and (3) the date/time stamp that the record was updated last using Coefficient.

Export Empty Cells on Update: Enabling this feature will allow you to remove/clear out existing values in your database in bulk using Coefficient.

Include export button on sheet - Enabling this will create this button in the Coefficient header to allow you to access the existing Export Mappings for your current sheet much faster.

Screenshot 2023-12-20 at 8.13.38 PM.png

Screenshot 2023-12-20 at 8.26.47 PM.png

7. Confirm your settings and then click "Export".

Screenshot 2024-06-30 at 7.35.46 PM.png

8. Select the row(s) on your sheet that you need to Export to Snowflake. You can select (highlight) specific rows OR update all the rows in your sheet.

Screenshot 2024-06-30 at 7.36.42 PM.png

 

9. Coefficient will scan the data on your sheet and display the number of rows to be updated or skipped. Click on "Preview changes".

Screenshot 2024-06-30 at 7.38.23 PM.png

10. The "Export Preview" window opens, displaying the fields that will be updated in your MySQL database (highlighted in blue). If there are potential errors with your export, they will be visible here, allowing you to make necessary adjustments to your data. When you have confirmed all the changes/updates that will be pushed to Salesforce, click the "Update 4 rows in Snowflake" button.Screenshot 2024-06-30 at 7.40.43 PM.pngℹ️ NOTE: Toggle the buttons at the top (enabled by default) to either "Show only the changed rows" or "Show only the mapped columns" for better visibility.

ℹ️ NOTE: This action CANNOT be undone, so ensure all your settings and updates are correct before proceeding.

11. When the Export to Snowflake is complete (and successful), you can see the number of rows exported/skipped. Congratulations on your first Export to Snowflake! Screenshot 2024-06-30 at 7.42.46 PM.png

Re-Use an Existing Mapping

If you have used the "Export to" function before then you will see the previous Export Mappings in the Coefficient sidebar located underneath your Import list. This list will allow you to reuse a previous mapping. We will go through the process of using both the sidebar and the button below.

1. Using the Export to Snowflake feature a second time will reveal the “Export” button in the Coefficient Header as well as the previous mappings in the sidebar.

 ℹ️ NOTE: The "Export" button will show if you have the "Include export button on sheet" setting enabled and if your data came from a Coefficient import.Screenshot 2023-12-20 at 8.47.45 PM.png

2. When clicking on the “Export” on-sheet button the previous mapping(s) related to the sheet that you are currently on will appear in the sidebar.Screenshot 2023-12-20 at 8.56.27 PM.png

3. Make sure to review the mappings before performing the Export to Snowflake again. (From here you can view the run history and settings) then proceed with the typical “Export to…” process.

Screenshot 2023-12-20 at 8.58.27 PM.png

Screenshot 2023-12-20 at 8.58.53 PM.png

Screenshot 2023-12-20 at 9.00.17 PM.png

Export to Snowflake Actions

Update

Pushes updates to an existing field/record in HubSpot.

  • The record MUST have a Primary Key mapped.

Insert

Creates a NEW ID and inserts data into a new record in Snowflake.

  • Depending on how your Snowflake is set up, you MAY skip mapping the ID column on your sheet and leave the value blank. If you choose not to map the ID column, the ID value assigned to new records usually will take the last record and increment the new ID by +1 (depending on the database configuration). The ID column is still required on the sheet even if you are not mapping it.

Delete

This action will remove the ENTIRE record from Snowflake.

  • If you need to remove a field value on a record (that is not required) then use the "Update" action (above).
  • You cannot remove a value from a required field on a Snowflake record, it must be replaced with a new value on the update.
  • The record MUST have a Primary Key mapped.

Schedule an Export to Snowflake

If you often handle data, you might find yourself repeating certain tasks. Our Export to Snowflake function enables you to automate the process of sending your data back to Snowflake at a specified time. This feature is currently available for UPDATE actions and can significantly streamline your workload by automating the export process.

Screenshot 2023-12-18 at 8.22.31 PM.png

See how you can schedule an Export to Snowflake here!

 

FAQs for Export to Snowflake

My Snowflake table does not have a Primary Key - How can I use the Update the fields using Coefficient?

Export to Snowflake with Coefficient requires a Primary Key to update tables within Snowflake. You will need to add a Primary Key to the table in order to use this feature.

I have a lot of records I want to update using the Export to Snowflake with Coefficient. Are there any limitations on batch sizes?

Coefficient will automatically batch the data when you do an Export to Snowflake if there are more than 3 rows selected to updated. We HIGHLY recommend not exporting more than 10K rows at a time. This will ensure optimum performance. If the export fails/times out, please reduce the number of rows selected on the export and try again. Please reach out to support if you need assistance (support@coefficient.io). 

How can I use a shared connection my colleague created to Export to Snowflake? 

Shared Connections are not supported with the Export to Snowflake feature; this is a security measure the team put in place to prevent unauthorized edits/deletions of data/records in your database by users who do not currently have these levels of permissions with their own access. 

Why are some columns greyed out when I try to map them or update them?

Some database tables contain sub-permissions on individual columns. Columns may be read-only, in which case they will be greyed out and not mappable.

I am having trouble with my Export to Snowflake, what can I do? 

  1. First, make sure that you have the correct permissions in your database to use the Export to Snowflake feature. (Read/Write permissions). If you are unsure, please reach out to your Snowflake Admin for assistance.
  2. Once your permissions are confirmed, we suggest checking your field mappings, Primary Key(s), ID, etc. Are they all mapped to the correct fields?
  3. If you have confirmed #1 and #2, please check the database table, Coefficient supports the Export to Snowflake for SINGLE tables only. If you are using a query that contains JOINED data from 1+ tables the Export to Snowflake will not work. 
  4. If you have confirmed steps 1-3, please check if there is an error message located in the "Results" column of the Export sheet. This error message should provide insights on what is going on and what to adjust to fix the error. If you need additional assistance, please reach out to support (support@coefficient.io) and we will be glad to help!

 

Was this article helpful? 0 out of 0 found this helpful