The CSV connector loads metadata into the Neo4j semantic graph from a directory of structured CSV files. It is useful when your data source doesn’t have a dedicated Neocarta connector, when you want to manually curate or augment metadata, or when migrating metadata from another tool. A sample e-commerce dataset is included inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/neo4j-labs/neocarta/llms.txt
Use this file to discover all available pages before exploring further.
datasets/csv/ so you can test the connector immediately.
Import
Parameters
Filesystem path to the directory containing CSV files.
Connected Neo4j driver instance.
Target Neo4j database name.
Optional mapping from
NodeLabel / RelationshipType enum members (or their string values) to custom CSV filenames. Merges with the default filename map, allowing partial overrides. See Custom File Mapping below.ingest() Parameters
Node types to load. When omitted, all available CSV files are loaded. Accepts
NodeLabel enum members (recommended) or their exact string values, e.g. "Database".Relationship types to load. When omitted, all available CSV files are loaded. Accepts
RelationshipType enum members (recommended) or their exact string values, e.g. "HAS_SCHEMA".Default CSV Filenames
The connector expects CSV files with the following default names. Any file can be renamed usingcsv_file_map.
| CSV File | Node / Relationship |
|---|---|
database_info.csv | Database |
schema_info.csv | Schema |
table_info.csv | Table |
column_info.csv | Column |
column_references_info.csv | REFERENCES |
value_info.csv | Value |
query_info.csv | Query |
query_table_info.csv | USES_TABLE |
query_column_info.csv | USES_COLUMN |
glossary_info.csv | Glossary |
category_info.csv | Category |
business_term_info.csv | BusinessTerm |
ID Strategy
Entity IDs are computed from name columns using a dot-separated hierarchy. Choose one strategy and apply it consistently across all files.- Auto-generated (recommended)
- Explicit IDs
Omit all
*_id columns. IDs are built automatically:| Entity | Required columns | Generated ID |
|---|---|---|
| Database | database_name | {database_name} |
| Schema | database_name, schema_name | {database_name}.{schema_name} |
| Table | database_name, schema_name, table_name | {database_name}.{schema_name}.{table_name} |
| Column | database_name, schema_name, table_name, column_name | {database_name}.{schema_name}.{table_name}.{column_name} |
| Glossary | glossary_name | {glossary_name} |
| Category | glossary_name, category_name | {glossary_name}.{category_name} |
| BusinessTerm | glossary_name, category_name, term_name | {glossary_name}.{category_name}.{term_name} |
Code Example
Selective Ingest
Useinclude_nodes and include_relationships to load only a subset of the available data:
Custom File Mapping
Configure custom filenames at construction time usingcsv_file_map. The map merges with the defaults, so you only need to specify the files you want to rename:
CLI
Required Environment Variables
| Variable | Purpose |
|---|---|
NEO4J_URI | Neo4j connection URI |
NEO4J_USERNAME | Neo4j username |
NEO4J_PASSWORD | Neo4j password |
NEO4J_DATABASE | Target Neo4j database (default: neo4j) |
A ready-to-use sample e-commerce dataset lives in
datasets/csv/. It demonstrates the full CSV structure — database, schema, tables, columns, foreign keys, sample values, query logs, and a business glossary — and can be used to test the connector without any external data source.