Skip to main content

app.data_sources

Ingestion Workflow Reference

For details on data ingestion methods, parsing flows, and PII security controls, refer to the Data Ingestion Overview.

The app.data_sources table is the central metadata registry tracking all data assets ingested into Ravioli.


Schema Field Definition​

Field NameTypeDescription
idUUID (Primary Key)Unique identifier generated via uuid.uuid4.
filenameVARCHAR(255) (Required)The local filename saved on disk in the staging buffer.
original_filenameVARCHAR(255) (Required)The original name of the file uploaded by the user.
content_typeVARCHAR(100) (Required)The MIME type of the uploaded file.
size_bytesBIGINT (Required)Total size of the file on disk.
table_nameVARCHAR(255) (Required)The generated target table name inside DuckDB.
schema_nameVARCHAR(100) (Default: main)The isolated DuckDB schema namespace target.
row_countINTEGER (Optional)Number of rows loaded during ingestion.
descriptionTEXT (Optional)User description explaining the dataset.
statusVARCHAR(50) (Default: pending)Pipeline state: pending, completed, failed.
error_messageTEXT (Optional)Logs error strings if the ingestion pipeline fails.
file_hashVARCHAR(64) (Indexed)SHA-256 hash of the file, used to detect duplicate uploads.
source_typeVARCHAR(50) (Default: file)Data ingress method: file, wfs.
source_urlTEXT (Optional)Connection URL for external APIs (e.g. WFS endpoints).
has_piiBOOLEAN (Default: False)Identifies if the dataset contains sensitive PII fields.
created_atTIMESTAMPUpload timestamp.
updated_atTIMESTAMPLast metadata change timestamp.
ownerUUID (Foreign Key)References the app.user_groups.id owning the data.
created_byUUID (Foreign Key)References the app.users.id who uploaded the dataset.
updated_byUUID (Foreign Key)References the app.users.id who modified the source.
owner_idUUID (Optional)Polymorphic ID link.
owner_typeVARCHAR(50) (Default: user)Polymorphic owner categorization (user or group).

Duplicate Detection & Security Rules​

  1. File Hashing: The file_hash field stores file signature fingerprints. If a user uploads a duplicate file, the pipeline aborts to avoid database inflation.
  2. PII Controls: If has_pii is flagged True by the scanner, Ravioli blocks this dataset from being pushed to MotherDuck or any cloud server.