Skip to main content

Data Collect Extraction

data_collect_company_hierarchies

ColumnTypeDescription
data_collect_company_hierarchy_idint64Primary key (data_collect_company_hierarchies.id).
tenancy_idint64Tenant owning the hierarchy row.
company_idint64Company the hierarchy applies to.
namestringDisplay name (getName() on the model).
cycle_namestringData collect cycle name (data_collect_cycles.name).
cycle_typestringCycle type field on the cycle.
cycle_periodstringCycle period / year label (dataCollectCycle.cycle — same source as the inventory year in practice).
typestringHierarchy type code (DataCollectCompanyHierarchy.type).
type_ptstringType label in Portuguese (DataCollectCompanyHierarchyTypeEnum::translate).
type_esstringType label in Spanish.
breadcrumbstringFull breadcrumb string (getCompleteBreadcrumb()).
hierarchy_1hierarchy_5stringBreadcrumb split on > (max 5 levels; overflow merged into level 5).
updated_atdateTimeLast update at source.
deleted_atdateTimeSoft delete.

data_collect_task_responsibles

ColumnTypeDescription
data_collect_task_responsible_idint64data_collect_tasks.id (same as the task being described).
filling_user_idsstringFilling responsible user ids (comma-separated, unique).
filling_user_namesstringFilling users’ display names.
filling_usernamesstringFilling users’ login identifiers (email or login).
filling_user_sector_idsstringSector ids for those users in this tenancy (user_sectors).
filling_user_sector_namesstringSector names.
filling_user_partner_idsstringService provider partner ids linked to users.
filling_user_partner_namesstringPartner names.
audit_user_idsstringAudit role — user ids.
audit_user_namesstringAudit user names.
audit_usernamesstringAudit login identifiers.
audit_user_sector_idsstringAudit users’ sector ids (same tenancy scope).
audit_user_sector_namesstringAudit sector names.
audit_user_partner_idsstringAudit partner ids.
audit_user_partner_namesstringAudit partner names.
final_user_idsstringFinal approval user ids.
final_user_namesstringFinal approval names.
legal_user_idsstringLegal role user ids.
legal_user_namesstringLegal role names.
technical_user_idsstringTechnical role user ids.
technical_user_namesstringTechnical role names.
other_user_idsstringOther responsibles — user ids.
other_user_namesstringOther responsibles — names.
updated_atdateTimeLast update of the task.
deleted_atdateTimeSoft delete of the task.

data_collect_tasks

ColumnTypeDescription
data_collect_task_idint64Primary key (data_collect_tasks.id).
business_group_idint64Business group via tenancy.company.
tenancy_idint64Tenant of the task.
confirmed_filling_user_idint64Confirmed filling user (filling_user_id on the task).
confirmed_audit_user_idint64Confirmed audit user (audit_user_id).
taskable_idint64Polymorphic target id (e.g. hierarchy, PGR node, source row).
related_partner_idint64Partner linked to the task context (getAllRelatedPartners()).
taskable_typestringPolymorphic model class name.
statusstringTask status enum value.
namestringTask title / name.
model_namestringHuman-readable model label (getModelName()).
sub_statusstringSub-status (validated enum string).
typestringTask type enum value.
related_partner_cnpjstringPartner tax id (CPF/CNPJ) or '-'.
related_partner_formatted_cpf_cnpjstringPartner tax id formatted.
related_partner_namestringPartner name.
disapproval_reasonstringReason when a step is rejected.
not_answer_justificationstringJustification when the task cannot be answered.
can_not_answerbooleanWhether answering is blocked for the respondent.
is_prioritybooleanPriority flag.
reproved_countint32Count of rejection events.
expected_answer_datedateTimeExpected answer date from PGR cycle (data_collect_finish_at on related PGR cycle).
expected_pgr_release_datedateTimeSame source as expected_answer_date in current mapping (data_collect_finish_at).
expected_pgr_finish_datedateTimeExpected cycle end (cycle_finish_at on PGR cycle).
due_datedateTimeTask due date.
audit_deadline_datedateTimeAudit deadline.
executed_atdateTimeWhen the task was executed / completed by filler.
audit_atdateTimeWhen audited (audited_at).
send_to_audit_atdateTimeWhen sent to audit (sent_to_audit_at).
reproved_atdateTimeLast rejection timestamp.
finished_atdateTimeWhen the task finished fully.
updated_atdateTimeLast update.
deleted_atdateTimeSoft delete.

pgr_document_revision_related_tasks

ColumnTypeDescription
pgr_document_revision_related_task_idint64Child data collect task id (childManuallyDataCollectTasks if parent has name, else childDataCollectTasks).
document_related_data_collect_task_idint64Parent document-revision task id.
updated_atdateTimeParent task’s updated_at.
deleted_atdateTimeParent task’s deleted_at.

pgr_wastes

ColumnTypeDescription
pgr_waste_idint64Primary key (pgr_treatment_answers.id).
data_collect_task_idint64Owning task via pgrCycleWasteAnswer.data_collect_task_id.
waste_idint64Waste catalog id.
waste_treatment_idint64Treatment id applied to the line.
transporter_partner_idint64Transporter partner id (transporter_id).
recycler_partner_idint64Recipient / recycler partner id (recipient_id).
unit_measurestringWaste unit abbreviation (from waste’s unit of measure).
frequencystringGeneration frequency code (e.g. DAILY, MONTHLY).
frequency_valuestringExtra frequency parameter (frequency_observation, e.g. weeks per year for WEEKLY).
kg_quantitydoubleQuantity converted to kg (or raw if already kg), using unit conversion when needed.
quantitydoubleQuantity in the waste’s native unit.
yearly_kg_quantitydoubleAnnualized kg using getYearlyQuantity rules (frequency multipliers).
yearly_quantitydoubleAnnualized quantity in the native unit (same rules).
waste_generation_point_namesstringNames from linked processes on the cycle waste answer (aggregated for display).
packing_namesstringPacking names linked to the cycle waste answer.
final_waste_disposal_namesstringCentral packing / final destination names (centralPackings).
updated_atdateTimeLast update of the treatment answer.
deleted_atdateTimeSoft delete.

resource_custom_field_values

ColumnTypeDescription
resource_custom_field_value_idstringSynthetic stable id (first 32 hex chars of SHA-256 over field id, value id, period value id, months, year).
resource_custom_field_idint64Field definition id.
resource_custom_field_period_value_idint64Period slice: resource_custom_field_period_values.id. Non-period: resource_custom_field_values.id (the parent value row).
customable_idint64Polymorphic target id (document, checklist execution, waste, etc.).
customable_typestringNormalized resource type (DOCUMENT, CHECKLIST_EXECUTION, WASTE, … — see getCustomableType).
period_typestringinform_period_type from field config if period-based; else NOT_APPLIED.
row_indexstringRow index for repeatable field grids.
yearint32Year of the value or period.
monthsstringMonths covered (translated month names, comma-separated) or N/A / single month for non-period.
valuestringStored / formatted value (numeric sanitization or label expansion for select/binary).
updated_atdateTimeLast update (period row vs parent as built in fromModel).
deleted_atdateTimeSoft delete.

resource_custom_fields

ColumnTypeDescription
resource_custom_field_idint64Primary key (resource_custom_fields.id).
business_group_idint64Business group of the field’s tenant.
tenancy_idint64Tenant that owns the field definition.
checklist_idint64Checklist id when the field belongs to a checklist context.
resource_typestringCustomized resource code (CustomizedResourceEnum) or CHECKLIST if no customized resource.
section_breadcrumbstringSection path in the form (resource_custom_field_sections.tree_breadcrumb).
field_namestringField label / name.
updated_atdateTimeLast update.
deleted_atdateTimeSoft delete.