Databricks and Apache Spark are often used in data engineering, data science, and machine learning workflows. Their APIs are designed around distributed data processing (RDDs, DataFrames, Datasets). The question arises: does Object-Oriented Programming (OOP) fit into this paradigm, or do we need a different style?
Statefulness: Spark’s lazy evaluation and immutable DataFrames do not align with mutable OOP state.
Serialization: Classes with methods that capture external state may not serialize well when Spark ships code to executors.
Functional preference: Many Spark best practices push towards functional patterns (pure functions, stateless transformations).
Note on statefulness: In Learning Spark, Holden Karau makes distinction between stateless and stateful processing and emphazizes it. Stateless transformations are preferred, but spark also provides patterns for stateful processing, particularly in streaming contexts. e.g., updateStateByKey, windowing, watermarking, and event-time state management.
Consistent naming across env (dev, test, prod), layers (bronze/silver/gold), and domains is critical in Databricks. It prevents confusion, enforces governance, and supports automation with Unity Catalog and Delta Lake.
Unity Catalog is the governance backbone. Inconsistent names break access policies and automation. Use env prefixes, clear domains, and snake_case. cf. Unity Catalog docs .
Hugo offer a selection of themes developed by the community. This site for example was built using Hugo-Book.
Add the theme as a submodule
# For example:git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book
Add the theme to your site configuration file
# Could be config.toml OR config.yaml OR hugo.toml OR hugo.yamlecho"theme = 'hugo-book'" >> config.toml
You will be able to see a first version of your website locally by running:
hugo server --minify
Edit your configuration file
baseURL ='http://example.org/'languageCode ='en-us'title ='My New Hugo Site'
Theme ConfigurationGuidelines Themes’ publishers offer guidelines to configure your webiste in accordance to the theme. Check your theme publisher page on hugo themes or their theme github repo for guidance and help.
Thanks to the Jupyter community, it’s now much easier to run PySpark on Jupyter using Docker.
There are two ways you can do this : 1. the “direct” way and 2. the customized way.
Les mêmes principes et critères d’un bon code devraient s’appliquer à la documentation:
Conventionnelle
Simple
Facile à comprendre
En plus des critères d’un bon code, une bonne documentation devrait aussi être:
Explicative (intention du code, règles métiers, clarification du code, mise en garde sur les conséquences d’une mauvaise
utilisation, indications pour le testing)
Non-redondante
/**
* Returns the temperature.
*/int get_temperature(void){return temperature;}
Décrire le contexte ou le background du code est une bonne pratique qui permettra aux lecteurs de se positionner par
rapport aux conditions dans lesquelles le code a été généré et à ses objectifs.