configuration paragraph in scala

This commit is contained in:
Michele Artini 2021-11-08 16:15:16 +01:00
parent 6ec96e2c82
commit 7ba3c61768
3 changed files with 9 additions and 16 deletions

View File

@ -140,7 +140,7 @@ public class ZeppelinClient {
private Paragraph confParagraph(final MDStoreWithInfo mdstore, final String currentVersionPath) throws MDStoreManagerException {
try {
final String code = IOUtils.toString(getClass().getResourceAsStream("/zeppelin/conf.tmpl.py"), StandardCharsets.UTF_8)
final String code = IOUtils.toString(getClass().getResourceAsStream("/zeppelin/paragraph_conf.tmpl"), StandardCharsets.UTF_8)
.replaceAll("__DS_NAME__", StringEscapeUtils.escapeJava(mdstore.getDatasourceName()))
.replaceAll("__DS_ID__", StringEscapeUtils.escapeJava(mdstore.getDatasourceId()))
.replaceAll("__API_ID__", StringEscapeUtils.escapeJava(mdstore.getApiId()))

View File

@ -1,15 +0,0 @@
%pyspark
dsName = "__DS_NAME__"
dsId = "__DS_ID__"
apiId = "__API_ID__"
mdId = "__MDSTORE_ID__"
mdVersion = "__VERSION__"
path = "__PATH__"
print "Datasource Name:", dsName
print "Datasource ID:", dsId
print "Api ID:", apiId
print "MdStore ID:", mdId
print "Version ID:", mdVersion
print "Version Data Path:", path

View File

@ -0,0 +1,8 @@
%spark
val dsName = "__DS_NAME__"
val dsId = "__DS_ID__"
val apiId = "__API_ID__"
val mdId = "__MDSTORE_ID__"
val mdVersion = "__VERSION__"
val path = "__PATH__"