イントロダクション
Cloud HCMは、読取り専用データ・ストアを備えた新世代プラットフォームを使用して、HCMからデータを抽出する機能を提供します。
目的
このチュートリアルを完了すると、次のことが理解できるようになります。
- 就業者抽出ビューとそのオブジェクトの階層の問合せ
- 選択した就業者階層データを取得するための抽出ジョブ要求を非同期に発行および追跡します
- 抽出出力ファイルのダウンロード
前提条件
始める前に:
- Oracle CoEに連絡して、読取り専用データ・ストアがポッドにプロビジョニングされ、データがレプリケートされていることを確認してください
- 必要なセキュリティー構成を実施すること。これには、以下が含まれます。
- データ・セキュリティの設定
- OAuthクライアント・アプリケーションの設定
ユース・ケース
この機能により、次のユースケースに対応できます。
完全データ抽出
就業者データの完全抽出は、1回かぎりのアクティビティでも定期的なアクティビティでもかまいません。
オブジェクト階層全体を取得することも、そのサブセットのみを取得することもできます。
完全データ抽出では、フィルタリング基準に一致するすべてのレコードが取得され、出力ファイルが非常に大きい場合があります。
有効日オブジェクトは要求有効日時点で取得され、現在の抽出日がデフォルトとなります。
増分データ抽出
就業者データの増分抽出は、通常、定期的なスケジュール済アクティビティです。
オブジェクト階層全体を取得することも、そのサブセットのみを取得することもできます。
このユースケースでは、最初の抽出実行がベースラインである前回の抽出実行以降に変更されたオブジェクトのみを取得します。これを実現するには、変更検出の対象となる任意のレベルでtimeUpdated属性フィルタを適用する必要があります。
増分データ抽出問合せでは、追加のフィルタリング基準を適用できます。出力ファイルにはデルタのみが含まれるため、通常、完全抽出と比較すると小さくなります。
属性の現在の値のみが取得されます。
有効日オブジェクトは要求有効日時点で取得され、現在の抽出日がデフォルトとなります。
注意:
物理的に削除されたレコードは、timeUpdatedによるフィルタリングを使用して返されません。
タスク1: 抽出ビューの選択
必要なオブジェクトおよび属性に応じて、使用する抽出ビューを選択します。リリース26A時点で使用可能なビューを、モジュール別にグループ化して抽出できるオブジェクトおよび属性とともにリストします。
複数の言語:
翻訳可能属性は、この時点では英語でのみ使用できます。グローバルHR - 雇用
| モジュール名 | oraHcmHrCoreEmployment |
|---|---|
| モジュール・コンテキスト・パス | hcmHrCore/employment |
| ビュー名 | 属性 |
|---|---|
| actionExtracts | id actionCode startDate endDate timeCreated timeUpdated createdBy updatedBy actionName 説明 |
| assignmentStatusTypeExtracts | ID assignmentStatusCode fromDate toDate activeFlag defaultFlag timeCreated timeUpdated createdBy updatedBy userStatus |
| emailExtracts | ID fromDate toDate emailAddress timeUpdated updatedBy timeCreated createdBy primaryFlag personDetail.id personDetail.personNumber personDetail.effectiveStartDate personDetail.effectiveEndDate type.lookupCode type.lookupType type.meaning |
| legislativeInformationExtracts | ID effectiveStartDate effectiveEndDate 性別 maritalStatus maritalStatusChangeDate highestEducationLevel timeUpdated updatedBy timeCreated createdBy personDetail.id personDetail.personNumber personDetail.effectiveStartDate personDetail.effectiveEndDate legislation.territoryCode legislation.territoryShortName |
| legislativeInformationHistoryExtracts | ID effectiveStartDate effectiveEndDate 性別 maritalStatus maritalStatusChangeDate highestEducationLevel timeUpdated updatedBy timeCreated createdBy personDetail.id personDetail.personNumber legislation.territoryCode legislation.territoryShortName |
| managerHierarchyExtracts | effectiveStartDate effectiveEndDate personId assignmentId managerType managerLevel managerId managerAssignmentId primaryAssignmentFlag primaryManagerFlag createdBy timeCreated updatedBy timeUpdated personAssignment.id personAssignment.effectiveStartDate personAssignment.effectiveEndDate personAssignment.effectiveSequence personAssignment.effectiveLatestChange personAssignment.assignmentType personAssignment.assignmentNumber personAssignment.primaryFlag personAssignment.businessTitle personAssignment.workAtHomeFlag personAssignment.officeBuilding personAssignment.officeFloor personAssignment.officeMailStop personAssignment.officeNumber personAssignment.primaryAssignmentFlag personAssignment.primaryWorkRelationshipFlag personAssignment.timeUpdated personAssignment.updatedBy personAssignment.timeCreated personAssignment.createdBy personAssignment.systemPersonType personAssignment.labourUnionMemberFlag personAssignment.managerFlag personAssignment.probationEndDate personAssignment.probationPeriod personAssignment.probationPeriodUnit personAssignment.normalHours personAssignment.frequency personAssignment.endTime personAssignment.startTime personAssignment.noticePeriod personAssignment.noticePeriodUOM personAssignment.workerCategory personAssignment.assignmentCategory personAssignment.hourlyPaidOrSalaried personAssignment.projectedEndDate personAssignment.projectedStartDate personAssignment.assignmentStatusType personAssignment.retirementAge personAssignment.retirementDate personAssignment.synchronizeFromPositionFlag personAssignment.fullTimeOrPartTime personAssignment.permanentAssignmentFlag personAssignment.seniorityBasis personAssignment.overtimePeriod personAssignment.adjustedFullTimeEquivalent personAssignment.annualWorkingDuration personAssignment.annualWorkingDurationUnit personAssignment.annualWorkingRatio personAssignment.standardFrequency personAssignment.standardWorkingHours personAssignment.standardAnnualWorkingDuration personAssignment.sequence personAssignment.department.id personAssignment.department.name personAssignment.department.title personAssignment.department.effectiveStartDate personAssignment.department.effectiveEndDate personAssignment.legalEmployer.id personAssignment.legalEmployer.name personAssignment.legalEmployer.effectiveStartDate personAssignment.legalEmployer.effectiveEndDate personAssignment.legislation.territoryCode personAssignment.legislation.territoryShortName personAssignment.position.id personAssignment.position.effectiveStartDate personAssignment.position.effectiveEndDate personAssignment.position.name personAssignment.position.code personAssignment.grade.id personAssignment.grade.effectiveStartDate personAssignment.grade.effectiveEndDate personAssignment.grade.name personAssignment.grade.code personAssignment.location.id personAssignment.location.effectiveStartDate personAssignment.location.effectiveEndDate personAssignment.location.name personAssignment.location.code personAssignment.location.mainAddress.id personAssignment.location.mainAddress.effectiveStartDate personAssignment.location.mainAddress.effectiveEndDate personAssignment.location.mainAddress.county personAssignment.location.mainAddress.state personAssignment.location.mainAddress.province personAssignment.location.mainAddress.townOrCity personAssignment.location.mainAddress.postalCode personAssignment.location.mainAddress.longPostalCode personAssignment.location.mainAddress.addressLine1 personAssignment.location.mainAddress.addressLine2 personAssignment.location.mainAddress.addressLine3 personAssignment.location.mainAddress.addressLine4 personAssignment.location.mainAddress.country.territoryCode personAssignment.location.mainAddress.country.territoryShortName personAssignment.job.id personAssignment.job.effectiveStartDate personAssignment.job.effectiveEndDate personAssignment.job.name personAssignment.job.code personAssignment.job.jobFunctionCode personAssignment.job.managerLevel personAssignment.job.jobFamily.id personAssignment.job.jobFamily.effectiveStartDate personAssignment.job.jobFamily.effectiveEndDate personAssignment.job.jobFamily.code personAssignment.job.jobFamily.name personAssignment.collectiveAgreement.id personAssignment.collectiveAgreement.effectiveStartDate personAssignment.collectiveAgreement.effectiveEndDate personAssignment.collectiveAgreement.name personAssignment.personType.id personAssignment.personType.userPersonType personAssignment.workerUnion.id personAssignment.workerUnion.effectiveStartDate personAssignment.workerUnion.effectiveEndDate personAssignment.workerUnion.name personAssignment.assignmentUserStatus.id personAssignment.assignmentUserStatus.userStatus personAssignment.businessUnit.id personAssignment.businessUnit.effectiveStartDate personAssignment.businessUnit.effectiveEndDate personAssignment.businessUnit.name personAssignment.account.codeCombinationId personAssignment.account.concatenatedSegments personAssignment.account.chartOfAccountsId personAssignment.ledger.ledgerId personAssignment.ledger.name personAssignment.workRelationship.id personAssignment.workRelationship.startDate personAssignment.workRelationship.workerType personAssignment.workRelationship.timeCreated personAssignment.workRelationship.timeUpdated personAssignment.localName.id personAssignment.localName.effectiveStartDate personAssignment.localName.effectiveEndDate personAssignment.localName.lastName personAssignment.localName.firstName personAssignment.localName.displayName personAssignment.localName.listName personAssignment.localName.timeCreated personAssignment.localName.timeUpdated personAssignment.globalName.id personAssignment.globalName.effectiveStartDate personAssignment.globalName.effectiveEndDate personAssignment.globalName.lastName personAssignment.globalName.firstName personAssignment.globalName.displayName personAssignment.globalName.listName personAssignment.globalName.timeCreated personAssignment.globalName.timeUpdated personAssignment.personDetail.id personAssignment.personDetail.personNumber personAssignment.personDetail.effectiveStartDate personAssignment.personDetail.effectiveEndDate personAssignment.personDetail.timeCreated personAssignment.personDetail.timeUpdated |
| nameExtracts | id effectiveStartDate effectiveEndDate lastname firstname middlenames title prefix suffix knownAs previousLastname honors militaryRank displayname fullname listname ordername type timeUpdated updatedBy timeCreated createdBy personDetail.id personDetail.personNumber personDetail.effectiveStartDate personDetail.effectiveEndDate legislation.territoryCode legislation.territoryShortname |
| nationalIdentifierExtracts | ID createdBy expirationDate issueDate identifierNumber placeOfIssue timeCreated timeUpdated updatedBy personDetail.id personDetail.personNumber personDetail.effectiveStartDate personDetail.effectiveEndDate country.territoryCode country.territoryShortName type.lookupCode type.lookupType type.meaning |
| personAddressExtracts | id effectiveStartDate effectiveEndDate type primaryFlag timeCreated timeUpdated createdBy updatedBy building floorNumber townOrCity postalCode longPostalCode addressLine1 addressLine2 addressLine3 addressLine4 county state province country.territoryCode country.territoryShortName personDetail.id personDetail.personNumber personDetail.effectiveStartDate personDetail.effectiveEndDate |
| personAddressHistoryExtracts | id effectiveStartDate effectiveEndDate type primaryFlag timeCreated timeUpdated createdBy updatedBy building floorNumber townOrCity postalCode longPostalCode addressLine1 addressLine2 addressLine3 addressLine4 county state province country.territoryCode country.territoryShortName |
| personTypeExtracts | ID systemPersonType activeFlag defaultFlag timeCreated timeUpdated createdBy updatedBy userPersonType |
| phoneExtracts | ID fromDate toDate phoneNumber areaCode countryCodeNumber 拡張 妥当性 timeUpdated updatedBy timeCreated createdBy primaryFlag personDetail.id personDetail.personNumber personDetail.effectiveStartDate personDetail.effectiveEndDate legislation.territoryCode legislation.territoryShortName type.lookupCode type.lookupType type.meaning |
| workerAssignmentExtracts | id effectiveStartDate effectiveEndDate effectiveSequence effectiveLatestChange assignmentType assignmentNumber primaryFlag businessTitle workAtHomeFlag officeBuilding officeFloor officeMailStop officeNumber primaryAssignmentFlag primaryWorkRelationshipFlag timeUpdated updatedBy timeCreated createdBy systemPersonType labourUnionMemberFlag managerFlag probationEndDate probationPeriod probationPeriodUnit normalHours frequency endTime startTime noticePeriod noticePeriodUOM workerCategory assignmentCategory hourlyPaidOrSalaried projectedEndDate projectedStartDate assignmentStatusType expenseCheckSendToAddress retirementAge retirementDate synchronizeFromPositionFlag fullTimeOrPartTime permanentAssignmentFlag seniorityBasis overtimePeriod adjustedFullTimeEquivalent annualWorkingDuration annualWorkingDurationUnit annualWorkingRatio standardFrequency standardWorkingHours standardAnnualWorkingDuration sequence department.id department.name department.title department.effectiveStartDate department.effectiveEndDate legalEmployer.id legalEmployer.name legalEmployer.effectiveStartDate legalEmployer.effectiveEndDate legislation.territoryCode legislation.territoryShortName position.id position.ffectiveStartDate position.effectiveEndDate position.name position.code grade.id grade.effectiveStartDate grade.effectiveEndDate grade.name grade.code location.id location.effectiveStartDate location.effectiveEndDate location.name location.code location.mainAddress.id location.mainAddress.effectiveStartDate location.mainAddress.effectiveEndDate location.mainAddress.county location.mainAddress.state location.mainAddress.province location.mainAddress.townOrCity location.mainAddress.postalCode location.mainAddress.longPostalCode location.mainAddress.addressLine1 location.mainAddress.addressLine2 location.mainAddress.addressLine3 location.mainAddress.addressLine4 location.mainAddress.country.territoryCode location.mainAddress.country.territoryShortName job.id job.effectiveStartDate job.effectiveEndDate job.name job.code job.jobFunctionCode job.managerLevel job.jobFamily.id job.jobFamily.effectiveStartDate job.jobFamily.effectiveEndDate job.jobFamily.code job.jobFamily.name collectiveAgreement.id collectiveAgreement.effectiveStartDate collectiveAgreement.effectiveEndDate collectiveAgreement.name personType.id personType.userPersonType workerUnion.id workerUnion.effectiveStartDate workerUnion.effectiveEndDate workerUnion.name assignmentUserStatus.id assignmentUserStatus.userStatus businessUnit.id businessUnit.effectiveStartDate businessUnit.effectiveEndDate businessUnit.name account.codeCombinationId account.concatenatedSegments account.chartOfAccountsId ledger.ledgerId ledger.name workRelationship.id workRelationship.startDate workRelationship.workerType workRelationship.timeCreated workRelationship.timeUpdated localName.id localName.effectiveStartDate localName.effectiveEndDate localName.lastName localName.firstName localName.displayName localName.listName localName.timeCreated localName.timeUpdated globalName.id globalName.effectiveStartDate globalName.effectiveEndDate globalName.lastName globalName.firstName globalName.displayName globalName.listName globalName.timeCreated globalName.timeUpdated personDetail.id personDetail.personNumber personDetail.effectiveStartDate personDetail.effectiveEndDate personDetail.timeCreated personDetail.timeUpdated |
| workerAssignmentHistoryExtracts | id effectiveStartDate effectiveEndDate effectiveSequence effectiveLatestChange assignmentType assignmentNumber primaryFlag businessTitle workAtHomeFlag officeBuilding officeFloor officeMailStop officeNumber primaryAssignmentFlag primaryWorkRelationshipFlag timeUpdated updatedBy timeCreated createdBy systemPersonType labourUnionMemberFlag managerFlag probationEndDate probationPeriod probationPeriodUnit normalHours frequency endTime startTime noticePeriod noticePeriodUOM workerCategory assignmentCategory hourlyPaidOrSalaried projectedEndDate projectedStartDate assignmentStatusType expenseCheckSendToAddress retirementAge retirementDate synchronizeFromPositionFlag fullTimeOrPartTime permanentAssignmentFlag seniorityBasis overtimePeriod adjustedFullTimeEquivalent annualWorkingDuration annualWorkingDurationUnit annualWorkingRatio standardFrequency standardWorkingHours standardAnnualWorkingDuration sequence department.id legalEmployer.id legislation.territoryCode legislation.territoryShortName position.id grade.id location.id location.mainAddress.id location.mainAddress.country.territoryCode location.mainAddress.country.territoryShortName job.id job.jobFamily.id collectiveAgreement.id personType.id personType.userPersonType workerUnion.id assignmentUserStatus.id assignmentUserStatus.userStatus businessUnit.id account.codeCombinationId account.concatenatedSegments account.chartOfAccountsId ledger.ledgerId ledger.name workRelationship.id localName.id globalName.id personDetail.id personDetail.personNumber |
| workRelationshipExtracts | id startDate workerType timeCreated timeUpdated workerNumber primaryFlag createdBy updatedBy readyToConvertFlag enterpriseSeniorityDate legalEmployerSeniorityDate onMilitaryServiceFlag lastWorkingDate terminationDate notificationDate projectedTerminationDate legalEmployer.id legalEmployer.name legalEmployer.effectiveStartDate legalEmployer.effectiveEndDate legislation.territoryCode legislation.territoryShortName personDetail.id personDetail.personNumber personDetail.effectiveStartDate personDetail.effectiveEndDate |
グローバルHR - ワーク・ストラクチャ
| モジュール名 | oraHcmHrCoreWorkStructures |
|---|---|
| モジュール・コンテキスト・パス | hcmHrCore/workStructures |
| ビュー名 | 属性 |
|---|---|
| gradeExtracts | id createdBy effectiveStartDate effectiveEndDate code timeCreated timeUpdated updatedBy status name |
| gradeHistoryExtracts | id createdBy effectiveStartDate effectiveEndDate code timeCreated timeUpdated updatedBy status name |
| jobExtracts | id name effectiveStartDate effectiveEndDate code status createdBy timeCreated updatedBy timeUpdated |
| jobFamilyExtracts | ID コード 名 effectiveStartDate effectiveEndDate ステータス timeUpdated updatedBy timeCreated createdBy |
| jobFamilyHistoryExtracts | ID コード 名 effectiveStartDate effectiveEndDate ステータス timeUpdated updatedBy timeCreated createdBy |
| jobHistoryExtracts | id name effectiveStartDate effectiveEndDate code status createdBy timeCreated updatedBy timeUpdated |
| locationExtracts | id createdBy effectiveStartDate effectiveEndDate code timeCreated timeUpdated updatedBy status countryCode employeeLocationFlag shipToSiteFlag receivingSiteFlag billToSiteFlag officeSiteFlag detailCreatedBy detailTimeCreated detailUpdatedBy detailTimeUpdated timezoneCode 説明 名前 |
| locationHistoryExtracts | id createdBy effectiveStartDate effectiveEndDate code timeCreated timeUpdated updatedBy status countryCode employeeLocationFlag shipToSiteFlag receivingSiteFlag billToSiteFlag officeSiteFlag detailCreatedBy detailTimeCreated detailUpdatedBy detailTimeUpdated timezoneCode 説明 名前 |
| positionExtracts | id effectiveStartDate effectiveEndDate code status hiringStatus createdBy timeCreated updatedBy timeUpdated name |
| positionHistoryExtracts | id effectiveStartDate effectiveEndDate code status hiringStatus createdBy timeCreated updatedBy timeUpdated name |
HCM共通- イベント
| モジュール名 | oraHcmHrCoreEvents |
|---|---|
| モジュール・コンテキスト・パス | hcmHrCore/events |
| ビュー名 | 属性 |
|---|---|
| objectChangeExtracts | id sourceObjectName groupSequence operationType dateEffectiveMode effectiveDate keyAttribute1Name keyAttribute1DataType keyAttribute1StringValue keyAttribute1NumberValue keyAttribute1DateValue keyAttribute2Name keyAttribute2DataType keyAttribute2StringValue keyAttribute2NumberValue keyAttribute2DateValue keyAttribute3Name keyAttribute3DataType keyAttribute3StringValue keyAttribute3NumberValue keyAttribute3DateValue purgeDate createdBy timeCreated updatedBy timeUpdated changeComponents.id changeComponents.physicalType changeComponents.logicalType changeComponents.oldEffectiveStartDate changeComponents.newEffectiveStartDate changeComponents.oldEffectiveEndDate changeComponents.newEffectiveEndDate changeComponents.oldEffectiveSequence changeComponents.newEffectiveSequence changeComponents.createdBy changeComponents.timeCreated changeComponents.updatedBy changeComponents.timeUpdated changeComponents.changedAttributes.changedAttributesXml |
タスク2: 抽出問合せの準備およびテスト
各抽出ビューには、抽出問合せを作成およびテストできる問合せAPIがあります。
| URL | /api/boss/data/objects/ora/{{moduleContextPath}}/v1/{{viewName}}/$query |
|---|---|
| HTTPメソッド | POST |
| 要求テンプレート |
{
"collection": {
"limit": {{limit}},
"offset": {{offset}},
"sortBy": [ {{sortAttributes}} ],
"filter": "{{topLevelFilter}}"
},
"fields": [ {{topLevelAttributes}} ],
"accessors": {
"{{childObject}}": {
"collection": {
"filter": "{{childLevelFilter}}"
},
"fields": [ {{childLevelAttributes}} ],
"accessors": {
{{nestedChildAccessors}}
}
},
...
}
}
|
| 応答テンプレート |
200 OK
{
"items": [
{{items}}
],
"hasMore": {{hasMore}}
}
|
オブジェクトおよび属性
抽出するデータ(含めるオブジェクトおよび属性)を定義します。子オブジェクトを含めるには、アクセッサを追加する必要がありますが、特定のフィールドを含めるには、fields配列にリストする必要があります。完全な例を参照してください。
フィルタリング
データのフィルタ方法を定義します。次の式を使用して、問合せのフィルタを作成できます。
| 目 的 | 正規表現 | 例 |
|---|---|---|
| 等価性テスト | field = value |
ename = 'KING' |
| 不等式テスト | field != value |
activeFlag != true |
| テストより大きい テストより小さい |
field > value |
sal > 1999.99 |
| より大きいテストまたは等しいテスト より小さいテストまたは等しいテスト |
field >= value |
sal >= 1999.99 |
| パターンマッチング | field LIKE 'pattern' |
job LIKE 'SALES%' |
| メンバーシップ・テスト | field IN (value1, ..., valueN) |
deptno IN (10, 20, 40) |
| 大文字と小文字を区別しない比較 | field ~= value |
ename ~= 'king' |
| 存在テスト(1対多関係の場合) | child[expression] |
assignments[startDate = null] |
| 論理積 | expression AND expression |
|
| 論理和 | expression OR expression |
|
| 論理否定 | !(expression) |
1対1関係での子オブジェクトによるフィルタリング:
1対1の関係の場合、他の親オブジェクトの属性(legalEmployer.id in (1001, 1002)など)と同様に、フィルタ句で子オブジェクトとその属性を参照できます。
1対多関係での子オブジェクトのフィルタリング:
複数アクセッサ名で示される1対多の関係がまれに、前述の表の存在テストでは、基準を満たす少なくとも1人の子を持つ親がフィルタされます。ただし、子レコードが取得されても、自動的にフィルタされるわけではありません。基準を満たす子レコードのみを取得する場合は、子レベルでもフィルタを繰り返す必要があります。たとえば、物理タイプUPDATEの変更コンポーネントのみを取得する場合は、オブジェクト変更問合せで次のフィルタを適用する必要があります。
{
"collection": {
"filter": "changeComponents[physicalType = 'UPDATE']"
},
"accessors": {
"changeComponents": {
"collection": {
"filter": "physicalType = 'UPDATE'"
},
...
有効日によるフィルタリング:
有効日オブジェクトの場合、デフォルトで現在の日付時点で有効なデータが取得されます。特定の日付時点で有効なデータを取得するには、$effectiveDate HTTP問合せパラメータを使用します。
たとえば、2023-01-01時点で有効なデータを取得する場合は、問合せに次のURLを使用します。
/api/boss/data/objects/ora/hcmHrCore/employment/v1/{{viewPath}}/$query?$effectiveDate=2023-01-01
ソート
データのソート方法を定義します。ソートは、ソート方向(昇順または降順)を含むソート属性の配列で表されます。たとえば:
"sortBy": [
{
"totalAmount": "desc"
},
{
"paidAmount": "asc"
}
]
ページング
データのページ区切り方法を定義します。クライアントは、制限およびオフセット・パラメータを指定してページングを制御できます。たとえば:
"limit": 200, "offset": 400
デフォルトの制限は25で、最大制限は1000です。
デフォルトのオフセットは0で、結果の先頭を示します。
レスポンスの最上位のhasMore属性は、フェッチする結果がさらにあるかどうかを示します。
ページ区切りは、データを抽出する別の方法として使用しないでください。このAPIを問い合せる場合、リクエスト間でデータが変更されないという保証はありません。データ抽出には非同期APIを使用します。
例
次の抽出問合せの例は、雇用主および部門の詳細とともにアサイメント情報を取得するように設計されています。
- プライマリ・アサイメント
- 従業員タイプ
- IDが
10001および10002の雇用主に属しません - 抽出日時点で有効
- 前回の実行以降に更新(または作成)されました
リクエストの例
前の抽出実行のタイムスタンプを持つlimitパラメータおよびtimeUpdated属性条件に注意してください。
POST /api/boss/data/objects/ora/hcmHrCore/employment/v1/workerAssignmentExtracts/$query
{
"collection": {
"limit": 10,
"filter": "primaryFlag = true and timeUpdated > '2025-05-01T00:00:00Z' and assignmentType = 'E' and !(legalEmployer.id in (10001, 10002))"
},
"fields": [ "id", "assignmentType", "assignmentStatusType", "effectiveStartDate", "effectiveEndDate", "businessTitle", "workAtHomeFlag", "assignmentNumber", "timeUpdated" ],
"accessors": {
"personDetail": {
"fields": [ "personNumber" ]
},
"globalName": {
"fields": [ "firstName", "lastName" ]
},
"department": {
"fields": [ "id", "name", "title" ]
},
"legalEmployer": {
"fields": [ "id", "name" ]
},
"workRelationship": {
"fields": [ "id" ]
}
}
}
レスポンスの例
200 OK
{
"items": [
{
"id": "300000795682243",
"assignmentType": "E",
"assignmentStatusType": "ACTIVE",
"effectiveStartDate": "2018-06-14",
"effectiveEndDate": "4712-12-31",
"businessTitle": "Aeronautical Engineer Level-9352",
"workAtHomeFlag": false,
"assignmentNumber": "EHDLWorker_190903_1637",
"timeUpdated": "2025-05-06T11:42:17.821Z",
"$id": "300000795682243",
"$context": {
"etag": "89"
},
"personDetail": {
"personNumber": "HDLWorker_190903_1637",
"$id": "100000329366771",
"$context": {
"etag": ""
}
},
"globalName": {
"firstName": "Raymond-Olivier",
"lastName": "Beer-Tröst",
"$id": "300000795668871",
"$context": {
"etag": ""
}
},
"department": {
"id": "300000044556980",
"name": "South - Venaria DC-GROUP/SFIELESOIT74155",
"title": null,
"$id": "300000044556980",
"$context": {
"etag": "13",
"links": {
"$self": {
"href": "https://example.com/api/boss/data/objects/ora/hcmHrCore/workStructures/v1/departments/300000044556980?$effectiveDate=2025-05-13"
}
}
}
},
"legalEmployer": {
"id": "300000046740247",
"name": "PSR_US_LE_1",
"$id": "300000046740247",
"$context": {
"etag": "15",
"links": {
"$self": {
"href": "https://example.com/api/boss/data/objects/ora/hcmHrCore/workStructures/v1/legalEmployers/300000046740247?$effectiveDate=2025-05-13"
}
}
}
},
"workRelationship": {
"id": "100000329414679",
"$id": "100000329414679",
"$context": {
"etag": "1"
}
}
},
{
"id": "300000795670049",
"assignmentType": "E",
"assignmentStatusType": "ACTIVE",
"effectiveStartDate": "2018-05-28",
"effectiveEndDate": "4712-12-31",
"businessTitle": "Civil Engineer-6864",
"workAtHomeFlag": false,
"assignmentNumber": "EHDLWorker_190903_11128",
"timeUpdated": "2025-05-06T11:42:25.787Z",
"$id": "300000795670049",
"$context": {
"etag": "89"
},
"personDetail": {
"personNumber": "HDLWorker_190903_11128",
"$id": "100000329383875",
"$context": {
"etag": ""
}
},
"globalName": {
"firstName": "Charlotte-Pénélope",
"lastName": "Beer-Tröst",
"$id": "300000795669677",
"$context": {
"etag": ""
}
},
"department": {
"id": "300000044582197",
"name": "Human Resources-GROUP/AT081000101",
"title": null,
"$id": "300000044582197",
"$context": {
"etag": "13",
"links": {
"$self": {
"href": "https://example.com/api/boss/data/objects/ora/hcmHrCore/workStructures/v1/departments/300000044582197?$effectiveDate=2025-05-13"
}
}
}
},
"legalEmployer": {
"id": "300000046740247",
"name": "PSR_US_LE_1",
"$id": "300000046740247",
"$context": {
"etag": "15",
"links": {
"$self": {
"href": "https://example.com/api/boss/data/objects/ora/hcmHrCore/workStructures/v1/legalEmployers/300000046740247?$effectiveDate=2025-05-13"
}
}
}
},
"workRelationship": {
"id": "100000329453488",
"$id": "100000329453488",
"$context": {
"etag": "1"
}
}
},
...
],
"hasMore": true
}
タスク3: 抽出ジョブ要求の発行
問合せを定義したら、ジョブ・スケジューラAPIを使用して抽出ジョブ・リクエストを発行できます。
| URL | /api/saas-batch/jobscheduler/v1/jobRequests |
|---|---|
| HTTPメソッド | POST |
| 要求テンプレート |
{
"jobDefinitionName": "AsyncDataExtraction",
"serviceName": "boss",
"requestParameters": {
"boss.module": "{{moduleName}}",
"boss.resource.name": "{{viewName}}",
"boss.resource.version": "v1",
"boss.outputFormat": "json",
"boss.request.system.param.effectiveDate": "{{effectiveDate}}",
"boss.advancedQuery": "{{query}}"
}
}
|
| 応答テンプレート |
正常に発行されると、 202 Accepted
Location: {{jobRequestUrl}}
|
データの抽出時のページング:
ページ区切りコントロール(limitおよびoffsetパラメータ)を使用したことがありますが、問合せを作成およびテストするときに、抽出結果を制約する必要はありません。問合せの発行時に、limitおよびoffsetパラメータの使用方法をすべて削除します。
問合せを渡す:
抽出ジョブ・リクエストの発行時に渡される問合せは、標準のJSON文字列の形式である必要があります。$query APIエンドポイントを使用して準備およびテストした問合せを実行し、次のようにします。
- すべての二重引用符("→\")をエスケープします
- 改行文字を削除します(\n)
- 他の空白(インデントなど)を減らす可能性があります。
全体として、次に例を示します。
{
"collection": {
"limit": 100,
"filter": "totalAmount > 10000"
},
"fields": [ "id", "totalAmount" ]
}
目的:
{\"collection\": {\"filter\": \"totalAmount > 10000\"},\"fields\": [ \"id\", \"totalAmount\" ]}
例
リクエストの例
POST /api/saas-batch/jobscheduler/v1/jobRequests
{
"jobDefinitionName": "AsyncDataExtraction",
"serviceName": "boss",
"requestParameters": {
"boss.module": "oraHcmHrCoreEmployment",
"boss.resource.name": "workerAssignmentExtracts",
"boss.resource.version": "v1",
"boss.outputFormat": "json",
"boss.advancedQuery": "{\"collection\": {\"filter\": \"primaryFlag = true and timeUpdated > '2025-05-01T00:00:00Z' and assignmentType = 'E' and !(legalEmployer.id in (10001, 10002))\"},\"fields\": [ \"id\", \"assignmentType\", \"assignmentStatusType\", \"effectiveStartDate\", \"effectiveEndDate\", \"businessTitle\", \"workAtHomeFlag\", \"assignmentNumber\", \"timeUpdated\" ],\"accessors\": {\"personDetail\": {\"fields\": [ \"personNumber\" ]},\"globalName\": {\"fields\": [ \"firstName\", \"lastName\" ]},\"department\": {\"fields\": [ \"id\", \"name\", \"title\" ]},\"legalEmployer\": {\"fields\": [ \"id\", \"name\" ]},\"workRelationship\": {\"fields\": [ \"id\" ]}}}"
}
}
レスポンスの例
202 Accepted Location: https://example.com/api/saas-batch/jobscheduler/v1/jobRequests/42075
タスク4: ジョブ完了の確認
完了をチェックするには、ジョブ・スケジューラAPIを使用して、ジョブ・リクエストの詳細を定期的にポーリングします(ジョブ・スケジューラAPIが正常に完了するか失敗するまで)。
| URL | /api/saas-batch/jobscheduler/v1/jobRequests/{{jobRequestId}} |
|---|---|
| HTTPメソッド | GET |
正常終了:
ジョブ・リクエストは、次の条件を満たすと正常に完了したとみなされます。| 属性 | 予想値 |
|---|---|
jobDetails.jobProgress.completed |
true |
jobDetails.jobProgress.status |
SUCCEEDED |
完了失敗:
次の条件が満たされると、ジョブ・リクエストは失敗したとみなされます。このような場合、jobDetails.jobProgress.message属性にはエラー・メッセージが含まれます。
| 属性 | 予想値 |
|---|---|
jobDetails.jobProgress.status |
FAILED |
例
リクエストの例
GET /api/saas-batch/jobscheduler/v1/jobRequests/42075
レスポンスの例
次の応答は、発行済ジョブの様々なステージを示します。特に、jobProgress.statusおよびjobProgress.completed属性を参照してください。
受入済/エンキュー済
200 OK
{
"jobDetails": {
"jobRequestId": 42075,
"jobRequest": {
"jobDefinitionName": "AsyncDataExtraction",
"serviceName": "boss",
"systemDerivedVersion": "90",
"jobSubmitter": "TM-MFITZIMMONS",
"requestParameters": {
"boss.module": "oraHcmHrCoreEmployment",
"boss.resource.name": "workerAssignmentExtracts",
"boss.resource.version": "v1",
"boss.outputFormat": "json",
"boss.advancedQuery": "{\"collection\": {\"filter\": \"primaryFlag = true and timeUpdated > '2025-05-01T00:00:00Z' and assignmentType = 'E' and !(legalEmployer.id in (10001, 10002))\"},\"fields\": [ \"id\", \"assignmentType\", \"assignmentStatusType\", \"effectiveStartDate\", \"effectiveEndDate\", \"businessTitle\", \"workAtHomeFlag\", \"assignmentNumber\", \"timeUpdated\" ],\"accessors\": {\"personDetail\": {\"fields\": [ \"personNumber\" ]},\"globalName\": {\"fields\": [ \"firstName\", \"lastName\" ]},\"department\": {\"fields\": [ \"id\", \"name\", \"title\" ]},\"legalEmployer\": {\"fields\": [ \"id\", \"name\" ]},\"workRelationship\": {\"fields\": [ \"id\" ]}}}"
},
"jobRetryNumber": 0,
"timeoutThreshold": 14400
},
"jobStatus": "ENQUEUED",
"jobProgress": {
"status": "ACCEPTED",
"message": "Job is submitted",
"startTime": "2025-05-25T13:39:01Z",
"endTime": "2025-05-25T13:39:15Z",
"completedPercentage": "0",
"completed": false
}
},
"$context": {
"links": {
"$self": {
"href": "https://example.com/api/saas-batch/jobscheduler/v1/jobRequests/42075"
}
}
}
}
Running
200 OK
{
"jobDetails": {
"jobRequestId": 42075,
"jobRequest": {
"jobDefinitionName": "AsyncDataExtraction",
"serviceName": "boss",
"systemDerivedVersion": "90",
"jobSubmitter": "TM-MFITZIMMONS",
"requestParameters": {
"boss.module": "oraHcmHrCoreEmployment",
"boss.resource.name": "workerAssignmentExtracts",
"boss.resource.version": "v1",
"boss.outputFormat": "json",
"boss.advancedQuery": "{\"collection\": {\"filter\": \"primaryFlag = true and timeUpdated > '2025-05-01T00:00:00Z' and assignmentType = 'E' and !(legalEmployer.id in (10001, 10002))\"},\"fields\": [ \"id\", \"assignmentType\", \"assignmentStatusType\", \"effectiveStartDate\", \"effectiveEndDate\", \"businessTitle\", \"workAtHomeFlag\", \"assignmentNumber\", \"timeUpdated\" ],\"accessors\": {\"personDetail\": {\"fields\": [ \"personNumber\" ]},\"globalName\": {\"fields\": [ \"firstName\", \"lastName\" ]},\"department\": {\"fields\": [ \"id\", \"name\", \"title\" ]},\"legalEmployer\": {\"fields\": [ \"id\", \"name\" ]},\"workRelationship\": {\"fields\": [ \"id\" ]}}}"
},
"jobRetryNumber": 0,
"timeoutThreshold": 14400
},
"jobStatus": "RUNNING",
"jobProgress": {
"jobRequestId": 42075,
"status": "RUNNING",
"message": "Job status is changed to RUNNING",
"startTime": "2025-05-25T13:39:27Z",
"endTime": "2025-05-25T13:40:25Z",
"completedPercentage": "50",
"completed": false
}
},
"$context": {
"links": {
"$self": {
"href": "https://example.com/api/saas-batch/jobscheduler/v1/jobRequests/42075"
}
}
}
}
200 OK
{
"jobDetails": {
"jobRequestId": 42075,
"jobRequest": {
"jobDefinitionName": "AsyncDataExtraction",
"serviceName": "boss",
"systemDerivedVersion": "90",
"jobSubmitter": "TM-MFITZIMMONS",
"requestParameters": {
"boss.module": "oraHcmHrCoreEmployment",
"boss.resource.name": "workerAssignmentExtracts",
"boss.resource.version": "v1",
"boss.outputFormat": "json",
"boss.advancedQuery": "{\"collection\": {\"filter\": \"primaryFlag = true and timeUpdated > '2025-05-01T00:00:00Z' and assignmentType = 'E' and !(legalEmployer.id in (10001, 10002))\"},\"fields\": [ \"id\", \"assignmentType\", \"assignmentStatusType\", \"effectiveStartDate\", \"effectiveEndDate\", \"businessTitle\", \"workAtHomeFlag\", \"assignmentNumber\", \"timeUpdated\" ],\"accessors\": {\"personDetail\": {\"fields\": [ \"personNumber\" ]},\"globalName\": {\"fields\": [ \"firstName\", \"lastName\" ]},\"department\": {\"fields\": [ \"id\", \"name\", \"title\" ]},\"legalEmployer\": {\"fields\": [ \"id\", \"name\" ]},\"workRelationship\": {\"fields\": [ \"id\" ]}}}"
},
"jobRetryNumber": 0,
"timeoutThreshold": 14400
},
"jobStatus": "RUNNING",
"jobProgress": {
"jobRequestId": 42075,
"status": "RUNNING",
"message": "Publishing BOSS job progress: JobProgress(jobRequestId=42075, resourcePath=oraHcmHrCoreEmployment/v1/workers, dataDocName=null, deploymentId=null, jobStatus=RUNNING, startTime=2025-05-25T13:40:18Z, endTime=2025-05-25T13:40:38Z, completedPercentage=30, completed=false, error=null)",
"startTime": "2025-05-25T13:40:40Z",
"endTime": "2025-05-25T13:40:40Z",
"completedPercentage": "30",
"completed": false
}
},
"$context": {
"links": {
"$self": {
"href": "https://example.com/api/saas-batch/jobscheduler/v1/jobRequests/42075"
}
}
}
}
正常に終了
200 OK
{
"jobDetails": {
"jobRequestId": 42075,
"jobRequest": {
"jobDefinitionName": "AsyncDataExtraction",
"serviceName": "boss",
"systemDerivedVersion": "90",
"jobSubmitter": "TM-MFITZIMMONS",
"requestParameters": {
"boss.module": "oraHcmHrCoreEmployment",
"boss.resource.name": "workerAssignmentExtracts",
"boss.resource.version": "v1",
"boss.outputFormat": "json",
"boss.advancedQuery": "{\"collection\": {\"filter\": \"primaryFlag = true and timeUpdated > '2025-05-01T00:00:00Z' and assignmentType = 'E' and !(legalEmployer.id in (10001, 10002))\"},\"fields\": [ \"id\", \"assignmentType\", \"assignmentStatusType\", \"effectiveStartDate\", \"effectiveEndDate\", \"businessTitle\", \"workAtHomeFlag\", \"assignmentNumber\", \"timeUpdated\" ],\"accessors\": {\"personDetail\": {\"fields\": [ \"personNumber\" ]},\"globalName\": {\"fields\": [ \"firstName\", \"lastName\" ]},\"department\": {\"fields\": [ \"id\", \"name\", \"title\" ]},\"legalEmployer\": {\"fields\": [ \"id\", \"name\" ]},\"workRelationship\": {\"fields\": [ \"id\" ]}}}"
},
"jobRetryNumber": 0,
"timeoutThreshold": 14400
},
"jobStatus": "SUCCEEDED",
"jobProgress": {
"jobRequestId": 42075,
"status": "SUCCEEDED",
"message": "Job status is changed to SUCCEEDED",
"startTime": "2025-05-25T13:39:27Z",
"endTime": "2025-05-25T13:41:26Z",
"completedPercentage": "100",
"completed": true
}
},
"$context": {
"links": {
"$self": {
"href": "https://example.com/api/saas-batch/jobscheduler/v1/jobRequests/42075"
}
}
}
}
タスク5: 抽出出力詳細のフェッチ
ジョブが正常に完了すると、その出力ファイル情報をフェッチできます。これには、特定の抽出ジョブ・リクエスト・インスタンスに対してジョブ・ファイル・マネージャAPIの使用が含まれます。
出力は圧縮チャンクに格納されます。
| URL | /api/saas-batch/jobfilemanager/v1/jobRequests/{{jobRequestId}}/outputFiles |
|---|---|
| HTTPメソッド | GET |
ファイル・サイズ:
ファイル・サイズは、items.fileSizeレスポンス属性で返され、バイト単位で表されます。
エンクロージャーのリンク:
実際のファイル・コンテンツへのURLは、items.$context.links.enclosureレスポンス属性で返されます。
例
リクエストの例
GET /api/saas-batch/jobfilemanager/v1/jobRequests/42075/outputFiles
レスポンスの例
次の例では、完全な出力が2つの圧縮ファイルに格納されます。
200 OK
{
"items": [
{
"fileName": "result_1_json.zip",
"fileSize": 9390419,
"timeCreated": "2025-04-22T22:04:22.667Z",
"$context": {
"links": {
"enclosure": {
"href": "https://example.com/api/saas-batch/jobfilemanager/v1/jobRequests/40071/outputFiles/result_1_json.zip/content"
},
"$self": {
"href": "https://example.com/api/saas-batch/jobfilemanager/v1/jobRequests/40071/outputFiles/result_1_json.zip"
}
}
}
},
{
"fileName": "result_2_json.zip",
"fileSize": 4462724,
"timeCreated": "2025-04-22T22:04:36.565Z",
"$context": {
"links": {
"enclosure": {
"href": "https://example.com/api/saas-batch/jobfilemanager/v1/jobRequests/40071/outputFiles/result_2_json.zip/content"
},
"$self": {
"href": "https://example.com/api/saas-batch/jobfilemanager/v1/jobRequests/40071/outputFiles/result_2_json.zip"
}
}
}
}
],
"totalItems": 2,
"$context": {
"links": {
"$self": {
"href": "https://example.com/api/saas-batch/jobfilemanager/v1/jobRequests/40071/outputFiles"
}
}
}
}
タスク6: 抽出出力のダウンロード
最後に、抽出出力ファイルは、特定の抽出ジョブ・リクエスト・インスタンスおよび出力ファイルのジョブ・ファイル・マネージャAPIを使用してダウンロードできます。
| URL | /api/saas-batch/jobfilemanager/v1/jobRequests/{{jobRequestId}}/outputFiles/{{fileName}}/content |
|---|---|
| HTTPメソッド | GET |
ヒント :
必要に応じて、次のようにRange HTTPヘッダーを使用してマルチスレッド・ダウンロードを実装することで、大きなファイルをより効率的にダウンロードできます。Range: {{startByte}}-{{endByte}}/{{fileSize}}
例
リクエストの例
GET /api/saas-batch/jobfilemanager/v1/jobRequests/42075/outputFiles/result_42075.json/content
レスポンスの例
実際のレスポンスはバイナリ圧縮ファイルの内容です。圧縮解除すると、抽出問合せの完全または部分的な結果(Rangeヘッダー使用の場合)、フォーマットされていないJSONペイロードになります(ファイル・チャンクの場合)。
完全非圧縮結果の例
{"items": [
{"id":"300008335145001","assignmentType":"E","assignmentStatusType":"ACTIVE","effectiveStartDate":"2025-05-02","effectiveEndDate":"4712-12-31","businessTitle":"E7356262523","workAtHomeFlag":false,"assignmentNumber":"E7356262523","timeUpdated":"2025-05-01T07:53:15.722Z","$id":"300008335145001","$context":{"etag":"1"},"personDetail":{"personNumber":"7356262523","$id":"300008335144985","$context":{"etag":""}},"globalName":{"firstName":null,"lastName":"oracle","$id":"300008335144986","$context":{"etag":""}},"department":null,"legalEmployer":{"id":"300001939234024","name":"AORT Oracle United States","$id":"300001939234024","$context":{"etag":"6","links":{"$self":{"href":"/ora/hcmHrCore/workStructures/v1/$en-US/legalEmployers/300001939234024?$effectiveDate=2025-05-13"}}}},"workRelationship":{"id":"300008335144995","$id":"300008335144995","$context":{"etag":"1"}}},
{"id":"300000310085281","assignmentType":"E","assignmentStatusType":"ACTIVE","effectiveStartDate":"2018-03-04","effectiveEndDate":"4712-12-31","businessTitle":"Medical Technologist Corporate Level-35321","workAtHomeFlag":false,"assignmentNumber":"EHDLWorker_190409_467490","timeUpdated":"2025-05-07T15:29:46.59Z","$id":"300000310085281","$context":{"etag":"90"},"personDetail":{"personNumber":"HDLWorker_190409_467490","$id":"100000127293313","$context":{"etag":""}},"globalName":{"firstName":"Martin-David","lastName":"Oestrovsky-Krein","$id":"300000310075057","$context":{"etag":""}},"department":{"id":"300000041568062","name":"GFIN Global Controlling-GROUP/GFINGC74155","title":null,"$id":"300000041568062","$context":{"etag":"13","links":{"$self":{"href":"/ora/hcmHrCore/workStructures/v1/$en-US/departments/300000041568062?$effectiveDate=2025-05-13"}}}},"legalEmployer":{"id":"300000046740247","name":"PSR_US_LE_1","$id":"300000046740247","$context":{"etag":"15","links":{"$self":{"href":"/ora/hcmHrCore/workStructures/v1/$en-US/legalEmployers/300000046740247?$effectiveDate=2025-05-13"}}}},"workRelationship":{"id":"100000127362395","$id":"100000127362395","$context":{"etag":"1"}}}
]}
その他の学習リソース
docs.oracle.com/learnで他のラボを確認するか、Oracle Learning YouTubeチャネルで無料のラーニング・コンテンツにアクセスしてください。また、education.oracle.com/learning-explorerにアクセスして、Oracle Learning Explorerになります。
製品ドキュメントについては、Oracle Help Centerを参照してください。