What Spark code pattern is used to read data from an external JDBC database into a DataFrame for ingestion into watsonx.data?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Spark's JDBC DataFrameReader uses .format('jdbc') with connection URL; table name; credentials; and partition options to read from external databases in parallel; producing a DataFrame for further transformation and loading.
Full explanation below image
Full Explanation
Spark's JDBC DataFrameReader uses .format('jdbc') with connection URL; table name; credentials; and partition options to read from external databases in parallel; producing a DataFrame for further transformation and loading. The incorrect options ("spark.read.json('jdbc://db_host/table')", "spark.sql('SELECT * FROM external.table').collect()", "spark.readStream.format('kafka').option('subscribe','topic').load()") are distractors that don't fully capture the concept described.