Apache Calcite CSV Adapter - SQL Client - apache-calcite

I am working on the development of a Connector interface with Elasticsearch (translate SQL to API DSL query syntax) .
I am starting with Apache Calcite CSV Adapter as a first step to test Calcite capabilities.
I followed the tutorial https://calcite.apache.org/docs/tutorial.html 
My question is how to use the JDBC connector (and which configuration) in a SQL client like Dbeaver or Squirrel... ?
Thanks
Edit:
This my configuration but it's not working
Error:

The DBeaver documentation describes how to add a new database driver. You can specify whatever parameters you need as well as provide a Calcite JAR file so the necessary code is available.
The class name should be org.apache.calcite.jdbc.Driver. The URL Template will be something like jdbc:calcite:model=path/to/model.json where you specify a path to a model.json file which contains the necessary model to create the connection.

Related

Google Cloud SQL: unsupported XML feature

Do Postgres databases on Google Cloud SQL support an XML type field? I am trying to import a Postgres 9.5 dump which has XML type fields and it throws an error saying unsupported XML feature.
Full error message from Google Cloud SQL console:
ERROR: unsupported XML feature DETAIL: This functionality requires the server to be built with libxml support. HINT: You need to rebuild PostgreSQL using --with-libxml.
I couldn't find any way to rebuild PostgreSQL on Google Cloud.
Supported flags for postgres Cloud SQL instances are listed here. There is an open public Feature Request for supporting this flag. I suggest you to add your use case there which would higher the possibility of implementation.

How to export a pyspark mlib machine learning model and deploy as a web service?

I have a linear regression model build using spark mlib. Now i want to export the model and use the model via a web service.
I was looking into PMML was not able to find a proper source as how can I use it. Do I need to install any specific PMML library or how can it be done.
The same model i tried exporting as a pickle file using joblib and deployed it as a web service via flask. I want to do something similar for the model developed in Spark mlib.
Can anyone please help me out or point me to correct source?
For a simple REST web service using PMML you could have a look at https://github.com/openscoring/openscoring. It uses JAVA though. For Python+Flask I have no idea but PMML is nothing more than a XML file which needs to be evaluated. So you could try to write your own Python logic to do it. I've also found this https://github.com/maxkferg/pmml-scoring-engine but it doesn't have much stars.
It is noted though that PMML is quite limited in its usage. Not all models are supported e.g. ALS. Another approach is to deploy a PySpark application via its binaries. I blogged about this here. We deployed it using Cloud Foundry but you can use the buildpack to deploy it on Heroku as well if you need a public endpoint. Hope this helps.

Migrating WSO2 api manager databases

I'm trying to migarte my API from one environment to another environment by copying H2 databases from wso2am-2.1.0/repository/database.
I know there is an utility for import/export but I have a lot of API and this utility is only processing by one API.
After copying databases , my APIs and tags are not shown in the store/publisher dashboard.
But if I check applications-->subscriptions, I can see theses API.
Any explication about this behaviour please?
Basically, WSO2 does not recommend to run production in H2 database. I hope this is a testing/ try out scenario. When you are running in production please use a production-ready databases such as oracle, mysql, mssql, etc.
The issue here is things you have listed as missing comes from the indexing. In your case, if there are lots of APIs, it would take time to index. WSO2 uses solr to index resources. If you copy the solr directory which resides in the WSO2 server folder to the new environment would work. Before replacing the folder please delete the complete folder in the new environment.
If this is not working you can re-index resources by following - https://stackoverflow.com/a/42646742/3176125.
When you are moving from one environment to another you need to copy the content which resides in the /repository/deployment/server/ folder. It contains synapse configs of the APIs, custom sequences, etc.

WSO2 Identity Server 3.2.3. Missing Ability to Add External User Stores

What happened to the ability to add an external user store with custom tables in WSO2 Identity Server 3.2.3?
We are evaluating use of this IS and it appears an older version had this capability and the latest version does not.
Am I missing a configuration setting or has this capability been completely removed? Or is this a build configuration option?
Not having this feature is a show-stopper.
it's done through the config files - there is (seemingly) no ui component. I was able to connect to an external sql server user store via jdbc by manipulating the user-mgt.xml and master-datasource.xml files. Although next step would be to define a logical schema definition to map the id fields. e.g. running the mssql.sql script in /dbscripts on my sql server db will create the needed structure.

webservice as datasource in vs 2008 crystal report

How to use webservice as a data source in VS2008 crystal report?
Crystal reports can take xml as its data by setting the database drivers to ADO and the database to the location of your xml producing webservice (it takes a URL) - its as simple as that!
My original route was more convoluted that I thought; when you create the report there is an option in the "Database Expert" called "XML and Web Services" which gives you an option to use an HTTP(S) data source - that should be your webservice URL. The report will then, as if by programming, automatically get data from that service.