Préparer les transformations
Comme indiqué dans la vidéo, avant de pouvoir effectuer des transformations avec PySpark, vous devez charger les données dans le framework Spark. Vous avez vu comment le faire avec PySpark. Pouvez-vous choisir le code correct ?
(A)
spark.read.jdbc("jdbc:postgresql://repl:password@localhost:5432/pagila",
"customer")
(B)
spark.read.jdbc("jdbc:postgresql://localhost:5432/pagila",
"customer",
{"user":"repl","password":"password"})
(C)
spark.read.jdbc("jdbc:postgresql://repl:password@localhost:5432/pagila/customer")
Cet exercice fait partie du cours
<cours>Introduction au data engineering</cours>Exercice interactif pratique
Transformez la théorie en action avec l’un de nos exercices interactifs
Commencer l’exercice