I need to load data from multiple JSON files, each of which contains multiple entries in a Postgres table. I am using the following code but it is not working (I am using pgAdmin III for windows)
COPY tbl_staging_eventlog1 ("EId", "Category", "Mac", "Path", "ID") from 'C:\\SAMPLE.JSON' delimiter ',' ;
The contents of the SAMPLE.JSON file are similar (giving two entries out of many):
[{"EId":"104111","Category":"(0)","Mac":"ABV","Path":"C:\\Program Files (x86)\\Google","ID":"System.Byte[]"},{"EId":"104110","Category":"(0)","Mac":"BVC","Path":"C:\\Program Files (x86)\\Google","ID":"System.Byte[]"}]
json postgresql
anil
source share