When using dataframe's DataSchema, how can one use...
# datascience
r
When using dataframe's DataSchema, how can one use ImportDataSchema and pass Jdbc param values from environment variable?
loading 1
I dont think this is supported yet. Will have to generate from template during compile I guess?
n
Yeah, I don’t think it is supported yet. Generating from a template or creating a schema using Gradle should work. Folks from the team will correct me if I am wrong.
n
@Nikita Ermolenko is right. Here's our Gradle plugin reference https://kotlin.github.io/dataframe/gradlereference.html#schema-definitions-from-sql-databases and some Gradle documentation for reading env variable https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_environment_variables
Gradle provides a number of environment variables, which are listed below. You can access environment variables as properties in the build script using the
System.getenv()
method
Having this supported in
ImportDataSchema
is a great idea btw
r
Got this! Your fast reply is greatly appreciated!Thanks Nikitas 😉