load

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package load provides APOC data loading functions.

This package implements all apoc.load.* functions for loading data from external sources (JSON, CSV, XML, JDBC, etc.).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Arrow

func Arrow(url string) ([]map[string]interface{}, error)

Arrow loads Apache Arrow data.

Example:

apoc.load.arrow('http://example.com/data.arrow') => data

func Avro

func Avro(url string) ([]map[string]interface{}, error)

Avro loads Apache Avro data.

Example:

apoc.load.avro('http://example.com/data.avro') => data

func Azure

func Azure(url string, config map[string]interface{}) ([]byte, error)

Azure loads data from Azure Blob Storage.

Example:

apoc.load.azure('https://account.blob.core.windows.net/container/blob', {}) => data

func Binary

func Binary(url string) ([]byte, error)

Binary loads binary data from a URL.

Example:

apoc.load.binary('http://example.com/file.bin') => bytes

func Csv

func Csv(urlOrFile string, config map[string]interface{}) ([]map[string]interface{}, error)

Csv loads CSV data from a URL or file.

Example:

apoc.load.csv('http://example.com/data.csv', {delimiter: ',', header: true}) => rows
apoc.load.csv('/path/to/file.csv', {delimiter: ',', header: true}) => rows

func CsvStream

func CsvStream(url string, config map[string]interface{}) ([]map[string]interface{}, error)

CsvStream loads CSV data as a stream.

Example:

apoc.load.csvStream('http://example.com/data.csv', {}) => stream of rows

func Directory

func Directory(path string, pattern string) ([]string, error)

Directory loads all files from a directory.

Example:

apoc.load.directory('/path/to/dir', '*.json') => file list

func DirectoryTree

func DirectoryTree(path string) (map[string]interface{}, error)

DirectoryTree loads directory structure as a tree.

Example:

apoc.load.directoryTree('/path/to/dir') => tree structure

func Driver

func Driver(driverName string, url string, query string) (interface{}, error)

Driver loads data using a custom driver.

Example:

apoc.load.driver('mongodb', 'mongodb://localhost/db', 'users.find()') => data

func Elasticsearch

func Elasticsearch(url string, index string, query string) ([]map[string]interface{}, error)

Elasticsearch loads data from Elasticsearch.

Example:

apoc.load.elasticsearch('http://localhost:9200', 'index', 'query') => hits

func Gcs

func Gcs(url string, config map[string]interface{}) ([]byte, error)

Gcs loads data from Google Cloud Storage.

Example:

apoc.load.gcs('gs://bucket/key', {credentials: {...}}) => data

func GraphQL

func GraphQL(url string, query string, variables map[string]interface{}) (interface{}, error)

GraphQL loads data from a GraphQL endpoint.

Example:

apoc.load.graphql('http://api.com/graphql', 'query { users { id name } }', {}) => data

func Html

func Html(url string, config map[string]interface{}) (map[string]interface{}, error)

Html loads HTML data from a URL.

Example:

apoc.load.html('http://example.com', {}) => parsed HTML

func Jdbc

func Jdbc(jdbcUrl string, query string) ([]map[string]interface{}, error)

Jdbc loads data from a JDBC database connection.

Example:

apoc.load.jdbc('jdbc:mysql://localhost/db', 'SELECT * FROM users') => rows

func JdbcUpdate

func JdbcUpdate(jdbcUrl string, query string) (int, error)

JdbcUpdate executes an update query via JDBC.

Example:

apoc.load.jdbcUpdate('jdbc:mysql://localhost/db', 'UPDATE users SET active=1') => count

func Json

func Json(urlOrFile string) (interface{}, error)

Json loads JSON data from a URL or file.

Example:

apoc.load.json('http://example.com/data.json') => parsed data
apoc.load.json('/path/to/file.json') => parsed data

func JsonArray

func JsonArray(url string) ([]interface{}, error)

JsonArray loads a JSON array from a URL.

Example:

apoc.load.jsonArray('http://example.com/data.json') => array

func JsonParams

func JsonParams(url string, headers map[string]string, method string) (interface{}, error)

JsonParams loads JSON with parameters.

Example:

apoc.load.jsonParams('http://api.com/data', {headers: {...}}, 'POST') => data

func JsonSchema

func JsonSchema(data interface{}, schema map[string]interface{}) (map[string]interface{}, error)

JsonSchema validates JSON against a schema.

Example:

apoc.load.jsonSchema(data, schema) => {valid: true}

func JsonStream

func JsonStream(url string) ([]interface{}, error)

JsonStream loads JSON data as a stream.

Example:

apoc.load.jsonStream('http://example.com/data.json') => stream of objects

func Kafka

func Kafka(brokers string, topic string, config map[string]interface{}) ([]map[string]interface{}, error)

Kafka loads messages from Apache Kafka.

Example:

apoc.load.kafka('localhost:9092', 'topic', {}) => messages

func Ldap

func Ldap(url string, baseDN string, filter string) ([]map[string]interface{}, error)

Ldap loads data from an LDAP server.

Example:

apoc.load.ldap('ldap://server', 'dc=example,dc=com', '(uid=*)') => entries

func Parquet

func Parquet(url string) ([]map[string]interface{}, error)

Parquet loads Apache Parquet data.

Example:

apoc.load.parquet('http://example.com/data.parquet') => data

func Redis

func Redis(addr string, command string, args ...string) (interface{}, error)

Redis loads data from Redis.

Example:

apoc.load.redis('localhost:6379', 'GET', 'key') => value

func Rest

func Rest(url string, config map[string]interface{}) (interface{}, error)

Rest loads data from a REST API.

Example:

apoc.load.rest('http://api.com/users', {method: 'GET'}) => data

func S3

func S3(url string, config map[string]interface{}) ([]byte, error)

S3 loads data from Amazon S3.

Example:

apoc.load.s3('s3://bucket/key', {credentials: {...}}) => data

func Stream

func Stream(url string, config map[string]interface{}) (io.ReadCloser, error)

Stream loads data as a stream.

Example:

apoc.load.stream('http://example.com/data', {format: 'json'}) => stream

func Xml

func Xml(url string) (map[string]interface{}, error)

Xml loads XML data from a URL or file.

Example:

apoc.load.xml('http://example.com/data.xml') => parsed XML

func XmlSimple

func XmlSimple(url string) (map[string]interface{}, error)

XmlSimple loads XML data in simplified format.

Example:

apoc.load.xmlSimple('http://example.com/data.xml') => simplified XML

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL