KsqlRestClient.makeKsqlRequest("RUN SCRIPT ...") doesn't work without filling ksql.schema.file.content with the script content yourself - scala

In my Scala application, I am trying to tell my KSQL Server that it should execute the RUN SCRIPT <script> command, using the KsqlRestClient.makeKsqlRequest(String ksql) function. Every time I tried it, nothing happened, even though the response was successful, so I started debugging, where I saw that the response was a success but it also returned some kind of error that the property ksql.schema.file.content was empty.
Since I did not find any documentation as to what to fill this property with, I tried some things and eventually found out that if you fill this property with the contents of your .sql file, the run script command works.
Does anybody know if and with what ksql.schema.file.content should normally be filled and/or if the way I am using it is how your supposed to execute a script in KSQL from a Scala application. I already copy and pasted the text from the makeKsqlRequest into the KSQL CLI and everything worked fine, so there should be no error with that.

There is a Github issue tracking the fact that the RESTful API is not documented / supported yet, (as of March 2018).
It sounds like this is something you may want to add a +1 too.

Related

Pulumi output handling during preview

I'm trying to figure out how to work well with outputs dependency and previews on Pulumi.
I’m trying to fetch an aws cert using getIssuerCAThumbprint() function with TypeScript, which gets a http agent and an issueUrl output.
When i’m trying to preview it’s waiting the cert to be fetched and really waiting the issueUrl output to be resolved, but it's not the desired behavior I was imagining when previewing code with outputs.
I thought that the function that gets the output will return kind of mock result or something that will let the preview run successfully because in that way i cannot run my preview without failing.
Any idea what i'm doing wrong ? or understanding wrong ?

Using codemirror to execute code on server

Novice to Codemirror.
I have codemirror running on my server I have it set to Python mode. Can someone please suggest how I go about executing the code and showing the result on the page where I have written the python code
Thanks
Without knowing much about your setup, here's a general idea:
Use the getValue() method to get the code from your CodeMirror instance.
Assuming the code is a run-able Python script, you can either
(1) send the code to your back end with AJAX or a POST request and run it there. Or (2) you could run the Python script in the browser with a library like one discussed here.
If you ran it on the back end, you can send the result of running the code back as text or JSON with your preferred protocol. If you ran it on the browser, you should probably follow the guidelines for the specific library you used.

Setting a value in Frappe application isn't reflected in ERPNext GUI

I have added a 'number_of_members' value to the Customer DocType via customization.
In my application I have tried several ways to update the value. However the value never updates in the webpage. I feel like I'm missing some sort of save or update or commit step.
For example I have tried:
frappe.client.set_value('Customer', '00042', 'number_of_members', 8887)
frappe.set_value('Customer', '00042', 'number_of_members', 8887)
frappe.db.set_value('Customer', '00042', 'number_of_members', 8887)
and also
customer = frappe.get_doc('Customer', '00042')
customer.number_of_members = 8887
customer.save()
In each case I can do something like frappe.get_value, or frappe.get_doc and it shows the value is set to 8887. However it never updates in the web side. This is what makes me think I'm updating some sort of cache or database transaction and I need some way to save it, but have not had any luck.
I am mostly testing this via bench console if that has any bearing on it, but I've tried a couple of the methods in my application code as well.
Relevant documentation:
Frappe Developer API - Document
Frappe Developer API - Database
Turns out the answer is to call frappe.db.commit() after making changes. If someone can point this out in the documentation so I can better understand how I'm missing stuff, I would appreciate it.
I also noticed if you try to Save something in the UI before you send frappe.db.commit() the UI will hang.

Is it possible to provide seprate server for each user in oracle 10g?

I am getting error whenever i recompile my workflow package.
to solve this error i have to bounce the server which is used among no of users.
if it is possible to get separate server so i can bounce and test it without disturbing DBA/system admin.
Aha; it seems that you posted two questions for the same problem; this is another one.
As of your problem: Oracle says this:
ORA-06508: PL/SQL: could not find program unit being called: "APPS.ATL_OARR_PCKG" '
in 'PLSQL' API 'ATL_OARR_PCKG.GET_CUSTOM_NOTIF'
Why wouldn't you make sure that all objects, referenced by your package, exist before you compile it? What benefit do you see in having an invalid package? You can't use it anyway, you can't test it, you can't do anything.
Therefore, having yet another server most probably won't fix that problem, because I suspect that missing package (if that's what ATL_OARR_PCKG is) won't automagically appear on the new server.

Having trouble using Mechanize

So I'm new to using mechanize, and I'm trying to write a program in python 2.7 to log me into my campus wifi.
So I've written some code using mechanize that should log me in. The names of each field are accurate, as is the form name. However, whenever i run the program, nothing seems to happen. it doesn't submit the data, and the program stays running, so i have to force close it.
am i missing anything? i've been hunting over the web, and what i'm doing seems to be okay.
mechbrowse=mechanize.Browser()
mechbrowse.open(login_page)
mechbrowse.select_form(name='frmHTTPClientLogin')
mechbrowse.form['username'] = login_username
mechbrowse.form['password'] = login_password
mechbrowse.submit(name='btnSubmit')
do i need to write anything so that all this gets executed?