To transform a dataframe with a column containing a json string to a typed dataframe, we have to know exactly what is the schema of our json string. This blog post presents a method to infer a global schema from our column containing different json strings by using an user-defined aggregate function
If you want to transform a Spark’s dataframe schema into a String, you have two schema string representation available: JSON and DDL. DDL stands for Data Definition Language and provides a very concise way to represent a Spark Schema. But how do we represent a Spark’s schema in DDL ?
You have to create a docker image containing an artifact. However to be built, this artifact requires tools that you don’t need to put in your docker image. How to ensure to have the smallest docker image without loading useless tools only used for building artifact ? The solution is docker multi-stage builds
A small code snippet to recursively list all
csv files in a directory on a databricks notebook in Python.
With Testcontainers library, you can use a docker container providing services such as a database for your test. With Flyway library, you can track the schema changes of your database and ensure that those changes are applied on all its instances. How can you initialize your test database provided by Testcontainers with the schema described in Flyway ? In this post, we will see how to initialize a postgresql database in a docker container with Flyway scripts.