Sync Real-time Data

Data/SQL Guides

Sync Real-time Data

In some cases, you may want to sync real-time data to a connected dataset. For example, you can sync to live weather source from a public URL data file or sync to a shared spreadsheet of data that is maintained on your Google Drive or Dropbox.

You can create synced tables through CARTO Builder, or through the Import API.

During the connect dataset process, select the frequency to sync the data every hour, day, week, or month.

Additionally, analysis can be applied to layers that contain a synced dataset. Every time the real-time data is refreshed, the analysis is re-run!

Syncing to an External Datasource

Before connecting to an external datasource, you must select the external service from the Connect Dataset options. This is a one-time setup. After your external connectors are enabled and connected, the connect dataset options display a list of your Google Drive, Dropbox or Box files.

Syncing to an external datasource is not available for free account plans.

For this example, suppose you have an Excel file in a Dropbox folder. With CARTO Builder, you can create a map using your data as a connected dataset and sync to the .csv file.

  1. Enable the Dropbox connector, available from the Connect Dataset options.

    The Connect Dataset options appear when you are adding a new dataset from Your datasets dashboard, or when you are adding map layers in Builder.
  2. Connect the dataset (or add a layer) to the live data.

    Only compatible data formats are supported for sync files.
  3. To keep your connected dataset in-sync, select the desired frequency of updates to every hour, day, week, or month.

    Sync data options

When the data is updated from the external resource, the synced data automatically updates to show the changes in CARTO.

Syncing to a Public URL

Optionally, you can enter a public url data file to sync data to your account. For example, add a map layer connecting to public earthquake data and see how you can set the sync options.

  1. Copy the public feed data, provided by provided by the USGS Earthquake Hazards Program.

  2. When connecting a dataset, enter the copied url of data. For example, https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/significant_week.csv

Sync data to a public url

You can change the sync options at anytime by accessing the dataset options.

Changing the Sync Frequency

After connecting a dataset with sync options, you can modify the frequency of sync options from Your datasets dashboard, or from accessing the original data source directly from a map layer.

  1. From Your datasets dashboard:

    • Open the synced dataset. The dataset toolbar displays the last time the connected dataset was synced.
    • Click VIEW OPTIONS to modify the sync dataset options.
    • Click SAVE.

    Edit sync option from dataset view

  2. From a map layer:

    • Select the original connected dataset from the map layer. Builder displays the last time the connected dataset was synced.
    • Click VIEW OPTIONS to modify the sync dataset options.
    • Click SAVE.

    Accss sync options from a map layer

If you have a connected dataset from the Data Library, you will not be able to change the sync frequency. You can only disconnect the synced data. This is intentional by design, as datasets from the synced library are synced differently then public data.

Disconnect Synced Data

Synced tables cannot be edited in CARTO Builder, as the data is being pulled from another resource. If you want to edit the dataset, you can disconnect the dataset from the source by altering the sync frequency to Never. Disconnecting synced options means that the dataset is now considered local, and can be edited by adding rows and values.

Once you change the sync frequency to Never, the sync options are removed and you will not be able sync the dataset. If you are interested in syncing to real-time data, you will have to re-import the live data again.

Example of removing sync options