2 Advantages & Disadvantages of Using a Coding Companion
Large language models are presented as useful coding companions for data engineering because they can speed up everyday development tasks and reduce manual effort. Instead of replacing the engineer, they act as a conversational helper that can generate code, suggest transformations, and support an iterative workflow where prompts are refined until the result is close to what is needed. The chapter frames this relationship as a separation between the AI assistant and the coding environment, which helps developers understand what the model is producing and learn how to evaluate it before execution.
The main benefits come from faster code generation, easier handling of repetitive work, and better support for complex data tasks such as nested JSON processing, SQL query writing, and multi-step transformations. By describing a problem in natural language, a data engineer can quickly get a working first draft and then improve it through feedback. This is especially valuable when dealing with awkward structures or long transformation logic, since the model can help compress the time required to build and revise solutions.
At the same time, the chapter emphasizes important drawbacks: LLMs do not truly understand a project’s schema, business rules, or architecture, and they can produce confident but incorrect output. Hallucinations, context-window limits, and weak awareness of edge cases can lead to invalid methods, missing columns, or SQL that looks correct but fails in practice. Because of these risks, the text stresses that generated code should be treated as a draft, carefully validated against the real system, and always reviewed by a human before being trusted in production.
The AI coding companion mental model: You, the data engineer, interact with a coding companion via prompts and responses, then test and execute code within a separate coding environment. This separation reinforces how AI generates code and supports learning prompt engineering
Reading from bottom to top, this timeline compares the traditional manual steps (left) versus an AI-assisted workflow (right) for API data extraction. The "Without AI" column illustrates the cumulative time and effort required to manually code each part of the task. In contrast, the "With AI" column shows how a well-structured prompt and a few refinements can significantly compress the workflow.
The Pagila Entity Relationship Diagram illustrating relationships between the different objects in the Paglia DVD Store data set
Lab Answers
Note: Due to the probabilistic nature of language models, your AI-generated answers might differ slightly from the code shown here. As long as the results are correct and the logic aligns with the prompt, your solution is valid.
1.
2.
3.
4.
5.
6.
Learn AI Data Engineering ebook for free