import_jobs
Creates, updates, deletes, gets or lists an import_jobs resource.
Overview
| Name | import_jobs |
| Type | Resource |
| Id | aws.pinpoint.import_jobs |
Fields
The following fields are returned by SELECT queries:
- get_import_job
- get_import_jobs
| Name | Datatype | Description |
|---|---|---|
application_id | string | The unique identifier for the application that's associated with the import job. |
completed_pieces | integer | The number of pieces that were processed successfully (completed) by the import job, as of the time of the request. |
completion_date | string | The date, in ISO 8601 format, when the import job was completed. |
creation_date | string | The date, in ISO 8601 format, when the import job was created. |
definition | object | The resource settings that apply to the import job. |
failed_pieces | integer | The number of pieces that weren't processed successfully (failed) by the import job, as of the time of the request. |
failures | array | An array of entries, one for each of the first 100 entries that weren't processed successfully (failed) by the import job, if any. |
id | string | The unique identifier for the import job. |
job_status | string | The status of the import job. The job status is FAILED if Amazon Pinpoint wasn't able to process one or more pieces in the job. (CREATED, PREPARING_FOR_INITIALIZATION, INITIALIZING, PROCESSING, PENDING_JOB, COMPLETING, COMPLETED, FAILING, FAILED) |
total_failures | integer | The total number of endpoint definitions that weren't processed successfully (failed) by the import job, typically because an error, such as a syntax error, occurred. |
total_pieces | integer | The total number of pieces that must be processed to complete the import job. Each piece consists of an approximately equal portion of the endpoint definitions that are part of the import job. |
total_processed | integer | The total number of endpoint definitions that were processed by the import job. |
type | string | The job type. This value is IMPORT for import jobs. |
| Name | Datatype | Description |
|---|---|---|
item | array | An array of responses, one for each import job that's associated with the application (Import Jobs resource) or segment (Segment Import Jobs resource). |
next_token | string | The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_import_job | select | application-id, job-id, region | Retrieves information about the status and settings of a specific import job for an application. | |
get_import_jobs | select | application-id, region | page-size, token | Retrieves information about the status and settings of all the import jobs for an application. |
create_import_job | insert | application-id, region, ImportJobRequest | Creates an import job for an application. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
application-id | string | The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console. |
job-id | string | The unique identifier for the job. |
region | string | AWS region (default: us-east-1) |
page-size | string | The maximum number of items to include in each page of a paginated response. This parameter is not supported for application, campaign, and journey metrics. |
token | string | The NextToken string that specifies which page of results to return in a paginated response. |
SELECT examples
- get_import_job
- get_import_jobs
Retrieves information about the status and settings of a specific import job for an application.
SELECT
application_id,
completed_pieces,
completion_date,
creation_date,
definition,
failed_pieces,
failures,
id,
job_status,
total_failures,
total_pieces,
total_processed,
type
FROM aws.pinpoint.import_jobs
WHERE `application-id` = '{{ application-id }}' -- required
AND `job-id` = '{{ job-id }}' -- required
AND region = '{{ region }}' -- required
;
Retrieves information about the status and settings of all the import jobs for an application.
SELECT
item,
next_token
FROM aws.pinpoint.import_jobs
WHERE `application-id` = '{{ application-id }}' -- required
AND region = '{{ region }}' -- required
AND `page-size` = '{{ page-size }}'
AND token = '{{ token }}'
;
INSERT examples
- create_import_job
- Manifest
Creates an import job for an application.
INSERT INTO aws.pinpoint.import_jobs (
ImportJobRequest,
`application-id`,
region
)
SELECT
'{{ ImportJobRequest }}' /* required */,
'{{ application-id }}',
'{{ region }}'
RETURNING
import_job_response
;
# Description fields are for documentation purposes
- name: import_jobs
props:
- name: application-id
value: "{{ application-id }}"
description: Required parameter for the import_jobs resource.
- name: region
value: "{{ region }}"
description: Required parameter for the import_jobs resource.
- name: ImportJobRequest
description: |
Specifies the settings for a job that imports endpoint definitions from an Amazon Simple Storage Service (Amazon S3) bucket.
value:
DefineSegment: {{ DefineSegment }}
ExternalId: "{{ ExternalId }}"
Format: "{{ Format }}"
RegisterEndpoints: {{ RegisterEndpoints }}
RoleArn: "{{ RoleArn }}"
S3Url: "{{ S3Url }}"
SegmentId: "{{ SegmentId }}"
SegmentName: "{{ SegmentName }}"