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_operationsfrom mailchimp_batch_operation;
select id, submitted_at, completed_at, status, total_operationsfrom 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_operationsfrom mailchimp_batch_operation;
select id, status, errored_operations, finished_operations, total_operationsfrom 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_operationsfrom mailchimp_batch_operation;
select id, ( strftime('%s', completed_at) - strftime('%s', submitted_at) ) || ' seconds' as time_taken, total_operations, errored_operations, finished_operationsfrom 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_operationsfrom mailchimp_batch_operationwhere completed_at >= now() - interval '10' day;
select id, submitted_at, completed_at, status, total_operationsfrom mailchimp_batch_operationwhere completed_at >= datetime('now', '-10 day');
Schema for mailchimp_batch_operation
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The Mailchimp account ID. |
completed_at | timestamp with time zone | The date and time when all operations in the batch request completed in ISO 8601 format. | |
errored_operations | bigint | The number of completed operations that returned an error. | |
finished_operations | bigint | The number of completed operations. This includes operations that returned an error. | |
id | text | = | The unique identifier for the batch request. |
response_body_url | text | The URL of the gzipped archive of the results of all the operations. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | The status of the batch call. | |
submitted_at | timestamp with time zone | The date and time when the server received the batch request in ISO 8601 format. | |
total_operations | bigint | The 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