configuration paragraph in scala
This commit is contained in:
parent
6ec96e2c82
commit
7ba3c61768
|
@ -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()))
|
||||
|
|
|
@ -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
|
|
@ -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__"
|
Loading…
Reference in New Issue