# Data validation

Published articles for Data validation.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Starlette vs FastAPI: what FastAPI actually adds

DevFeed: [Starlette vs FastAPI: what FastAPI actually adds](<https://devfeed.tech/articles/starlette-vs-fastapi-what-fastapi-actually-adds-20058.md>)

Original publisher: [Read original article](<https://www.honeybadger.io/blog/starlette-vs-fastapi/>)

Author: Farhan Hasin Chowdhury

Published: 2026-07-20T07:00:00Z

Content type: comparison

Language: en

Sources: [Honeybadger](<https://devfeed.tech/sources/honeybadger.md>)

Topics: [FastAPI](<https://devfeed.tech/topics/fastapi.md>), [Pydantic](<https://devfeed.tech/topics/pydantic.md>), [ASGI](<https://devfeed.tech/topics/asgi.md>), [OpenAPI Specification](<https://devfeed.tech/topics/openapi.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Python](<https://devfeed.tech/topics/python.md>), [WebSocket](<https://devfeed.tech/topics/websocket.md>), [Cross-origin resource sharing (CORS)](<https://devfeed.tech/topics/cors.md>)

Tags: [cors](<https://devfeed.tech/tags/cors.md>), [data-validation](<https://devfeed.tech/tags/data-validation.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [fastapi](<https://devfeed.tech/tags/fastapi.md>), [frameworks](<https://devfeed.tech/tags/frameworks.md>), [openapi](<https://devfeed.tech/tags/openapi.md>), [python](<https://devfeed.tech/tags/python.md>), [python-articles](<https://devfeed.tech/tags/python-articles.md>), [starlette](<https://devfeed.tech/tags/starlette.md>), [websocket](<https://devfeed.tech/tags/websocket.md>)

### AI overview

This comparison explains how FastAPI builds on Starlette and Pydantic. Starlette provides the ASGI-based HTTP layer, while Pydantic handles typed data validation; FastAPI adds type-driven parameter parsing, dependency injection, and automatic OpenAPI documentation. It also discusses when using raw Starlette may be preferable.

### Source excerpt

FastAPI is built on Starlette, but most developers never look at what's underneath. Learn what FastAPI actually adds on top of Starlette and Pydantic, what comes straight from Starlette, and when dropping down to raw Starlette makes more sense than pulling in the full stack.

## Structured outputs with Pydantic AI

DevFeed: [Structured outputs with Pydantic AI](<https://devfeed.tech/articles/structured-outputs-with-pydantic-ai-30003.md>)

Original publisher: [Read original article](<https://engineering.freeagent.com/2026/03/24/structured-outputs-with-pydantic-ai/>)

Author: Ed Berry

Published: 2026-03-24T10:34:08Z

Content type: tutorial

Language: en

Sources: [FreeAgent](<https://devfeed.tech/sources/freeagent.md>)

Topics: [Large Language Model](<https://devfeed.tech/topics/llm.md>), [JSON Schema](<https://devfeed.tech/topics/json-schema.md>), [Prompt Engineering](<https://devfeed.tech/topics/prompt-engineering.md>), [Pydantic](<https://devfeed.tech/topics/pydantic.md>), [Python](<https://devfeed.tech/topics/python.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [data](<https://devfeed.tech/tags/data.md>), [data-ml](<https://devfeed.tech/tags/data-ml.md>), [data-science](<https://devfeed.tech/tags/data-science.md>), [data-validation](<https://devfeed.tech/tags/data-validation.md>), [genai](<https://devfeed.tech/tags/genai.md>), [json-schema](<https://devfeed.tech/tags/json-schema.md>), [llms](<https://devfeed.tech/tags/llms.md>), [prompt-engineering](<https://devfeed.tech/tags/prompt-engineering.md>), [python](<https://devfeed.tech/tags/python.md>), [schema](<https://devfeed.tech/tags/schema.md>), [structured-output](<https://devfeed.tech/tags/structured-output.md>)

### AI overview

This article explains structured outputs for LLMs using Pydantic AI. It introduces the relationship between Python type hints, static analysis, Pydantic, and runtime data validation, while noting that Pydantic AI is model-agnostic.

### Source excerpt

One of the challenges of working with LLMs is getting them to respond with a consistent format, such as a given JSON schema. Anyone who has tried to solve this issue with prompt engineering knows how frustrating it can be. You add a 'MUST' here and an 'always return JSON' there, but still the output [...]

## Moving from Django DRF to Ninja API / Pydantic

DevFeed: [Moving from Django DRF to Ninja API / Pydantic](<https://devfeed.tech/articles/moving-from-django-drf-to-ninja-api-pydantic-30798.md>)

Original publisher: [Read original article](<https://devblog.kogan.com/blog/moving-from-django-drf-to-ninja-api-pydantic>)

Author: Michael Sidharta

Published: 2025-11-10T05:35:43Z

Content type: comparison

Language: en

Sources: [Kogan.com](<https://devfeed.tech/sources/kogan-com.md>)

Topics: [Django](<https://devfeed.tech/topics/django.md>), [Pydantic](<https://devfeed.tech/topics/pydantic.md>), [API](<https://devfeed.tech/topics/api.md>), [Python](<https://devfeed.tech/topics/python.md>), [Development](<https://devfeed.tech/topics/development.md>), [OpenAPI Specification](<https://devfeed.tech/topics/openapi.md>), [Swagger](<https://devfeed.tech/topics/swagger.md>)

Tags: [api-documentation](<https://devfeed.tech/tags/api-documentation.md>), [data-validation](<https://devfeed.tech/tags/data-validation.md>), [django](<https://devfeed.tech/tags/django.md>), [fastapi](<https://devfeed.tech/tags/fastapi.md>), [python](<https://devfeed.tech/tags/python.md>), [swagger](<https://devfeed.tech/tags/swagger.md>)

### AI overview

This article examines moving from Django REST Framework API patterns to Django Ninja API and Pydantic. It describes motivations including reducing boilerplate, improving performance for some use cases, using modern Python type hints and data validation, and enhancing developer experience. It also outlines Django Ninja's type-based validation, automatic OpenAPI documentation, performance focus, and simplified endpoint definitions.

### Source excerpt

As our project grows, we're always looking for ways to streamline development, improve performance, and enhance the developer experience. Recently, we've been exploring a shift from our traditional Django REST Framework (DRF) API patterns to a combination of Django Ninja API and Pydantic. This blog post will delve into our motivations for this change, the benefits we've observed, and some considerations for others contemplating a similar transition. Why Consider a Change from Django DRF? Django REST Framework has been a robust and widely adopted solution for building APIs with Django. It provides a comprehensive set of tools, including serializers, viewsets, and excellent browser-based API interfaces. However, as our needs evolved, we identified areas where a different approach could offer advantages: Boilerplate Code: While DRF offers powerful abstractions, creating serializers, views, and viewsets can sometimes lead to a significant amount of boilerplate code, especially for simpler APIs. Performance: For certain use cases, the overhead of DRF's serializer validation and rendering can impact performance, particularly in high-throughput scenarios. Modern Python Features: We were keen to leverage modern Python features like type hints and data validation more extensively, which are core to Pydantic. Developer Experience: A more concise and explicit way to define API endpoints and data structures could improve developer productivity and reduce potential errors. Introducing Django Ninja API and PydanticDjango Ninja API Django Ninja is a web framework for building APIs with Django and Python 3.6+ type hints. It's heavily inspired by FastAPI and offers a number of compelling features: Type Hinting for API Endpoints: You define your request and response models using Pydantic, and Ninja automatically validates and serializes the data based on these type hints. Automatic OpenAPI (Swagger) Documentation: Just like FastAPI, Ninja generates interactive API documentation out o

## JSON - The Fine Print: Part 3 - Zero vs Missing Values

DevFeed: [JSON - The Fine Print: Part 3 - Zero vs Missing Values](<https://devfeed.tech/articles/json-the-fine-print-part-3-zero-vs-missing-values-22281.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2025/05/json-the-fine-print-part-3.html>)

Published: 2025-05-19T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [JSON](<https://devfeed.tech/topics/json.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [api-layers](<https://devfeed.tech/tags/api-layers.md>), [code](<https://devfeed.tech/tags/code.md>), [common-serialization-errors](<https://devfeed.tech/tags/common-serialization-errors.md>), [data-serialization](<https://devfeed.tech/tags/data-serialization.md>), [data-structure-separation](<https://devfeed.tech/tags/data-structure-separation.md>), [data-transmission](<https://devfeed.tech/tags/data-transmission.md>), [data-validation](<https://devfeed.tech/tags/data-validation.md>), [encoding-json](<https://devfeed.tech/tags/encoding-json.md>), [go](<https://devfeed.tech/tags/go.md>), [go-json-types](<https://devfeed.tech/tags/go-json-types.md>), [go-language-serialization](<https://devfeed.tech/tags/go-language-serialization.md>), [go-language-validation](<https://devfeed.tech/tags/go-language-validation.md>), [go-type-mapping](<https://devfeed.tech/tags/go-type-mapping.md>), [json](<https://devfeed.tech/tags/json.md>), [json-best-practices](<https://devfeed.tech/tags/json-best-practices.md>), [json-go-mapping](<https://devfeed.tech/tags/json-go-mapping.md>), [json-marshaling](<https://devfeed.tech/tags/json-marshaling.md>), [json-unmarshaling](<https://devfeed.tech/tags/json-unmarshaling.md>), [json-validation](<https://devfeed.tech/tags/json-validation.md>), [passing-serialized-data](<https://devfeed.tech/tags/passing-serialized-data.md>), [rest-apis](<https://devfeed.tech/tags/rest-apis.md>), [schema-less-data-format](<https://devfeed.tech/tags/schema-less-data-format.md>), [serialization](<https://devfeed.tech/tags/serialization.md>), [serialization-mistakes](<https://devfeed.tech/tags/serialization-mistakes.md>), [serialization-protocols](<https://devfeed.tech/tags/serialization-protocols.md>), [unmarshalling](<https://devfeed.tech/tags/unmarshalling.md>)

### AI overview

This tutorial examines how to distinguish zero values from missing or NULL fields when consuming JSON in Go. It explains basic unmarshalling into structs, notes that absent fields do not cause errors, and introduces DisallowUnknownFields for validating exact JSON input.

### Source excerpt

Introduction In part 1 we took a higher level view on serialization in general and JSON in specific. In part 2 we looked at emitting JSON. In part 3, we'll look at an issue you might encounter when consuming JSON, Zero vs NULL field values. To clarify the definition of NULL, this means the absence of value. So here is the question: Given a field in a Go struct set to its zero value, how do you know that zero value was set by the user or it's zero because it was never provided?

## JSON - The Fine Print: Part 2 - Emitting JSON

DevFeed: [JSON - The Fine Print: Part 2 - Emitting JSON](<https://devfeed.tech/articles/json-the-fine-print-part-2-emitting-json-22267.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-part-2.html>)

Published: 2025-02-04T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [JSON](<https://devfeed.tech/topics/json.md>), [API](<https://devfeed.tech/topics/api.md>), [Code](<https://devfeed.tech/topics/code.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [api-layers](<https://devfeed.tech/tags/api-layers.md>), [code](<https://devfeed.tech/tags/code.md>), [common-serialization-errors](<https://devfeed.tech/tags/common-serialization-errors.md>), [data](<https://devfeed.tech/tags/data.md>), [data-serialization](<https://devfeed.tech/tags/data-serialization.md>), [data-structure-separation](<https://devfeed.tech/tags/data-structure-separation.md>), [data-transmission](<https://devfeed.tech/tags/data-transmission.md>), [data-validation](<https://devfeed.tech/tags/data-validation.md>), [encoding](<https://devfeed.tech/tags/encoding.md>), [encoding-json](<https://devfeed.tech/tags/encoding-json.md>), [function](<https://devfeed.tech/tags/function.md>), [go-json-types](<https://devfeed.tech/tags/go-json-types.md>), [go-language-serialization](<https://devfeed.tech/tags/go-language-serialization.md>), [go-language-validation](<https://devfeed.tech/tags/go-language-validation.md>), [go-type-mapping](<https://devfeed.tech/tags/go-type-mapping.md>), [http](<https://devfeed.tech/tags/http.md>), [io](<https://devfeed.tech/tags/io.md>), [io-writer](<https://devfeed.tech/tags/io-writer.md>), [json](<https://devfeed.tech/tags/json.md>), [json-best-practices](<https://devfeed.tech/tags/json-best-practices.md>), [json-go-mapping](<https://devfeed.tech/tags/json-go-mapping.md>), [json-marshaling](<https://devfeed.tech/tags/json-marshaling.md>), [json-unmarshaling](<https://devfeed.tech/tags/json-unmarshaling.md>), [json-validation](<https://devfeed.tech/tags/json-validation.md>), [map](<https://devfeed.tech/tags/map.md>), [passing-serialized-data](<https://devfeed.tech/tags/passing-serialized-data.md>), [properties](<https://devfeed.tech/tags/properties.md>), [rest-apis](<https://devfeed.tech/tags/rest-apis.md>), [schema](<https://devfeed.tech/tags/schema.md>), [schema-less-data-format](<https://devfeed.tech/tags/schema-less-data-format.md>), [serialization](<https://devfeed.tech/tags/serialization.md>), [serialization-mistakes](<https://devfeed.tech/tags/serialization-mistakes.md>), [serialization-protocols](<https://devfeed.tech/tags/serialization-protocols.md>), [standard](<https://devfeed.tech/tags/standard.md>), [structure](<https://devfeed.tech/tags/structure.md>), [writing](<https://devfeed.tech/tags/writing.md>)

### AI overview

This tutorial explains how to emit JSON in Go using the encoding/json package. It compares json.Marshal, which returns bytes, with json.Encoder, which writes to an io.Writer, and discusses error handling in HTTP handlers. It also demonstrates marshaling maps and structs and using field tags to control JSON property names.

### Source excerpt

Introduction In part 1 we took a high-level view on serialization and JSON. In this part, we'll roll our sleeves and start working with JSON, focused on emitting JSON. You might think this is a basic topic, but there is much more to it than just calling json.Marshal. json.Marshal vs json.Encoder The encoding/json package has two main APIs: Marshal and NewEncoder. The Marshal function returns a []byte while the NewEncoder function will write to an io.Writer. The question is: When should you use one API over the other?

## JSON - The Fine Print: Part 1

DevFeed: [JSON - The Fine Print: Part 1](<https://devfeed.tech/articles/json-the-fine-print-part-1-22266.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-part-1.html>)

Published: 2024-10-23T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [JSON](<https://devfeed.tech/topics/json.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [api-layers](<https://devfeed.tech/tags/api-layers.md>), [apis](<https://devfeed.tech/tags/apis.md>), [common-serialization-errors](<https://devfeed.tech/tags/common-serialization-errors.md>), [data-serialization](<https://devfeed.tech/tags/data-serialization.md>), [data-structure-separation](<https://devfeed.tech/tags/data-structure-separation.md>), [data-transmission](<https://devfeed.tech/tags/data-transmission.md>), [data-validation](<https://devfeed.tech/tags/data-validation.md>), [database](<https://devfeed.tech/tags/database.md>), [elasticsearch](<https://devfeed.tech/tags/elasticsearch.md>), [encoding-json](<https://devfeed.tech/tags/encoding-json.md>), [go-json-types](<https://devfeed.tech/tags/go-json-types.md>), [go-language-serialization](<https://devfeed.tech/tags/go-language-serialization.md>), [go-language-validation](<https://devfeed.tech/tags/go-language-validation.md>), [go-type-mapping](<https://devfeed.tech/tags/go-type-mapping.md>), [json](<https://devfeed.tech/tags/json.md>), [json-best-practices](<https://devfeed.tech/tags/json-best-practices.md>), [json-go-mapping](<https://devfeed.tech/tags/json-go-mapping.md>), [json-marshaling](<https://devfeed.tech/tags/json-marshaling.md>), [json-unmarshaling](<https://devfeed.tech/tags/json-unmarshaling.md>), [json-validation](<https://devfeed.tech/tags/json-validation.md>), [passing-serialized-data](<https://devfeed.tech/tags/passing-serialized-data.md>), [rest-apis](<https://devfeed.tech/tags/rest-apis.md>), [schema-less-data-format](<https://devfeed.tech/tags/schema-less-data-format.md>), [sensitive-data](<https://devfeed.tech/tags/sensitive-data.md>), [serialization](<https://devfeed.tech/tags/serialization.md>), [serialization-mistakes](<https://devfeed.tech/tags/serialization-mistakes.md>), [serialization-protocols](<https://devfeed.tech/tags/serialization-protocols.md>)

### AI overview

This article explains JSON and serialization fundamentals, then examines common mistakes. It recommends serializing data at program boundaries and using separate data structures for API, business, and storage layers to avoid inefficiency, coupling, and accidental exposure of sensitive data.

### Source excerpt

Introduction Everybody knows JSON, it's a simple serialization format and the default format for REST APIs. Like many other topics, there are fine points you should know in order to work with JSON more effectively and avoid common mistakes. In this article we'll explore some big picture aspects and some low level details of using JSON. Serialization Before diving into JSON, I'd like to take a look at serialization in general and discuss common mistakes I've seen my customers make.

## Data Integrity with JSON Serialization - Ep.1

DevFeed: [Data Integrity with JSON Serialization - Ep.1](<https://devfeed.tech/articles/data-integrity-with-json-serialization-ep-1-22263.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-ep-1-data-integrity-with-json-serialization.html>)

Published: 2024-10-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [JSON](<https://devfeed.tech/topics/json.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [software-architecture](<https://devfeed.tech/topics/software-architecture.md>)

Tags: [common-serialization-mistakes](<https://devfeed.tech/tags/common-serialization-mistakes.md>), [custom-json-validation](<https://devfeed.tech/tags/custom-json-validation.md>), [data-integrity-in-software-engineering](<https://devfeed.tech/tags/data-integrity-in-software-engineering.md>), [data-serialization-in-api-design](<https://devfeed.tech/tags/data-serialization-in-api-design.md>), [data-validation](<https://devfeed.tech/tags/data-validation.md>), [efficient-data-serialization](<https://devfeed.tech/tags/efficient-data-serialization.md>), [how-to-validate-json-data](<https://devfeed.tech/tags/how-to-validate-json-data.md>), [introduction-to-json-for-engineers](<https://devfeed.tech/tags/introduction-to-json-for-engineers.md>), [json](<https://devfeed.tech/tags/json.md>), [json-best-practices](<https://devfeed.tech/tags/json-best-practices.md>), [json-best-practices-for-api](<https://devfeed.tech/tags/json-best-practices-for-api.md>), [json-data-validation-techniques](<https://devfeed.tech/tags/json-data-validation-techniques.md>), [json-for-engineers](<https://devfeed.tech/tags/json-for-engineers.md>), [json-in-software-development](<https://devfeed.tech/tags/json-in-software-development.md>), [json-optimization-for-storage](<https://devfeed.tech/tags/json-optimization-for-storage.md>), [json-serialization-tutorial](<https://devfeed.tech/tags/json-serialization-tutorial.md>), [miki-tebeka-json-guide](<https://devfeed.tech/tags/miki-tebeka-json-guide.md>), [serialization](<https://devfeed.tech/tags/serialization.md>), [serialization-in-software-architecture](<https://devfeed.tech/tags/serialization-in-software-architecture.md>), [software-architecture](<https://devfeed.tech/tags/software-architecture.md>), [software-layer-separation-and-data-handling](<https://devfeed.tech/tags/software-layer-separation-and-data-handling.md>)

### AI overview

Episode 1 of JSON for Engineers explains serialization fundamentals and how JSON converts data structures to byte sequences. It recommends serializing at system boundaries such as APIs and storage, keeping native types internally, separating models across layers, and validating data beyond JSON syntax.

### Source excerpt

Introduction: Welcome to Episode 1 of JSON for Engineers! In this first episode, Miki Tebeka dives into the fundamentals of serialization, with a special focus on JSON, one of the most widely-used data formats in software engineering. Miki draws from his extensive development experience to explain how JSON fits into the bigger picture of data interchange and serialization, laying the groundwork for engineers to use it effectively in real-world applications.

## Implementing Data Validation with Great Expectations in Hybrid Environments

DevFeed: [Implementing Data Validation with Great Expectations in Hybrid Environments](<https://devfeed.tech/articles/implementing-data-validation-with-great-expectations-in-hybrid-environments-28036.md>)

Original publisher: [Read original article](<https://tech.trivago.com/post/2023-04-25-implementing-data-validation-with-great-expectations-in-hybrid-environments/>)

Author: Kamila Widyanto Full time DevOps; Site Reliability Engineer; Part Time Rubberduck Linkedin Profile

Published: 2023-04-25T00:00:00Z

Content type: tutorial

Language: en

Sources: [Trivago](<https://devfeed.tech/sources/trivago.md>)

Topics: [data-processing](<https://devfeed.tech/topics/data-processing.md>), [Hadoop](<https://devfeed.tech/topics/hadoop.md>), [hdfs](<https://devfeed.tech/topics/hdfs.md>), [integrity](<https://devfeed.tech/topics/integrity.md>), [Apache Spark](<https://devfeed.tech/topics/spark.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Library](<https://devfeed.tech/topics/library.md>), [Python](<https://devfeed.tech/topics/python.md>), [JSON](<https://devfeed.tech/topics/json.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [YAML](<https://devfeed.tech/topics/yaml.md>), [version-control](<https://devfeed.tech/topics/version-control.md>)

Tags: [configuration](<https://devfeed.tech/tags/configuration.md>), [data](<https://devfeed.tech/tags/data.md>), [data-pipeline](<https://devfeed.tech/tags/data-pipeline.md>), [data-processing](<https://devfeed.tech/tags/data-processing.md>), [data-validation](<https://devfeed.tech/tags/data-validation.md>), [devops](<https://devfeed.tech/tags/devops.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [hadoop](<https://devfeed.tech/tags/hadoop.md>), [hdfs](<https://devfeed.tech/tags/hdfs.md>), [integrity](<https://devfeed.tech/tags/integrity.md>), [json](<https://devfeed.tech/tags/json.md>), [library](<https://devfeed.tech/tags/library.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [python](<https://devfeed.tech/tags/python.md>), [version-control](<https://devfeed.tech/tags/version-control.md>), [workflow](<https://devfeed.tech/tags/workflow.md>), [yaml](<https://devfeed.tech/tags/yaml.md>)

### AI overview

This article describes implementing Great Expectations for data validation in a hybrid Hadoop environment. It explains the framework's core concepts and how the authors ran it as a PySpark job in an automated data pipeline, including configuring the Data Context for HDFS constraints.

### Source excerpt

Data validation is an essential step in any data processing pipeline, as it ensures the integrity and accuracy of the data to be used across all subsequent processing steps.

## Separate data schema from data representation

DevFeed: [Separate data schema from data representation](<https://devfeed.tech/articles/separate-data-schema-from-data-representation-37566.md>)

Original publisher: [Read original article](<https://blog.klipse.tech/databook/2022/06/22/data-validation.html>)

Author: Yehonathan Sharvit

Published: 2022-06-22T02:35:24Z

Content type: article

Language: en

Sources: [Klipse](<https://devfeed.tech/sources/klipse.md>)

Topics: [JSON Schema](<https://devfeed.tech/topics/json-schema.md>), [Data validation](<https://devfeed.tech/topics/data-validation.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [d](<https://devfeed.tech/tags/d.md>), [data-validation](<https://devfeed.tech/tags/data-validation.md>), [dop](<https://devfeed.tech/tags/dop.md>), [json-schema](<https://devfeed.tech/tags/json-schema.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

An exploration of the fourth principle of Data-Oriented Programming: keeping data schemas separate from data representations. The article explains how schemas describe expected data shapes and how validation libraries such as Ajv can check data against JSON Schema and report validation errors.

### Source excerpt

With data separated from code and represented with generic and immutable data structures, now comes the question of how do we express the shape of the data? In DOP, the expected shape is expressed as a data schema that is kept separated from the data itself. The main benefit of Principle #4 is that it allows developers to decide which pieces of data should have a schema and which pieces of data should not.

## Pinion -- The Load Framework Part-2

DevFeed: [Pinion -- The Load Framework Part-2](<https://devfeed.tech/articles/pinion-the-load-framework-part-2-26224.md>)

Original publisher: [Read original article](<https://medium.com/groupon-eng/pinion-the-load-framework-part-2-e6a47586e7be?source=rss----5c13a88f9872---4>)

Author: Saurabh Jain

Published: 2021-10-29T16:50:24Z

Content type: article

Language: en

Sources: [Groupon Engineering -- Medium](<https://devfeed.tech/sources/groupon-engineering-medium.md>)

Topics: [data lake](<https://devfeed.tech/topics/data-lake.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [Data Quality](<https://devfeed.tech/topics/data-quality.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [Streaming](<https://devfeed.tech/topics/streaming.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [audit](<https://devfeed.tech/tags/audit.md>), [aws](<https://devfeed.tech/tags/aws.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [data-validation](<https://devfeed.tech/tags/data-validation.md>), [delta-lake](<https://devfeed.tech/tags/delta-lake.md>), [deltalake](<https://devfeed.tech/tags/deltalake.md>), [hdfs](<https://devfeed.tech/tags/hdfs.md>), [logging](<https://devfeed.tech/tags/logging.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [reporting](<https://devfeed.tech/tags/reporting.md>), [s3](<https://devfeed.tech/tags/s3.md>), [schema](<https://devfeed.tech/tags/schema.md>), [science](<https://devfeed.tech/tags/science.md>), [spark](<https://devfeed.tech/tags/spark.md>), [streaming](<https://devfeed.tech/tags/streaming.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

### AI overview

This second post in the Pinion -- The Load Framework series explains how Pinion extends Apache Delta Lake APIs for slowly changing dimension operations. It covers data validation, compaction, auditing, streamlined logging, and chained APIs, and introduces Delta Lake capabilities such as ACID transactions, schema enforcement, batch and streaming interfaces, and time travel.

### Source excerpt

Pinion -- The Load Framework Part-2 This post is the 2nd part of the "Pinion -- The Load Framework" series. In case you have not read the 1st post, you can read it here. In this post, we are going to cover the following topics. How does Pinion use Delta Lake for SCD operations? Small file problem with Delta Lake and its resolution. Before we dive into the topics of this post, let's look at the definition of DeltaLake to set the context right. Apache Delta Lake - Apache Delta Lake is an open-source framework that enables the addition of ACID transactions support to a new data lake or an existing data lake created on top of S3, GCS, and HDFS. In addition to this, it provides other features such as scalable metadata handling, unified interface for both batch and streaming application, schema enforcement, time travel, and a rich interface of APIs to enable complex use cases like change-data-capture (CDC) and slowly-changing-dimension (SCD) operations. To keep the post concise and to the point, I won't go into much detail here about Delta Lake, since there is already great documentation available about it, that you can read it here. How does Pinion use Delta Lake for SCD operations? - Apache Delta Lake provides a rich set of APIs to handle slowly-changing dimensions, however, those APIs were not enough alone to build the features that we want to have in The Pinion Framework. So, we decided to enrich the APIs provided by Delta Lake by adding the following features to it: Data Validation Compaction Audit Streamlined logging infrastructure to make the data engineer's life easier during debugging of a failed job Chained APIs Let's dive a little further into the features that we had listed above. Data Validation -- By default, schema enforcement is enabled in Pinion for all the APIs where we have a need of inserting rows from source data(LRFs) into the target table. In case of a schema mismatch, Pinion raises an error and stops processing of further stages. It ensures the data a