https://kotlinlang.org logo
#datascience
Title
# datascience
r

Richard Glen

04/02/2024, 1:31 PM
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

Nikita Ermolenko

04/02/2024, 3:10 PM
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 Klimenko [JB]

04/02/2024, 3:53 PM
@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

Richard Glen

04/03/2024, 1:15 AM
Got this! Your fast reply is greatly appreciated!Thanks Nikitas 😉