0

I am very new to spark. Please help me with below query:

Suppose I have different file path in dev and prod and i do not want to hardcode the same in my spark scala code rather I want to use variable in my code so my doubt is that where I define these variables for dev and prod and how to access them in my code.

1 Answers1

0

Here are a few options:

  • Pass variables as command line parameters to your Spark application
  • Use the property/config file to keep those variables
  • Create environmental variables for these variables

For implementation, follow these articles.

Vikramsinh Shinde
  • 2,742
  • 2
  • 23
  • 29