# Importing multiple JSON files ( json bulk import)

**URL:** <https://community.neo4j.com/t/importing-multiple-json-files-json-bulk-import/10529>\
**Category:** Import / Export\
**Tags:** cypher, operations, import, knowledge-base\
**Created:** [September 30, 2019, 7:48am UTC](https://community.neo4j.com/t/importing-multiple-json-files-json-bulk-import/10529 "2019-09-30T07:48:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scirat](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/scirat/32/4625_2.png) [@scirat](https://community.neo4j.com/u/scirat)\
**Post date:** [September 30, 2019, 7:48am UTC](https://community.neo4j.com/t/importing-multiple-json-files-json-bulk-import/10529/1 "2019-09-30T07:48:05Z")

</div>

Hello Everyone,

I'm modeling datasets for our network infrastructure, I have modeled much of the infrastructure. I got stuck in the bulk import of JSON interface files.  
I tried the import tool using regex, it returned an error.

\</\> \<bash-3.2$ ./neo4j-admin import --nodes:Interface="../import/device-interfaces\_\*" --ignore-missing-nodes \</\> Expected '--nodes' to have at least 1 valid item, but had 0

It appears that the import tool is only for csv files, so maybe a conversion is required.

The JSON file names look likes this:  
device-interfaces-[0-9a-z]-[0-9a-z]-[0-9a-z]-[0-9a-z].json  
{  
"response": [  
{  
"status": "up",  
"adminStatus": "UP",  
"macAddress": "",  
"ipv4Address": null,  
"voiceVlan": null,  
"description": " some desc",  
"className": "SwitchPort",  
"interfaceType": "Physical",  
"speed": "100000",  
"portMode": "access",  
"portType": "Ethernet Port",  
"duplex": "FullDuplex",  
"vlanId": "",  
"portName": "GigabitEthernet0/1",  
"id": ""  
}  
the datasets looks something like this.  
Any advice on the best way to bulk import JSONs, knowing they will have the same label 'Interface'.

Sofiane,

Thank you,

---

<div class="post-metadata">

**Author:** ![mark.needham](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/mark.needham/32/104_2.png) [@mark.needham](https://community.neo4j.com/u/mark.needham)\
**Post date:** [October 1, 2019, 12:22pm UTC](https://community.neo4j.com/t/importing-multiple-json-files-json-bulk-import/10529/2 "2019-10-01T12:22:39Z")

</div>

How many nodes/relationships are you trying to create from those JSON files?

A possible option is to use the Load JSON procedure from APOC, the Neo4j standard library. You can learn about that here - [https://neo4j.com/docs/labs/apoc/3.5/import/load-json/](https://neo4j.com/docs/labs/apoc/3.5/import/load-json/)

That is executed while the database is running though, which is different than what the neo4j-admin import tool does.

If you want to use neo4j-admin import, perhaps you could use the jq ([jq](https://stedolan.github.io/jq/)) tool to convert your JSON files into CSV format?

---

<div class="post-metadata">

**Author:** ![scirat](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/scirat/32/4625_2.png) [@scirat](https://community.neo4j.com/u/scirat)\
**Post date:** [November 27, 2019, 8:36pm UTC](https://community.neo4j.com/t/importing-multiple-json-files-json-bulk-import/10529/3 "2019-11-27T20:36:38Z")

</div>

Hi Mark,

Thanks for the input, I imported the datasets using apoc.load.json from the API , but it returned lots of NULLs for different properties. My temp fix ( though painstaking ) was to save the api datasets in a json file , correct/set the values , then import the file. However, I have to find a way, to condition my script, when I import from the API, when a property returns null, set it to value that I want it to be..
