title: How to read the resource file? (google cloud dafaflow)
body: <p>My Dataflow pipeline needs to read a resource file <code>GeoLite2-City.mmdb</code>. I added it to my project and ran the pipeline. I confirmed that the project package zip file exists in the staging bucket on GCS.</p>
  
  <p>However, when I try to read the resource file <code>GeoLite-City.mmdb</code>, I get a <code>FileNotFoundException</code>. How can I fix this? This is my code:</p>
  
  <pre><code>String path = myClass.class.getResource("/GeoLite2-City.mmdb").getPath();
  
  File database = new File(path);
  
  try
  {
  
  DatabaseReader reader = new DatabaseReader.Builder(database).build(); //&lt;-this line get a FileNotFoundException
  
  }
  
  catch (IOException e)
  
  {
  
  LOG.info(e.toString());
  
  }
  </code></pre>
  
  <p>My project package zip file is "classes-WOdCPQCHjW-hRNtrfrnZMw.zip"
  (it contains class files and <code>GeoLite2-City.mmdb</code>)</p>
  
  <p>The path value is "<code>file:/dataflow/packages/staging/classes-WOdCPQCHjW-hRNtrfrnZMw.zip!/GeoLite2-City.mmdb</code>", however it cannot be opened.</p>
  
  <p>and This is the options.</p>
  
  <pre><code>--runner=BlockingDataflowPipelineRunner 
  --project=peak-myproject 
  --stagingLocation=gs://mybucket/staging 
  --input=gs://mybucket_log/log.68599ca3.gz
  </code></pre>
  
  <p>The Goal is transform the log file on GCS, and insert the transformed data to BigQuery.
  When i ran locally, it was success importing to Bigquery.
  i think there is a difference local PC and GCE to get the resource path.</p>