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. ❄️💨
Schedule an 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. |
2. Select the data source you would like to export your data to. (ie, Snowflake) |
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". |
ℹ️ 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". |
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. |
ℹ️ 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. |
|
7. Confirm your settings and then click "Export". |
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.
|
9. Coefficient will scan the data on your sheet and display the number of rows to be updated or skipped. Click on "Preview changes". |
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.ℹ️ 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!
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.
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.
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.
|
Export to Snowflake Actions
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.
Update
Pushes updates to an existing field/record in HubSpot.
- The record MUST have a Primary Key mapped.
Upsert
An Upsert is a combination of an Insert and Update. It allows you to either update existing records or insert new ones based on whether the record already exists.
- The record MUST have a Primary Key mapped to it. If the row with a matching primary key does not exist, the new row/record will be inserted.
- 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 will usually 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.
- If "Export Empty Cells" is enabled and the cell value is empty, the corresponding entry in the database will be set to null.
- Before proceeding with the upsert action, you'll see the number of rows updated or inserted into your database records.
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.
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?
- 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.
- Once your permissions are confirmed, we suggest checking your field mappings, Primary Key(s), ID, etc. Are they all mapped to the correct fields?
- 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.
- 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!