How do I switch data sources in a Klip?

Have you ever built a Klip from uploaded data, only to realize later that you want to use Box as the data source so that your data can have scheduled refresh? Or you created a Klip pointing to a test database, and before sharing your Klip with your team, you want to repoint the Klip to a production database?

If you want to swap one data source for another one, this article will show you three different methods. Choose the option that is right for you.

Note: This article assumes that you have already created and saved your new data source.

The three ways to change a Klip to point to a new data source are:

  • Option One: Re-point the formula to reference the new data source
  • Option Two: Update the Klip's source code by replacing the data source IDs
  • Option Three: Copy each formula into a text editor and change the data source ID

Note: If you have dynamic data sources, or the data you are replacing has different structures/data types, Option One is the only option for you.

Option 1: Re-point the formula to your new data source

This option is great if you have simple formulas. Simply re-point the data references in your formula to the new data source.

  1. After creating your new data source, go to your dashboard and Edit the Klip you want to change.
  1. In the Klip Editor, go to your Data, and click +Add Data Source.
  1. In the Add a Data Source popup, find your new data source. The search bar may help you find it faster.
    Your new data source will appear in a new tab.

  1. With the correct data selected in the formula bar, in our example B:B, select the new data source name on the tab below your data.
  2. Select the same corresponding replacement data on the new data source.
    This will update your formula to reference your new data source.
  3. Repeat for all the other formulas in your Klip.

 

Note: Keep in mind that in this example, a CSV file was uploaded first (the old data source), and the new data source is a Google Sheet with similar data. That is why you see a different data source reference treatment in the formula bar.

Option 2: Update Klip source code to change all formulas at once

Before you begin, you will need to find the data source ID of your new data source. Follow the steps in Where do I find my data source ID? to find yours.

This method allows you to update your entire Klip with the new data source by changing the data source ID in the source code.

Important! Make sure your data sources have the same structure and type.

To find your Klip's source code,
  1. Navigate up to the top left of the Klip Editor and click Advanced Tools.
  2. Select View Klip Source Code.
  1. Highlight and copy the entire source code, and paste it into your notepad (or text editor).
  1. In your text editor, find the find and replace option.
  1. Find your current data source ID in the source code, and paste it into the find text box.
  2. Paste your new data source ID into the Replace with text box.
  3. Click Replace all.
  4. Copy your source code back into the Klip Editor.
  5. Click Update.

Your Klip and all the formulas associated with it, should now point to the new data source.

Option 3: Change an entire formula to point to new data source ID

Before you begin this method, you will need to find the data source ID of your new data source.

Follow the steps in Where do I find my data source ID? to find yours.

If you have a very small formula and want to update data source ID's in individual Klips, make sure your data sources have the exact same structure.

For this method, one at a time,

  1. Copy your first formula onto a notepad.

  1. Replace the old data source ID in the formula with the new data source ID.
  2. Paste the updated formula back into the Klip Editor.
    The new data source will appear as another tab under your data.

Check that your formula now points to the new data source by looking at the following clues:

  • Click on the data reference in the formula, for example B:B, and make sure it points to the corresponding column in the new data source.
  • Click the Evaluate button to check that your formula is pointing to the new data.

Related links