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 ¶
- func Arrow(url string) ([]map[string]interface{}, error)
- func Avro(url string) ([]map[string]interface{}, error)
- func Azure(url string, config map[string]interface{}) ([]byte, error)
- func Binary(url string) ([]byte, error)
- func Csv(urlOrFile string, config map[string]interface{}) ([]map[string]interface{}, error)
- func CsvStream(url string, config map[string]interface{}) ([]map[string]interface{}, error)
- func Directory(path string, pattern string) ([]string, error)
- func DirectoryTree(path string) (map[string]interface{}, error)
- func Driver(driverName string, url string, query string) (interface{}, error)
- func Elasticsearch(url string, index string, query string) ([]map[string]interface{}, error)
- func Gcs(url string, config map[string]interface{}) ([]byte, error)
- func GraphQL(url string, query string, variables map[string]interface{}) (interface{}, error)
- func Html(url string, config map[string]interface{}) (map[string]interface{}, error)
- func Jdbc(jdbcUrl string, query string) ([]map[string]interface{}, error)
- func JdbcUpdate(jdbcUrl string, query string) (int, error)
- func Json(urlOrFile string) (interface{}, error)
- func JsonArray(url string) ([]interface{}, error)
- func JsonParams(url string, headers map[string]string, method string) (interface{}, error)
- func JsonSchema(data interface{}, schema map[string]interface{}) (map[string]interface{}, error)
- func JsonStream(url string) ([]interface{}, error)
- func Kafka(brokers string, topic string, config map[string]interface{}) ([]map[string]interface{}, error)
- func Ldap(url string, baseDN string, filter string) ([]map[string]interface{}, error)
- func Parquet(url string) ([]map[string]interface{}, error)
- func Redis(addr string, command string, args ...string) (interface{}, error)
- func Rest(url string, config map[string]interface{}) (interface{}, error)
- func S3(url string, config map[string]interface{}) ([]byte, error)
- func Stream(url string, config map[string]interface{}) (io.ReadCloser, error)
- func Xml(url string) (map[string]interface{}, error)
- func XmlSimple(url string) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Arrow ¶
Arrow loads Apache Arrow data.
Example:
apoc.load.arrow('http://example.com/data.arrow') => data
func Avro ¶
Avro loads Apache Avro data.
Example:
apoc.load.avro('http://example.com/data.avro') => data
func Azure ¶
Azure loads data from Azure Blob Storage.
Example:
apoc.load.azure('https://account.blob.core.windows.net/container/blob', {}) => data
func Binary ¶
Binary loads binary data from a URL.
Example:
apoc.load.binary('http://example.com/file.bin') => bytes
func Csv ¶
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 ¶
CsvStream loads CSV data as a stream.
Example:
apoc.load.csvStream('http://example.com/data.csv', {}) => stream of rows
func Directory ¶
Directory loads all files from a directory.
Example:
apoc.load.directory('/path/to/dir', '*.json') => file list
func DirectoryTree ¶
DirectoryTree loads directory structure as a tree.
Example:
apoc.load.directoryTree('/path/to/dir') => tree structure
func Driver ¶
Driver loads data using a custom driver.
Example:
apoc.load.driver('mongodb', 'mongodb://localhost/db', 'users.find()') => data
func Elasticsearch ¶
Elasticsearch loads data from Elasticsearch.
Example:
apoc.load.elasticsearch('http://localhost:9200', 'index', 'query') => hits
func Gcs ¶
Gcs loads data from Google Cloud Storage.
Example:
apoc.load.gcs('gs://bucket/key', {credentials: {...}}) => data
func GraphQL ¶
GraphQL loads data from a GraphQL endpoint.
Example:
apoc.load.graphql('http://api.com/graphql', 'query { users { id name } }', {}) => data
func Html ¶
Html loads HTML data from a URL.
Example:
apoc.load.html('http://example.com', {}) => parsed HTML
func Jdbc ¶
Jdbc loads data from a JDBC database connection.
Example:
apoc.load.jdbc('jdbc:mysql://localhost/db', 'SELECT * FROM users') => rows
func JdbcUpdate ¶
JdbcUpdate executes an update query via JDBC.
Example:
apoc.load.jdbcUpdate('jdbc:mysql://localhost/db', 'UPDATE users SET active=1') => count
func Json ¶
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 ¶
JsonArray loads a JSON array from a URL.
Example:
apoc.load.jsonArray('http://example.com/data.json') => array
func JsonParams ¶
JsonParams loads JSON with parameters.
Example:
apoc.load.jsonParams('http://api.com/data', {headers: {...}}, 'POST') => data
func JsonSchema ¶
JsonSchema validates JSON against a schema.
Example:
apoc.load.jsonSchema(data, schema) => {valid: true}
func JsonStream ¶
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 ¶
Ldap loads data from an LDAP server.
Example:
apoc.load.ldap('ldap://server', 'dc=example,dc=com', '(uid=*)') => entries
func Parquet ¶
Parquet loads Apache Parquet data.
Example:
apoc.load.parquet('http://example.com/data.parquet') => data
func Redis ¶
Redis loads data from Redis.
Example:
apoc.load.redis('localhost:6379', 'GET', 'key') => value
func Rest ¶
Rest loads data from a REST API.
Example:
apoc.load.rest('http://api.com/users', {method: 'GET'}) => data
func S3 ¶
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
Types ¶
This section is empty.