While CREATE TEMPORARY TABLE can be used to register multiple MongoDB collections in multiple MongoDB databases, they must all be at the same MongoDB endpoint (host/port) and all other configuration must be the same. This is because all such configuration is attached to the SparkContext.
It should be possible ro provide ALL of this configuration information as part of the OPTIONS clause of CREATE TEMPORARY TABLE (whereas currently this is only possible with the database and collection names.).
While
CREATE TEMPORARY TABLEcan be used to register multiple MongoDB collections in multiple MongoDB databases, they must all be at the same MongoDB endpoint (host/port) and all other configuration must be the same. This is because all such configuration is attached to the SparkContext.It should be possible ro provide ALL of this configuration information as part of the
OPTIONSclause ofCREATE TEMPORARY TABLE(whereas currently this is only possible with the database and collection names.).