For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cross-Database Queries

Run federated join and union queries across GridGain and Hadoop (Hive) by using Spark SQL and the GridGain Spark integration.

Spark SQL Queries can access multiple tables simultaneously in such a way that multiple rows of each table are being processed at the same time. The tables could be located in the same or different databases.

GridGain supports advanced integration with Spark. You can include it in your maven project by adding the following dependencies:

<dependency>
    <groupId>org.gridgain</groupId>
    <artifactId>ignite-spark</artifactId>
    <version>${gridgain.version}</version>
    <exclusions>
        <exclusion>
          <!-- This dependency is not available with java 9+ -->
          <groupId>jdk.tools</groupId>
          <artifactId>jdk.tools</artifactId>
        </exclusion>
    </exclusions>
</dependency>

Join Federated Queries

A query that accesses different tables simultaneously is called a join query.

The following example shows the joins between the cities table in Hive and the Person table in GridGain, via the city_id field.

The cities table in Hive:

The Person table in GridGain:

Federated join requests can be executed like this:

Union Federated Queries

Spark supports union queries between different data sources that return a new dataset containing the union of the elements in the source dataset and the argument. Data sources can be related to different database tables.

The following example shows the union query between the Hive person table and the GridGain Person table.

The person table in Hive:

Federated union requests can be executed like this:

This page is: Copyright © 2026 MariaDB. All rights reserved.

spinner

Last updated

Was this helpful?