1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Spark SQL in Python

Connected

Exercise

Practice logging

The following code is executed on startup:

import logging
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG,
                    format='%(levelname)s - %(message)s')

You will now practice these logging operations.

Instructions

100 XP
  • Log columns of text_df as debug message.
  • Log whether table1 is cached as info message.
  • Log first row of text_df as warning message.
  • Log selected columns of text_df as error message.