title: Loading files based on pattern matching in spark
body: <p>I have 31 inputs files with named from <code>date=2018-01-01</code> till <code>date=2018-01-31</code>.</p>
  
  <p>I am able to load all these files into an rdd this way:</p>
  
  <pre><code>val input = sc.textFile("hdfs://user/cloudera/date=*")
  </code></pre>
  
  <p>But what if I want to load the files for only 1 week? (files from date=2018-01-15 to date=2018-01-22).</p>