title: Spark properties file read
body: <p>I tried to read a properties file in spark where my file location is     available while run the job getting below error
      code is</p>
  
  <pre><code>object runEmpJob {    
    def main(args: Array[String]): Unit = {
  
      println("starting emp job")
      val props = ConfigFactory.load()
      val envProps = props.getConfig("C:\\Users\\mmishra092815\\IdeaProjects\\use_case_1\\src\\main\\Resource\\filepath.properties")
  
      System.setProperty("hadoop.home.directory", "D:\\SHARED\\winutils-master\\hadoop-2.6.3\\bin")
  
      val spark = SparkSession.builder().
           appName("emp dept operation").
           master(envProps.getString("Dev.executionMode")).
           getOrCreate()
      val empObj = new EmpOperation
  
      empObj.runEmpOperation(spark, "String", fileType = "csv")
  
      val inPutPath = args(1)
      val outPutPath = args(2)    
    }
  }
  
  
  getting error:
  </code></pre>
  
  <blockquote>
    <p>Exception in thread "main"
    com.typesafe.config.ConfigException$BadPath: path parameter: Invalid path C:\Users\mmishra092815\IdeaProjects\use_case_1\src\main\Resource\filepath.properties':
    Token not allowed in path expression: ':' (you can double-quote this token if you really want it here)<br>
    at com.typesafe.config.impl.PathParser.parsePathExpression(PathParser.java:155)<br>
    at com.typesafe.config.impl.PathParser.parsePathExpression(PathParser.java:74)<br>
    at com.typesafe.config.impl.PathParser.parsePath(PathParser.java:61)<br>
    at com.typesafe.config.impl.Path.newPath(Path.java:230)<br>
    at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:192)<br>
    at com.typesafe.config.impl.SimpleConfig.getObject(SimpleConfig.java:268)<br>
    at com.typesafe.config.impl.SimpleConfig.getConfig(SimpleConfig.java:274)
    at com.typesafe.config.impl.SimpleConfig.getConfig(SimpleConfig.java:41) 
    at executor.runEmpJob$.main(runEmpJob.scala:12)<br>
    at executor.runEmpJob.main(runEmpJob.scala)<br>
    Process finished with exit code 1</p>
  </blockquote>