liveBook · Manning

Chapter 2: Advantages & Disadvantages of Using a Coding Companion

What you will learn in chapter 2 of Learn AI Data Engineering

Introduces the productivity benefits of LLM coding companions in data engineering while emphasizing that plausible-looking output requires human validation.

After this chapter you will be able to

What it builds on

Section by section

Introduction

Introduces the productivity benefits of LLM coding companions in data engineering while emphasizing that plausible-looking output requires human validation.

Key terms: LLM, coding companion, rapid prototyping, iterative development, hallucinations, schema, business context, prompt feedback loops, human oversight

2.1 Mental Model: The Data Engineer and the Coding Companion

This section presents the data engineer as the link between an AI coding companion and a separate coding environment, and explains why that separation helps readers learn to use AI-generated code critically.

Key terms: data engineer, AI coding companion, prompts, responses, coding environment, prompt-response dance, hallucinate, IDE, OpenAI API

2.2 Advantages of Using an AI/LLM Coding Companion

This section explains why coding companions become more useful as code grows complex and how revising prompts can improve their output.

Key terms: LLMs, coding companion, rapid iteration, error reduction, refined logic, iterative feedback loop, revise prompts

2.2.1 Rapid Code Generation for Data Engineering Tasks

This section shows how a conversational AI coding companion can generate Python for a nested-data transformation while emphasizing testing and hands-on understanding.

Key terms: nested JSON, normalize, product_order DataFrame, regular expressions, price_with_tax, AI coding companion, ChatGPT, conversational interface, prompt, boilerplate coding

2.3 Disadvantages of Using a Coding Companion

This section explains why coding companions can give misleading data-engineering answers when they lack project context or run out of context-window space, and how to work around those limits.

Key terms: current prompt, business logic, naming conventions, data lineage, context window, tokens, schema, hallucinated functions, schema docs, DDL scripts

2.3.1 Introduction to the Pagila Dataset

Introduces the Pagila DVD-rental database as a realistic schema for examining how AI coding companions can misinterpret table relationships.

Key terms: Pagila, transactional schema, foreign key relationships, ERD, joins, aggregations, schema file, seed data file, GitHub repository, PostgreSQL

2.3.2 Example: Asking a Simple Question

A simple Pagila SQL prompt shows that plausible AI-generated code can depend on unstated assumptions, so its results should be tested and the prompt refined.

Key terms: Pagila, most popular film, COUNT(r.rental_id), rentals, ChatGPT, pgAdmin, recent rentals, by category

2.4 Lab

This lab practices prompting a coding companion for SQL and Python, then running and checking its generated code.

2.5 Lab Answers

This lab-answer section explains how to judge AI-generated solutions that differ from the examples.

Where this is used later

Concepts explained in this chapter

← Chapter 1: Before You Begin Chapter 3: Using a Coding Companion with SQL →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.