Loading data from s3 to redshift using copy command
<p>I have a scenario where I need to load data from Amazon S3 into Amazong Redshift database.</p>

<p>The files in S3 are all JSON which reside under various folders in a bucket. Each folder indicates the date it was generated.</p>

<p>For instance, This is a sample folder structure in S3 :</p>

<ol>
<li>Bucket (B1)<br>
A. Folder (F1)<br>
  i.  file1.json, file2.json ... so on
B. Folder (F2)<br>
  ii. file22.json, file23.json ... so on</li>
</ol>

<p>Each of the JSON files do not have a single root element. They have the following format - </p>

<blockquote>
  <p>file1.json</p>
</blockquote>

<pre><code>{
Key : Value,
Key1 : [ some  array],
Key2 : value3,
}

{
Key : Value1,
Key1 : [ some  array1],
Key2 : value2,
}
</code></pre>

<p>I want to know if there is a way to load these data recursively (as the json resides in multiple folders) into redshift using copy command.</p>

<p>(OR)</p>

<p>if there is any better method to load the data apart from using copy command.</p>