---
title: "Data Loading Overview"
description: "Overview of available loading methods and supported features."
component: "tigergraph-server"
version: "4.2"
module: "data-loading"
html_url: "/tigergraph-server/4.2/data-loading/data-loading-overview"
canonical_url: "https://www.tigergraph.com/docs/tigergraph-server/4.2/data-loading/data-loading-overview"
markdown_url: "https://www.tigergraph.com/docs/tigergraph-server/4.2/data-loading/data-loading-overview.md"
---

[View as HTML](https://www.tigergraph.com/docs/tigergraph-server/4.2/data-loading/data-loading-overview)

# Data Loading Overview

Table of Contents

* [Loading System Architecture](https://www.tigergraph.com/docs/tigergraph-server/4.2/data-loading/data-loading-overview.md#_loading_system_architecture)
* [Data Sources](https://www.tigergraph.com/docs/tigergraph-server/4.2/data-loading/data-loading-overview.md#_data_sources)
* [Loading Workflow](https://www.tigergraph.com/docs/tigergraph-server/4.2/data-loading/data-loading-overview.md#_loading_workflow)
* [Loading Jobs](https://www.tigergraph.com/docs/tigergraph-server/4.2/data-loading/data-loading-overview.md#_loading_jobs)

Once you have [defined a graph schema](https://www.tigergraph.com/docs/gsql-ref/4.2/ddl-and-loading/defining-a-graph-schema.md), you can load data into the graph. This section focuses on how to configure TigerGraph for the different data sources, as well as different data formats and transport schemes.

## Loading System Architecture

This diagram shows the supported data sources, which connector to use, and which TigerGraph component manages the data loading.

![Architectural diagram showing supported data sources](https://www.tigergraph.com/docs/tigergraph-server/4.2/data-loading/_images/loading-arch_3.11-rev2.png) 

Figure 1\. TigerGraph Data Loading Options

## Data Sources

You have several options for data sources:

* **Local Files**: Files residing on a TigerGraph server can be loaded without the need to create a GSQL DATA\_SOURCE object. This option can have the highest performance.
* **Outside Sources**: Loading data from an outside source, such as cloud storage, requires one additional step to first define a DATA\_SOURCE object, which uses the [Kafka Connect](https://docs.confluent.io/platform/current/connect/index.html) framework. Kafka offers a distributed, fault-tolerant, real-time data pipeline with concurrency. By encapsulating the details of the data source connection in a DATA\_SOURCE object, GSQL can treat the source like it treats a local file. You can use this approach for the following data sources:  
   * Cloud storage (Amazon S3, Azure Blob Storage, Google Cloud Storage)  
   * Data warehouse query results (Google BigQuery, Snowflake, PostgreSQL)  
   * External Kafka cluster  
   See the pages for the specific method that fits your data source.
* **Spark**: The TigerGraph [Spark Connector](https://www.tigergraph.com/docs/tigergraph-server/4.2/data-loading/load-from-spark-dataframe.md) is used with Apache Spark to read data from a Spark DataFrame (or Data Lake) and write to TigerGraph. Users can leverage it to connect TigerGraph to the Spark ecosystem and load data from any Spark data sources

## Loading Workflow

TigerGraph uses the same workflow for both local file and Kafka Connect loading:

1. **Specify a graph**. Data is always loading to exactly one graph (though that graph could have global vertices and edges which are shared with other graphs). For example:  
```gsql  
USE GRAPH ldbc_snb  
```
2. If you are using Kafka Connect, **define a `DATA_SOURCE` object**. See the details on the pages for[cloud storage](https://www.tigergraph.com/docs/tigergraph-server/4.2/data-loading/load-from-cloud.md),[BigQuery](https://www.tigergraph.com/docs/tigergraph-server/4.2/data-loading/load-from-warehouse.md#_bigquery),[Snowflake](https://www.tigergraph.com/docs/tigergraph-server/4.2/data-loading/load-from-warehouse.md#_snowflake),[PostgreSQL](https://www.tigergraph.com/docs/tigergraph-server/4.2/data-loading/load-from-warehouse.md#_postgresql) or[Kafka](https://www.tigergraph.com/docs/tigergraph-server/4.2/data-loading/load-from-kafka.md#_configure_the_kafka_source)
3. **Create a [loading job](https://www.tigergraph.com/docs/tigergraph-server/4.2/data-loading/data-loading-overview.md#_loading_jobs)**.
4. **Run your loading job**.

## Loading Jobs

A loading job tells the database how to construct vertices and edges from data sources.

CREATE LOADING JOB syntax

```gsql
CREATE LOADING JOB <job_name> FOR GRAPH <graph_name> {
  <DEFINE statements>
  <LOAD statements>
}
```

The opening line does some naming:

* assigns a name to this job: (`<job_name>`)
* associates this job with a graph (`<graph_name>`)

The loading job body has two parts:

1. DEFINE statements create variables to refer to data sources. These can refer to actual files or be placeholder names. The actual data sources can be given when running the loading job.
2. LOAD statements specify how to take the data fields from files to construct vertices or edges.

> [!NOTE]
> Refer to the [Creating a Loading Job](https://www.tigergraph.com/docs/gsql-ref/4.2/ddl-and-loading/creating-a-loading-job.md) documentation for full details
