Search Results qa_sampling_custom_rules_u1




Overview

QA.QA_SAMPLING_CUSTOM_RULES is a transactional configuration table in the Oracle E-Business Suite Quality (QA) schema that stores user-defined sampling rules. Its purpose is to allow quality organizations to override the application's default or predefined sampling logic with customer-specific lot-size-to-sample-size mappings. Each row defines a tier for a given sampling plan: a lot size band bounded by MIN_LOT_SIZE and MAX_LOT_SIZE, together with the SAMPLE_SIZE that should be drawn when an incoming lot falls inside that band. This gives implementers a declarative mechanism for enforcing sampling policies that reflect contractual, regulatory, or internal quality standards, without modifying seeded sampling definitions.

The table resides in the APPS_TS_TX_DATA tablespace with PCT FREE 10, and its indexes reside in APPS_TS_TX_IDX, consistent with standard EBS transactional data placement. Based on the foreign key relationship to QA_SAMPLING_PLANS and the absence of outgoing references beyond that parent, the object is best characterized in a Data Vault modeling sense as satellite-leaning: it carries descriptive, attribute-bearing detail (the lot size bands and sample sizes) attached to a parent sampling plan hub, rather than acting as an independent hub or a pure many-to-many link.

Key Information Stored

  • RULE_ID — Numeric primary key and surrogate identifier for each custom rule. It is the column of the unique index QA_SAMPLING_CUSTOM_RULES_U1, which is the documented business-key candidate and the object name the user searched for.
  • SAMPLING_PLAN_ID — Foreign key to QA_SAMPLING_PLANS. This is the parent association that ties each rule tier to a specific sampling plan. It is indexed non-uniquely by QA_SAMPLING_CUSTOM_RULES_N1, reflecting the one-to-many nature of plan-to-rule relationships.
  • MIN_LOT_SIZE — Lower bound of the lot size range to which the rule applies. Together with the maximum, it establishes the band width.
  • MAX_LOT_SIZE — Upper bound of the lot size range. A query or concurrent process matches a lot's quantity against the interval [MIN_LOT_SIZE, MAX_LOT_SIZE] to select the applicable rule.
  • SAMPLE_SIZE — The number of units to be sampled when the lot quantity falls within the defined band. This is the operative value consumed by sampling logic at inspection time.
  • WHO columnsLAST_UPDATE_DATE, LAST_UPDATED_BY, CREATION_DATE, CREATED_BY, and LAST_UPDATE_LOGIN provide standard Oracle EBS auditability, enabling administrators to trace rule creation and modification history.

The primary key RULE_ID is a system-generated surrogate and carries no business meaning; the meaningful business key is effectively the combination of SAMPLING_PLAN_ID with the lot size band boundaries, since overlapping or unordered bands would produce ambiguous sampling behavior.

Common Use Cases and Queries

The most common operational pattern is retrieval of the applicable sample size for a given plan and lot quantity. A representative query is:

  • SELECT sample_size FROM qa.qa_sampling_custom_rules WHERE sampling_plan_id = :p_plan AND :p_lot_qty BETWEEN min_lot_size AND max_lot_size;
  • Reporting on all rules for a plan: SELECT rule_id, min_lot_size, max_lot_size, sample_size FROM qa.qa_sampling_custom_rules WHERE sampling_plan_id = :p_plan ORDER BY min_lot_size;
  • Detecting overlapping or gapped lot size bands within a plan by self-joining on SAMPLING_PLAN_ID and testing interval intersection.
  • Auditing recent changes using LAST_UPDATE_DATE and LAST_UPDATED_BY filtered to a date range.

These queries support inspection setup validation, quality reporting, and data migration verification activities.

Related Objects

  • QA.QA_SAMPLING_PLANS — Parent table referenced via SAMPLING_PLAN_ID; joins supply the plan name and plan-level sampling attributes.
  • QA_SAMPLING_CUSTOM_RULES (APPS synonym/view) — The APPS-layer synonym that exposes the QA table to application code, forms, and reports.
  • QA_SAMPLING_CUSTOM_RULES_U1 — Unique index on RULE_ID, supporting primary key lookups.
  • QA_SAMPLING_CUSTOM_RULES_N1 — Non-unique index on SAMPLING_PLAN_ID, supporting plan-based retrieval.
  • Oracle Quality modules consuming sampling logic — Inspection/collection processing components that read the resolved SAMPLE_SIZE when generating sample records.

Together, these objects form the dependency footprint for custom sampling rule resolution in EBS 12.1.1 and 12.2.2.