Generating, optimizing, and debugging code
The primary capability you should leverage is ChatGPT code generation. How many times have you been looking for a pre-built piece of code to start from? Generating the utils
functions, sample datasets, SQL schemas, and so on? ChatGPT is able to generate code based on input in natural language:
Figure 6.2 – Example of ChatGPT generating a Python function to write into CSV files
As you can see, not only was ChatGPT able to generate the function, but also it was able to explain what the function does, how to use it, and what to substitute with generic placeholders such as my_folder
.
Another example could be of creating schemas for structured tables. Namely, imagine you are a data engineer in the process of creating relationships between two standard tables in an SAP ERP system: MARA
and VBAP
, storing, respectively, general material data and sales document data.
Let’s ask ChatGPT to create the...