title: Redshift: copy command Json data from s3
body: <p>I have the following JSON data.</p>
  
  <pre><code>{  
     "recordid":"69",
     "recordTimestamp":1558087302591,
     "spaceId":"space-cd88557d",
     "spaceName":"Kirtipur",
     "partnerId":"Kirtipur",
     "eventType":"event-location-update",
     "eventlocationupdate":{  
        "event":{  
           "eventid":"event-qcTUrDAThkbPsXi438rRk",
           "userId":"",
           "tags":[  
  
           ],
           "mobile":"",
           "email":"",
           "gender":"OTHER",
           "firstName":"",
           "lastName":"",
           "postalCode":"",
           "optIns":[  
  
           ],
           "otherFields":[  
  
           ],
           "macAddress":"55:56:81a4:6d"
        },
        "location":{  
           "locationId":"location-bdfsfsf6a8d96",
           "name":"Kirtipur Office - wireless",
           "inferredLocationTypes":[  
              "NETWORK"
           ],
           "parent":{  
              "locationId":"location-c39ffc49",
              "name":"Kirtipur",
              "inferredLocationTypes":[  
                 "vianet"
              ],
              "parent":{  
                 "locationId":"location-8b47asdfdsf1c6a",
                 "name":"Kirtipur",
                 "inferredLocationTypes":[  
                    "ROOT"
                 ]
              }
           }
        },
        "ssid":"",
        "rawUserId":"",
        "visitId":"visit-ca04ds5secb8d",
        "lastSeen":1558087081000,
        "deviceClassification":"",
        "mapId":"",
        "xPos":1.8595887,
        "yPos":3.5580606,
        "confidenceFactor":0.0,
        "latitude":0.0,
        "longitude":0.0
     }
  }
  </code></pre>
  
  <p>I need to load this from the s3 bucket using the copy command. I have uploaded this file to my S3 bucket.</p>
  
  <p>I have worked with copy command for csv files but have not worked with copy command on JSON files. I researched regarding json import via copy command but did not find solid helpful command examples.</p>
  
  <p>I used the following code for my copy command.</p>
  
  <pre><code>COPY vianet_raw_data 
  from 's3://vianet-test/vianet.json' 
  with credentials as '' 
  format as json 'auto';
  
  </code></pre>
  
  <p>This did not insert any data. </p>
  
  <p>Can anyone please help me with the copy command for such JSON?</p>
  
  <p>Thanks and Regards</p>