Snowflake Python connector not connecting with AWS glue python shell - snowflake-cloud-data-platform

I'm trying to connect to snowflake using Glue python shell. I followed the following documentation https://community.snowflake.com/s/article/How-to-create-a-AWS-Glue-Job-in-Python-Shell-using-Wheel-and-Egg-files.
But python shell is not able to import snowflake library. Could any point me where I might be going wrong?

You need to create a .whl or .egg file for this purpose.
Please follow my blog.I have documented all the steps :
https://community.snowflake.com/s/article/AWS-Glue-Job-in-Python-Shell-using-Wheel-and-Egg-files

Related

Could I use Qpyton as a library to interpreter a necessary python subroutine?

I have an APP which needs a python lib to support.
So I would like to retrieve qpython in order to execute python.
Is there anyone has tried to do it before?
I am finding a way to retrieve the part of Qpython to serve my purpose, instead of execute on its ternimal; and, finally get the execution result back to my APP.
Thanks~
Yes, you could call the QPython's OPEN API,
http://www.qpython.org/en/guide_extend.html

How to use shp2pgsql

My question should be very simple to answer for anyone not being a self-taught newbie like me...
On this page is a cheatsheet concerning a function to be used in GIS/DB environnement : http://www.bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg
I would like to create a script allowing users to just have to click on it to launch the process, given the proper datas. But I don't understand how to use this. It obviously doesn't work in a Python console, nor directly in the windows console. How is it supposed to work ? What language is this ?
Thanks
shp2pgsql is indeed a command line tool. It comes with your PostgreSQL/PostGIS installation (usually) and, if not accessible via PATH-variable, can (usually) be run from within the /bin-folder in your PostgreSQL-Installation. You can also always 'make' the programm from source in any location yourself, if needed.
EDIT:
One way to set up a script (independent of whether you use it within qgis own python environment or not) would be to use Pythons subprocess (or os.system) module (check related question here) to write to shell and execute shp2pgsql.
A slightly more sophisitcated solution to (batch) insert (multiple) shapefiles via script could be to implement ogr2ogr via gdal/ogr module within python (check this blog). That, however, would require a working installation of the gdal core library, and the respective Python bindings (at least to use outside of QGIS Python environment, where it is pre-installed AFAIK), which can be tiresome at times. Once installed correctly, it offers a powerful (I dare say almighty) toolset for geodata management and manipulation via Python, though.
Apart from that, the blog link I provided also states the implementation of a batch insert script/tool (which operates ogr2ogr) in qgis 2.8 toolbox...maybe that can help you, either with your work directly or (via sourcecode) to point you in the direction of creating your own tool.

How to run matlab script on server? or Is there an online matlab interpreter?

I have a matlab script Temp_script.m (say) which,I want to execute on remote
server.
The server(remote) that I am using is free online hosting which gives me 1.5GB storage.
Since the server is remote one, I have no access to it, to install matlab software or runtime environment.
locally I can run the matlab script on my server.Obviously because I have matlab installed on my system.
My question "Is there a method to run the script online.? or Is there
any online interpreter for matlab?"
Thanking in advance
-Ryaan Dias
You can compile your project using deploytool.
This will give you several options, you can make a dll and probably even an exe.
However, the program is not going to run itself, so if you want it to run automatically on the server you need to have a framework there. Example could be .net but i guess there are easier ones.
AFAIK there isn't a web interface for Matlab, and I doubt that the Matlab license would cover such a use case. However, there you could always try to use the open-source equivalent Octave . Octave can execute Matlab code with only minor modifications.
A quick google search for Octave Web Server yielded many results. This was the first hit:http://knn.mimuw.edu.pl/weboctave-project/

How to generate client library

I am trying to generate java client library for my existing web application, but each time a select "generate cloud endpoint client library" the eclipse shows progress dialog and freezes.
Is there a command line tool (something like bin/endpoints.sh) that can be used to generate client library?
thanks in advance.
EDIT
Thanks Dan, I managed to generate client library by using this command:
$SDK/endpoints.sh get-client-lib com.test.MyEndpoint
You should be able to find out at least a little bit more information about the error in generating the library by looking at the Eclipse error log. However, I'm guessing the error is something generic like a 503 error from the service that generates the library.
The most common reason for those types of errors is that you're using an incompatible type in your entity class. Using the command line tool won't help in this case.
However, there are some cases where the command line tool has succeeded when GPE has failed. To generate the library without GPE run the following from the root of your application:
$SDK/bin/endpoints.sh get-java-client-lib helloworld.endpoint.HelloWorldEndpoint
Replace helloworld.endpoint.HelloWorldEndpoint with the space-delimited name(s) of your Endpoint class(es).

How can I start an RTC build via the command line?

The build definition is created but in order to automate the build process I need to start the build via the command line.
How is this done ? Reading the doc on the scm command line client this does'nt seem to be described :
http://pic.dhe.ibm.com/infocenter/rtc/v1r0m0/index.jsp?topic=%2Fcom.ibm.team.scm.doc%2Ftopics%2Fc_scm_cli.html
I don't think scm is involved at all for launching a build.
You check out the Java API: See "Automated Build Output Management Using the Plain Java Client Libraries".
Or, you can use the JB Toolkit, and use a task like requestTeamBuild:
The requestTeamBuild task requests a build by using a specified build definition.
There must be an active engine that supports the build definition in order for the request to succeed.

Resources