turbot/mailchimp
steampipe plugin install mailchimp

Table: mailchimp_batch_operation - Query Mailchimp Batch Operations using SQL

Mailchimp Batch Operations is a feature within Mailchimp that allows you to execute multiple operations in a single API request. It enables you to perform bulk actions such as creating, updating, or deleting a large number of resources at once, saving time and reducing the number of API calls needed. Mailchimp Batch Operations simplifies the management of large datasets and enhances the efficiency of your campaigns.

Table Usage Guide

The mailchimp_batch_operation table provides insights into batch operations within Mailchimp. As a data analyst or marketing professional, explore operation-specific details through this table, including status, completed operations, and error details. Utilize it to monitor the progress of your batch operations, identify failed operations, and analyze the response body for troubleshooting and optimization.

Examples

Basic info

Discover the segments that have completed their operations in your Mailchimp batch process. This query can help you assess the performance and status of your operations, providing essential insights for potential troubleshooting and optimization.

select
id,
submitted_at,
completed_at,
status,
total_operations
from
mailchimp_batch_operation;
select
id,
submitted_at,
completed_at,
status,
total_operations
from
mailchimp_batch_operation;

Get status of each batch operation

Determine the status of each batch operation in your Mailchimp account. This helps in understanding the progress and possible issues with your ongoing operations, aiding in efficient troubleshooting and management.

select
id,
status errored_operations,
finished_operations,
total_operations
from
mailchimp_batch_operation;
select
id,
status,
errored_operations,
finished_operations,
total_operations
from
mailchimp_batch_operation;

Get total time taken by each batch operation

Explore the efficiency of your batch operations by determining the total time each one takes. This can help identify bottlenecks and optimize your processes.

select
id,
(
extract(
epoch
from
(completed_at - submitted_at)
)
) || ' seconds' as time_taken,
total_operations,
errored_operations,
finished_operations
from
mailchimp_batch_operation;
select
id,
(
strftime('%s', completed_at) - strftime('%s', submitted_at)
) || ' seconds' as time_taken,
total_operations,
errored_operations,
finished_operations
from
mailchimp_batch_operation;

List batch operations completed in the last 10 days

Explore which batch operations have been completed in the past 10 days. This is useful to quickly assess recent activity and status, helping you to keep track of your operations.

select
id,
submitted_at,
completed_at,
status,
total_operations
from
mailchimp_batch_operation
where
completed_at >= now() - interval '10' day;
select
id,
submitted_at,
completed_at,
status,
total_operations
from
mailchimp_batch_operation
where
completed_at >= datetime('now', '-10 day');

Schema for mailchimp_batch_operation

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
completed_attimestamp with time zoneThe date and time when all operations in the batch request completed in ISO 8601 format.
errored_operationsbigintThe number of completed operations that returned an error.
finished_operationsbigintThe number of completed operations. This includes operations that returned an error.
idtext=The unique identifier for the batch request.
response_body_urltextThe URL of the gzipped archive of the results of all the operations.
statustextThe status of the batch call.
submitted_attimestamp with time zoneThe date and time when the server received the batch request in ISO 8601 format.
total_operationsbigintThe total number of operations to complete as part of this batch request. For GET requests requiring pagination, each page counts as a separate operation.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- mailchimp

You can pass the configuration to the command with the --config argument:

steampipe_export_mailchimp --config '<your_config>' mailchimp_batch_operation