Skip to content

Commit

Permalink
feat(client-personalize): This release adds support for incremental b…
Browse files Browse the repository at this point in the history
…ulk ingestion for the Personalize CreateDatasetImportJob API.
  • Loading branch information
awstools committed Aug 2, 2022
1 parent 70224cc commit 545008f
Show file tree
Hide file tree
Showing 18 changed files with 416 additions and 284 deletions.
164 changes: 87 additions & 77 deletions clients/client-personalize/src/Personalize.ts

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions clients/client-personalize/src/commands/CreateDatasetCommand.ts
Expand Up @@ -28,8 +28,9 @@ export interface CreateDatasetCommandInput extends CreateDatasetRequest {}
export interface CreateDatasetCommandOutput extends CreateDatasetResponse, __MetadataBearer {}

/**
* <p>Creates an empty dataset and adds it to the specified dataset group. Use
* <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetImportJob.html">CreateDatasetImportJob</a> to import your training data to a dataset.</p>
* <p>Creates an empty dataset and adds it to the specified dataset group.
* Use <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetImportJob.html">CreateDatasetImportJob</a> to import your training data to a
* dataset.</p>
*
* <p>There are three types of datasets:</p>
* <ul>
Expand All @@ -43,13 +44,14 @@ export interface CreateDatasetCommandOutput extends CreateDatasetResponse, __Met
* <p>Users</p>
* </li>
* </ul>
* <p>Each dataset type has an associated schema with required field types. Only the
* <code>Interactions</code> dataset is required in order to train a model (also referred to as
* creating a solution).</p>
* <p>Each dataset type has an associated schema with required field types.
* Only the <code>Interactions</code> dataset is required in order to train a
* model (also referred to as creating a solution).</p>
* <p>A dataset can be in one of the following states:</p>
* <ul>
* <li>
* <p>CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED</p>
* <p>CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE
* FAILED</p>
* </li>
* <li>
* <p>DELETE PENDING > DELETE IN_PROGRESS</p>
Expand Down
Expand Up @@ -28,28 +28,25 @@ export interface CreateDatasetExportJobCommandInput extends CreateDatasetExportJ
export interface CreateDatasetExportJobCommandOutput extends CreateDatasetExportJobResponse, __MetadataBearer {}

/**
* <p>
* Creates a job that exports data from your dataset to an Amazon S3 bucket.
* <p> Creates a job that exports data from your dataset to an Amazon S3 bucket.
* To allow Amazon Personalize to export the training data, you must specify an
* service-linked IAM role that gives Amazon Personalize <code>PutObject</code> permissions for your Amazon S3 bucket.
* For information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/export-data.html">Exporting a dataset</a>
* in the Amazon Personalize developer guide.
* </p>
* service-linked IAM role that gives Amazon Personalize <code>PutObject</code>
* permissions for your Amazon S3 bucket. For information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/export-data.html">Exporting a dataset</a> in the Amazon Personalize developer guide. </p>
* <p>
* <b>Status</b>
* </p>
* <p>A dataset export job can be in one of the following states:</p>
* <ul>
* <li>
* <p>CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED</p>
* <p>CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE
* FAILED</p>
* </li>
* </ul>
* <p>
* To get the status of the export job, call <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeDatasetExportJob.html">DescribeDatasetExportJob</a>,
* and specify the Amazon Resource Name (ARN) of the dataset export job. The dataset export is
* complete when the status shows as ACTIVE. If the status shows as CREATE FAILED, the response
* includes a <code>failureReason</code> key, which describes why the job failed.
* </p>
* <p> To get the status of the export job, call <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeDatasetExportJob.html">DescribeDatasetExportJob</a>, and specify the Amazon Resource Name
* (ARN) of the dataset export job. The dataset export is complete when the
* status shows as ACTIVE. If the status shows as CREATE FAILED, the response
* includes a <code>failureReason</code> key, which describes why the job
* failed. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -28,9 +28,9 @@ export interface CreateDatasetGroupCommandInput extends CreateDatasetGroupReques
export interface CreateDatasetGroupCommandOutput extends CreateDatasetGroupResponse, __MetadataBearer {}

/**
* <p>Creates an empty dataset group. A dataset group is a container for Amazon Personalize resources.
* A dataset group can contain at most three datasets, one for each type of
* dataset:</p>
* <p>Creates an empty dataset group. A dataset group is a container for
* Amazon Personalize resources. A dataset group can contain at most three datasets, one
* for each type of dataset:</p>
* <ul>
* <li>
* <p>Interactions</p>
Expand All @@ -42,31 +42,33 @@ export interface CreateDatasetGroupCommandOutput extends CreateDatasetGroupRespo
* <p>Users</p>
* </li>
* </ul>
* <p>
* A dataset group can be a Domain dataset group, where you specify a domain and use
* pre-configured resources like recommenders, or a Custom dataset group, where you use custom resources, such as a solution with a solution version, that
* you deploy with a campaign. If you start with a Domain dataset group, you can still add custom resources such as
* solutions and solution versions trained with recipes for custom use cases and deployed with campaigns.
* </p>
* <p> A dataset group can be a Domain dataset group, where you specify a
* domain and use pre-configured resources like recommenders, or a
* Custom dataset group, where you use custom resources, such as a solution
* with a solution version, that you deploy with a campaign. If you start
* with a Domain dataset group, you can still add custom resources such as
* solutions and solution versions trained with recipes for custom use cases
* and deployed with campaigns. </p>
* <p>A dataset group can be in one of the following states:</p>
* <ul>
* <li>
* <p>CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED</p>
* <p>CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE
* FAILED</p>
* </li>
* <li>
* <p>DELETE PENDING</p>
* </li>
* </ul>
* <p>To get the status of the dataset group, call <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeDatasetGroup.html">DescribeDatasetGroup</a>. If
* the status shows as CREATE FAILED, the response includes a <code>failureReason</code> key,
* which describes why the creation failed.</p>
* <p>To get the status of the dataset group, call <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeDatasetGroup.html">DescribeDatasetGroup</a>. If the status shows as CREATE FAILED, the
* response includes a <code>failureReason</code> key, which describes why
* the creation failed.</p>
* <note>
* <p>You must wait until the <code>status</code> of the dataset group is <code>ACTIVE</code>
* before adding a dataset to the group.</p>
* <p>You must wait until the <code>status</code> of the dataset group is
* <code>ACTIVE</code> before adding a dataset to the group.</p>
* </note>
* <p>You can specify an Key Management Service (KMS) key to encrypt the datasets in the group. If you
* specify a KMS key, you must also include an Identity and Access Management (IAM) role that has permission to
* access the key.</p>
* <p>You can specify an Key Management Service (KMS) key to encrypt the datasets in
* the group. If you specify a KMS key, you must also include an Identity and Access Management
* (IAM) role that has permission to access the key.</p>
* <p class="title">
* <b>APIs that require a dataset group ARN in the request</b>
* </p>
Expand Down
Expand Up @@ -28,31 +28,37 @@ export interface CreateDatasetImportJobCommandInput extends CreateDatasetImportJ
export interface CreateDatasetImportJobCommandOutput extends CreateDatasetImportJobResponse, __MetadataBearer {}

/**
* <p>Creates a job that imports training data from your data source (an Amazon S3 bucket) to an
* Amazon Personalize dataset. To allow Amazon Personalize to import the training data, you must specify an
* IAM service role that has permission to read from the data source, as Amazon Personalize makes a
* copy of your data and processes it internally. For information on granting access
* to your Amazon S3 bucket, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/granting-personalize-s3-access.html">Giving Amazon Personalize
* Access to Amazon S3 Resources</a>. </p>
* <p>Creates a job that imports training data from your data source (an
* Amazon S3 bucket) to an Amazon Personalize dataset. To allow Amazon Personalize to import the
* training data, you must specify an IAM service role that has permission to
* read from the data source, as Amazon Personalize makes a copy of your data and
* processes it internally. For information on granting access to your Amazon S3
* bucket, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/granting-personalize-s3-access.html">Giving
* Amazon Personalize Access to Amazon S3 Resources</a>. </p>
* <important>
* <p>The dataset import job replaces any existing data in the dataset that you imported in bulk.</p>
* <p>By default, a dataset import job replaces any existing data in the
* dataset that you imported in bulk. To add new records without replacing
* existing data, specify INCREMENTAL for the import mode in the
* CreateDatasetImportJob operation.</p>
* </important>
* <p>
* <b>Status</b>
* </p>
* <p>A dataset import job can be in one of the following states:</p>
* <ul>
* <li>
* <p>CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED</p>
* <p>CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE
* FAILED</p>
* </li>
* </ul>
* <p>To get the status of the import job, call <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeDatasetImportJob.html">DescribeDatasetImportJob</a>,
* providing the Amazon Resource Name (ARN) of the dataset import job. The dataset import is
* complete when the status shows as ACTIVE. If the status shows as CREATE FAILED, the response
* includes a <code>failureReason</code> key, which describes why the job failed.</p>
* <p>To get the status of the import job, call <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeDatasetImportJob.html">DescribeDatasetImportJob</a>, providing the Amazon Resource Name
* (ARN) of the dataset import job. The dataset import is complete when the
* status shows as ACTIVE. If the status shows as CREATE FAILED, the response
* includes a <code>failureReason</code> key, which describes why the job
* failed.</p>
* <note>
* <p>Importing takes time. You must wait until the status shows as ACTIVE before training a
* model using the dataset.</p>
* <p>Importing takes time. You must wait until the status shows as ACTIVE
* before training a model using the dataset.</p>
* </note>
*
* <p class="title">
Expand Down
Expand Up @@ -24,8 +24,9 @@ export interface DeleteDatasetCommandOutput extends __MetadataBearer {}

/**
* <p>Deletes a dataset. You can't delete a dataset if an associated
* <code>DatasetImportJob</code> or <code>SolutionVersion</code> is in the CREATE PENDING or IN
* PROGRESS state. For more information on datasets, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDataset.html">CreateDataset</a>.</p>
* <code>DatasetImportJob</code> or <code>SolutionVersion</code> is in the
* CREATE PENDING or IN PROGRESS state. For more information on datasets, see
* <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDataset.html">CreateDataset</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -23,8 +23,8 @@ export interface DeleteDatasetGroupCommandInput extends DeleteDatasetGroupReques
export interface DeleteDatasetGroupCommandOutput extends __MetadataBearer {}

/**
* <p>Deletes a dataset group. Before you delete a dataset group, you must delete the
* following:</p>
* <p>Deletes a dataset group. Before you delete a dataset group, you must
* delete the following:</p>
* <ul>
* <li>
* <p>All associated event trackers.</p>
Expand Down
Expand Up @@ -28,7 +28,8 @@ export interface DescribeDatasetCommandInput extends DescribeDatasetRequest {}
export interface DescribeDatasetCommandOutput extends DescribeDatasetResponse, __MetadataBearer {}

/**
* <p>Describes the given dataset. For more information on datasets, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDataset.html">CreateDataset</a>.</p>
* <p>Describes the given dataset. For more information on datasets, see
* <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDataset.html">CreateDataset</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -28,8 +28,7 @@ export interface DescribeDatasetExportJobCommandInput extends DescribeDatasetExp
export interface DescribeDatasetExportJobCommandOutput extends DescribeDatasetExportJobResponse, __MetadataBearer {}

/**
* <p>Describes the dataset export job created by <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetExportJob.html">CreateDatasetExportJob</a>,
* including the export job status.</p>
* <p>Describes the dataset export job created by <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetExportJob.html">CreateDatasetExportJob</a>, including the export job status.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -28,7 +28,8 @@ export interface DescribeDatasetGroupCommandInput extends DescribeDatasetGroupRe
export interface DescribeDatasetGroupCommandOutput extends DescribeDatasetGroupResponse, __MetadataBearer {}

/**
* <p>Describes the given dataset group. For more information on dataset groups, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetGroup.html">CreateDatasetGroup</a>.</p>
* <p>Describes the given dataset group. For more information on dataset
* groups, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetGroup.html">CreateDatasetGroup</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -28,8 +28,7 @@ export interface DescribeDatasetImportJobCommandInput extends DescribeDatasetImp
export interface DescribeDatasetImportJobCommandOutput extends DescribeDatasetImportJobResponse, __MetadataBearer {}

/**
* <p>Describes the dataset import job created by <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetImportJob.html">CreateDatasetImportJob</a>,
* including the import job status.</p>
* <p>Describes the dataset import job created by <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetImportJob.html">CreateDatasetImportJob</a>, including the import job status.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -28,11 +28,12 @@ export interface ListDatasetExportJobsCommandInput extends ListDatasetExportJobs
export interface ListDatasetExportJobsCommandOutput extends ListDatasetExportJobsResponse, __MetadataBearer {}

/**
* <p>Returns a list of dataset export jobs that use the given dataset. When a dataset is not
* specified, all the dataset export jobs associated with the account are listed. The response
* provides the properties for each dataset export job, including the Amazon Resource Name (ARN).
* For more information on dataset export jobs, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetExportJob.html">CreateDatasetExportJob</a>. For
* more information on datasets, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDataset.html">CreateDataset</a>.</p>
* <p>Returns a list of dataset export jobs that use the given dataset. When
* a dataset is not specified, all the dataset export jobs associated with
* the account are listed. The response provides the properties for each
* dataset export job, including the Amazon Resource Name (ARN). For more
* information on dataset export jobs, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetExportJob.html">CreateDatasetExportJob</a>. For more information on datasets, see
* <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDataset.html">CreateDataset</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -28,9 +28,9 @@ export interface ListDatasetGroupsCommandInput extends ListDatasetGroupsRequest
export interface ListDatasetGroupsCommandOutput extends ListDatasetGroupsResponse, __MetadataBearer {}

/**
* <p>Returns a list of dataset groups. The response provides the properties for each dataset
* group, including the Amazon Resource Name (ARN). For more information on dataset groups, see
* <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetGroup.html">CreateDatasetGroup</a>.</p>
* <p>Returns a list of dataset groups. The response provides the properties
* for each dataset group, including the Amazon Resource Name (ARN). For more
* information on dataset groups, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetGroup.html">CreateDatasetGroup</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down

0 comments on commit 545008f

Please sign in to comment.