Schema Inference for Text Files via Hierarchical Sampling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional data platforms face inefficiencies and resource waste due to the manual and time-consuming process of assigning schemas to text and binary files, which is prone to human error and limits the ability to process large volumes of unstructured data effectively.

Innovation Solution

The development of a schema inference system that automatically infers schema types for text and binary files, including JSON, CSV, and XML formats, without relying on pre-existing metadata, allowing for the processing of unstructured data into tabular form and enhancing data platform efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If manual schema assignment is used, then schema accuracy can be maintained, but processing time and resource consumption increase significantly

Engineering Contradiction:
Improveschema accuracyVSAvoidprocessing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system enables self-service schema inference where the data itself provides the information needed for schema detection. The inference engine automatically analyzes data patterns, data types, and relationships without requiring manual intervention or pre-existing metadata, allowing the system to serve itself in determining appropriate schemas.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces the mechanical manual process of schema assignment with an automated computational inference system. The inference engine uses algorithms to automatically detect schemas by analyzing data characteristics, replacing the human-operated mechanical process with an automated digital system that operates at scale.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Measurement precision

If manual schema assignment is used, then schema accuracy can be maintained, but labor resources are consumed

Engineering Contradiction:
Improveschema accuracyVSAvoidlabor resources
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The system enables self-service schema inference where the data itself provides the information needed for schema detection. The inference engine automatically analyzes data patterns, data types, and relationships without requiring manual intervention or pre-existing metadata, allowing the system to serve itself in determining appropriate schemas.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces the mechanical manual process of schema assignment with an automated computational inference system. The inference engine uses algorithms to automatically detect schemas by analyzing data characteristics, replacing the human-operated mechanical process with an automated digital system that operates at scale.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Productivity

If automated schema inference is implemented, then processing efficiency improves, but system complexity increases

Engineering Contradiction:
Improveprocessing efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The schema inference process is segmented into distinct analytical stages: data sampling, pattern detection, schema candidate generation, and schema selection. This segmentation allows the complex inference task to be broken down into manageable components that can be processed systematically and efficiently.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The inference engine is designed as a universal system that can handle multiple data formats, structures, and complexity levels through a single unified architecture. The same core algorithms adapt to different data types and organizational patterns, providing multi-functional capability without requiring separate specialized systems for each data type.

Inventive Principle:
Principle #6Universality (Multi-functionality)

4Loss of energy

If automated schema inference is implemented, then resource waste is reduced, but computational energy is consumed

Engineering Contradiction:
Improveresource wasteVSAvoidcomputational energy
Core Design Contradiction:
Loss of energyVSUse of energy by moving object

Solution Approach 1:

The system applies partial action by analyzing only the necessary portions of data required for schema inference rather than processing entire datasets. The inference engine samples data strategically to extract sufficient information for schema determination, avoiding unnecessary computational energy consumption on data that doesn't contribute to schema detection.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS11989163B2Schema inference for files
Publication Date: 2024.05.21 SNOWFLAKE INC
  • US11989163B2 patent drawing
  • US11989163B2 patent drawing
  • US11989163B2 patent drawing

AI summary

Systems and methods for inferring a schema for a text file are provided. The systems and methods perform operations including: accessing a file comprising a plurality of textual records, each textual record of the plurality of textual records being associated with one or more columns of data; sampling a set of textual records from the plurality of textural records; obtaining a hierarchy comprising a plurality of levels of schema types; determining whether an individual column of the one or more columns of data corresponding to the set of textual records is successfully associated with a first level of the plurality of levels of the schema types and, in response, associating a schema type represented by the first level with the individual column of the one or more columns of data corresponding to the plurality of textual records.