the documentation of WSO2 Data services server say you can read any database with a JDBC driver, and I found that there are some JDBC libraries for .DBF files.
DSS documentation: http://wso2.com/products/data-services-server/
JDBC for DBF files: http://www.csv-jdbc.com/stels_dbf_jdbc.htm
Someone has already done or did something similar?
I would appreciate your help
Yes, WSO2 DSS supports any RDBMS datasource type, provided a compatible driver is copied to the product. You can follow the below steps.
You can add the JDBC driver to the $DSS_HOME/repository/component/lib folder and start the server.
Create a dataservice by following the this doc
Add an RDBMS type datasource, as DBF is not listed in the pre-defined datasource types, select 'Generic' and give the driver class name, connection url, username and password according to the DBF specified
Add query and then an operation. Our official documentation has all the necessary steps.
Please note that, we have not tested with this driver, therefore, to use in a production environment, a comprehensive testing cycle will be needed (including load tests, long running tests .. etc).
Related
I'm trying to figure out how to get Tableau to recognize my JDBC Driver when creating a custom JDBC connector using the Tableau Connector SDK . Currently when Tableau loads my custom connector I can tell the driver is not found because there is a link that shows up in the Connector that says:
"Download and install the drivers, and then connect."
Tableau online does not have the drivers for the SAS data I want to connect to: so I cannot download the drivers to install from Tableau
Luckily I already have the .jar files and have placed them at C:\Program Files\Tableau\Drivers on Windows
In the Connector API Reference "driver-resolver" states that: "This is mainly used for ODBC connections but can be used for JDBC as well" but I do not see specific instructions for working with JDBC drivers explicitly. Except for the Postgres JDBC Example which DOES NOT use a driver-resolver. I also have not seen a JDBC example in the Resolvers github samples
In the Tableau logs I can see that the .jar files containing my driver are recognized by searching for their names, they are shown in the logs.
Logs Environment Section Excerpt:
"environment","v":{...all my jar files listed here}
Drivers not being recognized screenshot that says to download the drivers
Finally, here is what my .tdr file looks like with my current driver-resolver definition that does not work
<tdr class='sas_jdbc'>
<connection-resolver>
<connection-builder>
<script file="connectionBuilder.js" />
</connection-builder>
<connection-properties>
<script file="connectionProperties.js" />
</connection-properties>
</connection-resolver>
<driver-resolver>
<driver-match>
<driver-name type='exact'>com.sas.rio.MVADriver</driver-name>
</driver-match>
</driver-resolver>
</tdr>
Can anyone shed some light on this for me? I feel like I'm close. An example using a JDBC driver-resolver in a .tdr file would be nice.
You don't actually need a .tdr file with JDBC, as all the driver resolution happens in the connectionBuilder.js file today. The URL of the connection there includes the driver name. I added a story to our backlog to make this more clear. I should also mention, that hopefully you are using 2019.4 or higher for the best experience. Thanks for using the SDK!
The answer to this is that driver-resolver is not used in JDBC custom connector definitions. The problem I'm experiencing with getting the SAS JDBC Driver to work is because the SAS JDBC Driver is JDBC Type 2.0. JDBC Drivers need to be Type 4.0 to work with a Tableau custom connector using the Tableau Connector SDK.
The resolution is to use a Type 4.0 JDBC Driver which I have not seen from SAS yet.
Has anyone been able to use the new JDBC drivers for BigQuery in JetBrains DataGrip?
I've followed the these steps
Created a driver in DataGrip with all the jar files
Created a database with a connection string with a service account file
The connection test says successful, but once I try to query something I receive an error:
java.lang.ClassNotFoundException: com.google.api.client.json.JsonFactory
I've added the following files from the Simba ZIP into the DataGrip driver:
GoogleBigQueryJDBC42.jar
jackson-core-2.1.3.jar
google-api-client-1.22.0.jar
google-api-services-bigquery-v2-rev320-1.22.0.jar
google-http-client-1.22.0.jar
google-http-client-jackson2-1.22.0.jar
google-oauth-client-1.22.0.jar
So I'm not sure what to do next. I tried changing their order in DataGrip but it didn't seem to make a different.
My connection string also looks OK I think:
jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;ProjectId=...;OAuthType=0;OAuthPvtKeyPath=...;OAuthServiceAcctEmail=...;
You may get this error when the driver JAR files are not referenced correctly in the tool. I have listed out the steps I used to connect to BigQuery via DataGrip.
Add a new driver by adding all the JAR files from the zip. The correct class name should be selected from the "Class" drop down in this step.
Add a new data source by selecting the newly created BigQuery JDBC driver. Provide the correct connection URL in this step.
If the test connection succeeds, create a new query for the same datasource.
Make sure your query uses the correct format "dataset.tablename" and is running on the data source you just tested.
For me replacing P12 with Json worked. But, cannot use DataGrip or in general JDBC to access BigQuery because of various query/incompatibility issues.
This video can be referred : https://www.youtube.com/watch?v=r9l2c_aQPoQ&ab_channel=JetBrainsTV
to use the new simba jdbc drivers for BigQuery in JetBrains DataGrip. It covers all steps one by one for working setup.
Here is the blog which refers this video: https://blog.jetbrains.com/datagrip/2018/07/10/using-bigquery-from-intellij-based-ide/
Drivers can be downloaded at : https://cloud.google.com/bigquery/providers/simba-drivers
Note: Make sure to go through comments on blog to authenticate without creating service account on gcp.
Hope this is helpful!
We are looking to access BigQuery through third party sql clients, ex. RazorSql. I came across StarSchema JDBC driver and I could not make it work with Razorsql and on the webpage it says that the project was archived. So, not sure if its supposed to work. Any suggestions?
The error I get when trying to use it with RazoeSql is:
java.io.IOException: toDerInputStream rejects tag type 123
I am using a service account key file for authentication.
This is JDBC url value I use (where "my-poc" is the project id and "MY_POC" is the dataset name):
jdbc:BQDriver:my-poc%3AMY_POC?withServiceAccount=true
Alas, no there isn't a JDBC driver that is officially supported. There is an ODBC driver developed by Simba in conjunction with google (you can download it here for free), and you can use a JDBC to ODBC bridge (although the official one is deprecated in java 8, I believe you can download one from a couple of different folks (here, for example).
Admittedly, this is not a great solution. IMO Google really should provide a JDBC driver, but they do not.
java.io.IOException: toDerInputStream rejects tag type 123
The JDBC driver requires a p12 formatted file instead of the json formatted file.
I'm trying to set up a ColdFusion 8 data source using JDBC on a CLSE5 Linux server. I've downloaded the JDBC drivers from Oracle for both 10g and 11g and placed the JAR files in %CF_INSTALL_Folder%/runtime/lib. I verified that this folder is in the class path on the CF admin settings summary page. According to this Oracle JDBC wiki, the JDBC URL should be:
jdbc:oracle:thin:#[HOST][:PORT]:SID
If I want to use different drivers for different connections, How do I differentiate between them on the data source connection form?
You specify which JDBC driver to use by specifying the JAR's class name in the Driver Class field on the data source administration page. However, this requires that your two JAR files have unique class names.
I would assume that you could use the 11g drivers to connect to your 10g database without any problems unless you are needing to use something specifically deprecated with the 11g drivers. I would at least try that first and see if any issues crop up.
Here is a link to some documentation that describes the different fields on the data source administration page: Connecting to other data sources
Driver Class
The fully qualified class name of the driver. For example, com.inet.tds.TdsDriver. The JAR file that contains this class must be in a directory defined in the ColdFusion classpath.
Hi guys:)
I am new to servlet.I dont know how to connect oracle database to the servlet application. Can anyone paste Oracle JDBC coding
Register Database Connection parameters:
To include your application specific connection parameters of your database, edit the file data-sources.xml under \config directory. Add the following lines to create a data source. Change the hostname, port, username/password, database name, driver type to suit your application. Make changes for url after # symbol. Save the file. This will register the data-source which can be used across your application.
<data-source
class="oracle.jdbc.pool.OracleConnectionPoolDataSource"
name="ifso817DS"
location="jdbc/Loneifso817DS"
xa-location="jdbc/xa/ifso817XADS"
ejb-location="jdbc/Pooledifso817DS"
url="jdbc:oracle:thin:#insn104a.idc.oracle.com:1521:ifso817"
connection-driver="oracle.jdbc.driver.OracleDriver"
username="travel"
password="travel"
inactivity-timeout="30"
/>
That is taken from: http://www.oracle.com/technology/sample_code/tech/java/servlets/samples/TravelServlet/Readme.html
There are a lot of articles discussing this, but I'll give you the basic steps:
download Oracle JDBC driver from Oracle's homepage, it's called ojdbc6.jar if you're using Java 6
make sure your application can find it on its classpath
since you are using servlets, you're also using a Java application server; read relevant documentation about setting up a JNDI binding to your database (usually this binding will be called jdbc/connectionName)
inside of your application, use this code:
Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("jdbc/connectionName");
Connection conn = ds.getConnection();
This should be enough to get you started.
For more information, Google is your friend. Check out Wikipedia's JDBC page. Google "Oracle JDBC connection" for more info.
One thing that might give you headaches if you've never done stuff like this: when defining Oracle's URL for your app. server, it's format is as follows:
jdbc:oracle:thin:[user/password]#[host][:port]:SID
So you have to substitute appropriate values when defining the connection for a JNDI binding.
check this http://www.java2s.com/Code/Java/Servlets/JDBCandServlet.htm. You need to modify driver class name and connection url to connect to Oracle DB. Check http://www.java2s.com/Code/Java/Database-SQL-JDBC/OracleJDBCDriverload.htm for Oracle DB connection details