Sync Logs

🗄️ What are Sync Logs?

Census can provide granular details on the data you've sent from your data warehouse to destination SaaS applications like Salesforce or Iterable. With these logs, you can answer common questions like:
  1. 1.
    When was my data updated in the destination?
  2. 2.
    Why did the destination's API reject records that I tried to sync?
  3. 3.
    What is the most common reason that the destination's API rejects my data?
At this time, Sync Logs are automatically accessible for Platform Plan accounts. If you would like logging enabled and are not on the Platform Plan, please contact Census Support at [email protected]

​
🗳
Which sources support logging?

Census can provide detailed logging for all data warehouse sources:
  • Snowflake
  • BigQuery
  • Redshift
  • PostgreSQL (version 13 or later is required)

🖥️ Configuring Sync Logs

To enable Sync Logs on any supported source:
  1. 1.
    Visit the Connections page.
  2. 2.
    Click to "Edit" the configuration of the source where you'd like logs.
  3. 3.
    Tick the box next to the option to "Write logs in this warehouse".
Here is an example of this configuration enabled for a sample Bigquery connection:
That's it! Logs will start populating for all syncs in this connection on their subsequent runs.

🧮 Log Data

Where can I find the logs?

Census exposes detailed logging information in a view called sync_log in your data warehouse. By warehouse, this view can be found as follows:
  • Snowflake: CENSUS.CENSUS.SYNC_LOG
  • BigQuery: census.sync_log
  • Redshift: census.sync_log
  • PostgreSQL: census.sync_log

How much log data is stored?

Census will store the previous 7 days of logs in the sync_log view.
Need data stored for longer? Please reach out at [email protected]

What do the columns of the view mean?

column
column description
log_id
Unique identifier for the log
sync_id
Unique identifier for the sync configuration. You can find it in the URL of your sync configurations as follows:
https://app.getcensus.com/syncs/[sync_id]/overview
sync_run_id
Unique identifier for the sync run. Use this value to identify a particular occasion when Census sends data as specified for a given sync configuration.
record_identifier
The value of the identifier specified in your sync configuration, identifying which record in your source you are trying to send to a destination.
record_payload
The exact data that Census was attempting to send to a given destination. It is formatted as a JSON object.
batch_started_at
The time when the batch containing this data was sent to the destination.
batch_completed_at
The time when the batch containing this data completed.
operation
The operation performed by Census. Either: 'upsert', 'update', 'create', or 'delete'... depending on the sync behavior you specified.
status
Either 'succeeded' or 'rejected'
status_message
If the status is 'rejected', this field will contain the reason returned by the destination's API.
_census_logged_at
When Census loaded this log record into your data warehouse.