Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/cddp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,7 @@ def load_sample_data(spark, data_str, format="json"):
table_name = "tmp_"+str(uuid.uuid4()).replace("-", "")
df.createOrReplaceTempView("tmp_"+table_name)
df = spark.sql("select * from tmp_"+table_name + " limit "+str(25))
data = df.toJSON().map(lambda j: json.loads(j)).collect()
json_str = json.dumps(data)
json_str = df.toPandas().to_json(orient='records')
schema = df.schema.json()
return json_str, schema

Expand Down
10 changes: 6 additions & 4 deletions src/cddp/dbxapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ def build_tasks(config, working_dir, config_path, dbx_cluster):
task_obj["depends_on"].append({"task_key": standard_gate["task_key"]})
tasks.append(task_obj)
for dep in dependency:
if(config["standard"][dep]["type"] == "batch"):
task_obj["depends_on"].append({"task_key": dep})
for std_conf in config["standard"]:
if(std_conf["name"] == dep and std_conf["type"] == "batch"):
task_obj["depends_on"].append({"task_key": dep})

for task in config["serving"]:
type = task["type"]
Expand All @@ -122,8 +123,9 @@ def build_tasks(config, working_dir, config_path, dbx_cluster):
task_obj["depends_on"].append({"task_key": serving_gate["task_key"]})
tasks.append(task_obj)
for dep in dependency:
if(config["serving"][dep]["type"] == "batch"):
task_obj["depends_on"].append({"task_key": dep})
for srv_conf in config["serving"]:
if(srv_conf["name"] == dep and srv_conf["type"] == "batch"):
task_obj["depends_on"].append({"task_key": dep})

return tasks

Expand Down
4 changes: 2 additions & 2 deletions web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ var app = new Vue({
}
} else if (this.currentPipelineStandardTask['code']['lang'] == 'python') {
this.initStandardPyEditor()
if(that.standardPyEditor==null) {
if(that.standardPyEditor != null) {
setTimeout(function () {
if (!that.currentPipelineStandardTask['code']['python']) {
that.currentPipelineStandardTask['code']['python'] = ""
Expand Down Expand Up @@ -507,7 +507,7 @@ var app = new Vue({
}
} else if (this.currentPipelineServingTask['code']['lang'] == 'python') {
this.initServingPyEditor()
if(that.servingPyEditor==null) {
if(that.servingPyEditor != null) {
setTimeout(function () {
if (!that.currentPipelineServingTask['code']['python']) {
that.currentPipelineServingTask['code']['python'] = ""
Expand Down