Inserting data into Snowflake using JDBC - jdbc

I am inserting rows into Snowflake database using simple jdbc. I am doing a "executeUpdate" in a loop. I see that rows are inserted, but this error is reported
[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata
[error] INFO: unknown parameter: TIME_OUTPUT_FORMAT
[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata
[error] INFO: unknown parameter: CLIENT_DISABLE_INCIDENTS
[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata
[error] INFO: unknown parameter: JS_DRIVER_DISABLE_OCSP_FOR_NON_SF_ENDPOINTS
[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata
[error] INFO: unknown parameter: JS_DRIVER_ENABLE_COMPRESSION
[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata
[error] INFO: unknown parameter: ODBC_ENABLE_COMPRESSION
[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata
[error] INFO: unknown parameter: CLIENT_SESSION_KEEP_ALIVE
[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata
[error] INFO: unknown parameter: JDBC_USE_JSON_PARSER
I am not sure what these error are ... and whether they can be ignored or not.
Also I see that the snowflake JDBC driver does not support executeBatch and executeLargeBatch. So how do I upload large number of rows from a Java application?
Also does the JDBC driver support transactions?

Regarding "[error] Sep 09, 2016 9:41:28 AM com.snowflake.client.jdbc.SnowflakeResultSet processMetadata
[error] INFO: unknown parameter: TIME_OUTPUT_FORMAT", these are INFO logs. It means that the driver doesn't handle those parameters. You can ignore them. We will change the behavior that these lines are not logged by default.
We support executeBatch for PreparedStatement. So you can insert large number of rows through batch binding. executeLargeBatch is currently not supported, but we can add support for it easily if needed.
Our JDBC driver supports transaction. By default a session will be started in auto commit mode. If you want to turn off auto commit, you can call the Connection.setAutoCommit method and then use commit() or rollback() to commit or roll back a transaction. A transaction is transparently started upon the first DML.

Related

ODI to BI EE, LKM can't load data

I Try load data from ODI 12c to OBIEE 12c, I use reverse engineer and Knowledge Modules. I create connect from ODI to OBIEE, but after run mapping which should create new table and insert data I get
WARNING: SQLCommand execution failure: java.io.IOException: prepare query failed[nQSError: 43113] Message returned from OBIS.
[nQSError: 27002] Near <table>: Syntax error [nQSError: 26012] .
Failed query text:
drop table "Sample Targets Lite"...C_0DEFAULT
Feb 04, 2019 11:39:08 PM oracle.odi.runtime.agent.execution.sql.SQLCommand
WARNING: SQLCommand execution failure: java.io.IOException: prepare query failed[nQSError: 43113] Message returned from OBIS.
[nQSError: 27002] Near <table>: Syntax error [nQSError: 26012] .
Failed query text:
create table "Sample Targets Lite"...C_0DEFAULT
(DEPARTMENT_NAME VARCHAR(30)
);
Feb 04, 2019 11:39:09 PM oracle.odi.agent
WARNING: Agent Internal encountered an error: ODI-1226: Step Physical_STEP fails after 1 attempt(s).
Feb 04, 2019 11:39:09 PM oracle.odi.agent
SEVERE: Session ggfgfggf_Physical_SESS (59) fails with return code ODI-1298.
ODI-1217: Session ggfgfggf_Physical_SESS (59) fails with return code ODI-1298.
ODI-1226: Step Physical_STEP fails after 1 attempt(s).
ODI-1227: Task SERIAL-MAP_MAIN- fails on the source connection <Empty Value>.
ODI-1298: Serial task "SERIAL-MAP_MAIN- (10)" failed because child task "SERIAL-EU-LS_HR_CLASS_PROJECT_1_UNIT (20)" is in error.
ODI-1298: Serial task "SERIAL-EU-LS_HR_CLASS_PROJECT_1_UNIT (20)" failed because child task "Create work table-LKM SQL to SQL (JYTHON)- (40)" is in error.
ODI-1228: Task Create work table-LKM SQL to SQL (JYTHON)- fails on the target connection BI_connect.
Caused By: java.sql.SQLException: java.io.IOException: prepare query failed[nQSError: 43113] Message returned from OBIS.
[nQSError: 27002] Near <table>: Syntax error [nQSError: 26012] .
at oracle.bi.jdbc.AnaJdbcStatementImpl.executeQuery(AnaJdbcStatementImpl.java:387)
...
Feb 04, 2019 11:39:09 PM oracle.odi.agent
SEVERE: Agent encountered an error: ODI-1217: Session ggfgfggf_Physical_SESS (59) fails with return code ODI-1298. Caused by: ODI-1226: Step Physical_STEP fails after 1 attempt(s).
Feb 04, 2019 11:58:51 PM null
INFO: Disconnecting from Source.
Feb 04, 2019 11:58:51 PM null
INFO: Disconnecting from Repository
Feb 04, 2019 11:58:51 PM null
INFO: Reverse End.
I use all LKM but all throw same error or can't run.

Maven artifact transfer fails in AWS due to Connection reset errors

Facing some issues when building with Maven in AWS ECS. Not entirely sure what the problem is at the moment.
FYI this build runs on a docker container on an EC2 host
telnet is fine.
[root#host ~]# telnet repo.maven.apache.org 443
Trying 151.101.60.215...
Connected to repo.maven.apache.org.
Escape character is '^]'.
For the most part it downloads up to a point.
07:52:10 [INFO] --- maven-jar-plugin:2.4:jar (default-jar) # hybris-package ---
07:52:10 [DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
07:52:10 [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
07:52:10 Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-archiver/2.5/maven-archiver-2.5.pom
07:52:13 May 09, 2018 7:52:13 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
07:52:13 INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Connection reset
07:52:13 May 09, 2018 7:52:13 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
07:52:13 INFO: Retrying request to {s}->https://repo.maven.apache.org:443
07:52:13 May 09, 2018 7:52:13 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
07:52:13 INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Connection reset
07:52:13 May 09, 2018 7:52:13 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
07:52:13 INFO: Retrying request to {s}->https://repo.maven.apache.org:443
07:52:13 May 09, 2018 7:52:13 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
07:52:13 INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Connection reset
07:52:13 May 09, 2018 7:52:13 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
07:52:13 INFO: Retrying request to {s}->https://repo.maven.apache.org:443
07:52:13
Bit perplexed, traffic would be routed via the NAT gateways. There are some interesting articles on the use of NAT's but none of which purport to reasoning enough to effect this simple use case.
Any ideas folks?

AWS Data Pipeline RedshiftCopy activity No suitable drivers

I am trying a redshift copyactivity from S3 to Redshift, and getting the below error when I run it.
01 Feb 2017 04:08:38,467 [INFO] (TaskRunnerService-resource:df-0657690RH3EEUVGYXWE_#Ec2Instance_2017-02-01T03:43:47-0) df-0657690RH3EEUVGYXWE amazonaws.datapipeline.taskrunner.TaskPoller: Executing: amazonaws.datapipeline.activity.RedshiftCopyActivity#63859f83
01 Feb 2017 04:08:38,962 [ERROR] (TaskRunnerService-resource:df-0657690RH3EEUVGYXWE_#Ec2Instance_2017-02-01T03:43:47-0) df-0657690RH3EEUVGYXWE amazonaws.datapipeline.database.ConnectionFactory: Unable to establish connection to postgresql:/redshiftHost:5439/trivusdev No suitable driver found for postgresql:/redshiftHost:5439/trivusdev
01 Feb 2017 04:08:39,063 [ERROR] (TaskRunnerService-resource:df-0657690RH3EEUVGYXWE_#Ec2Instance_2017-02-01T03:43:47-0) df-0657690RH3EEUVGYXWE amazonaws.datapipeline.database.ConnectionFactory: Unable to establish connection to postgresql:/redshiftHost:5439/trivusdev No suitable driver found for postgresql:/redshiftHost:5439/trivusdev
01 Feb 2017 04:08:39,265 [ERROR] (TaskRunnerService-resource:df-0657690RH3EEUVGYXWE_#Ec2Instance_2017-02-01T03:43:47-0) df-0657690RH3EEUVGYXWE amazonaws.datapipeline.database.ConnectionFactory: Unable to establish connection to postgresql:/redshiftHost:5439/trivusdev No suitable driver found for postgresql:/redshiftHost:5439/trivusdev
01 Feb 2017 04:08:39,666 [ERROR] (TaskRunnerService-resource:df-0657690RH3EEUVGYXWE_#Ec2Instance_2017-02-01T03:43:47-0) df-0657690RH3EEUVGYXWE amazonaws.datapipeline.database.ConnectionFactory: Unable to establish connection to postgresql:/redshiftHost:5439/trivusdev No suitable driver found for postgresql:/redshiftHost:5439/trivusdev
01 Feb 2017 04:08:40,468 [ERROR] (TaskRunnerService-resource:df-0657690RH3EEUVGYXWE_#Ec2Instance_2017-02-01T03:43:47-0) df-0657690RH3EEUVGYXWE amazonaws.datapipeline.database.ConnectionFactory: Unable to establish connection to postgresql:/redshiftHost:5439/trivusdev No suitable driver found for postgresql:/redshiftHost:5439/trivusdev
01 Feb 2017 04:08:40,473 [INFO] (TaskRunnerService-resource:df-0657690RH3EEUVGYXWE_#Ec2Instance_2017-02-01T03:43:47-0) df-0657690RH3EEUVGYXWE amazonaws.datapipeline.taskrunner.HeartBeatService: Finished waiting for heartbeat thread #RedshiftLoadActivity_2017-02-01T03:43:47_Attempt=3
01 Feb 2017 04:08:40,473 [INFO] (TaskRunnerService-resource:df-0657690RH3EEUVGYXWE_#Ec2Instance_2017-02-01T03:43:47-0) df-0657690RH3EEUVGYXWE amazonaws.datapipeline.taskrunner.TaskPoller: Work RedshiftCopyActivity took 0:2 to complete
I am able to see someone suggesting to use postgresql drivers, instead of redshift drivers.
But when I try with postgresql drivers, I get the error as :
No suitable driver found for postgresql://.....
Please suggest where should I make the corrections ?
In fact No suitable driver found for postgresql:/redshiftHost:5439/trivusdev are you sure that this is the right URL the URL should look like this :
jdbc:postgresql://redshiftHost:5439/trivusdev?OpenSourceSubProtocolOverride=true
I think you miss a jdbc:.. and / before the host.
You can learn more here : Creating a custom Database connection
Hope this can help you.

Issue at starting JIRA WAR instance with Apache Tomcat 7 and PostgreSQL 9.3.4

i'm currently trying to setup a JIRA portal using Tomcat 7 and PSQL.
**OS Version**
root#DevJira~ $lsb_release -d
**Description: Ubuntu 14.04 LTS**
**JAVA VERSION**
root#DevJira~ $java -version
**java version "1.8.0_05"**
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) Client VM (build 25.5-b02, mixed mode)
**PSQL VERSION**
root#DevJira~ $psql --version
psql (PostgreSQL) 9.3.4
When i try to get into my localhost/jira, i receive the following error:
HTTP Status 404 - /jira
type Status report
message /jira
description The requested resource is not available.
Apache Tomcat/7.0.52 (Ubuntu)
The catalina.log shows:
Jun 09, 2014 8:20:54 PM org.apache.catalina.startup.HostConfig deployDescriptor
SEVERE: Error deploying configuration descriptor /etc/tomcat7/Catalina/localhost/jira.xml
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/jira]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:670)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Jun 09, 2014 8:20:54 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Jun 09, 2014 8:20:56 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jun 09, 2014 8:20:56 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1584 ms
Any further information you might need, please let me know.
First off, as what Scott mentioned above, you will need Java 7 at most to run JIRA. All Atlassian products are not built for Java 8 deployment yet. Just setup Java 7, and ensure that the $JAVA_HOME variable is pointing to Java 7.
Then, rebuilt the WAR file as per the KB from Atlassian: JIRA WAR Fails to Start Due to Invalid or Unreadable WAR File

Selenium Grid - Remote Controls always being unregistered by hub

I have Selenium Grid 1.0.8 running well with the hub and several remote controls on the same machine. My testNG tests all run successfully.
When I start a remote control on a different machine, everything initially appears to be fine. The hub console shows the remote control to be available with the default environment "*firefox".
However, when I run the tests (still on the hub machine), the remote controls on the other box never work properly. They keep getting deregistered from the hub.
I've disabled the firewalls and I can ping betweeen the two boxes. Has anyone encountered similar issues?
The Remote Control Log:
[java] 21:34:19.479 WARN - Hub at http://192.168.1.129:4444/heartbeat?host=localhost&port=5539 does not have us as registered
[java] 21:34:49.496 INFO - Checking connection to hub...
[java] 21:34:49.496 INFO - Ping Hub at http://192.168.1.129:4444/heartbeat?host=localhost&port=5539
The hub log:
[java] INFO: Garbage collecting unavailable RCs and stale sessions...
[java] Jun 16, 2011 9:39:52 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
[java] INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
[java] Jun 16, 2011 9:39:52 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
[java] INFO: Retrying request
[java] Jun 16, 2011 9:39:52 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
[java] INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
[java] Jun 16, 2011 9:39:52 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
[java] INFO: Retrying request
[java] Jun 16, 2011 9:39:52 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
[java] INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
[java] Jun 16, 2011 9:39:52 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
[java] INFO: Retrying request
Are you passing the correct host value when you register your node? In order to deal with proxies properly, the node must provide a routable hostname to that node when registering with the hub. Without this value, the hub will be unable to communicate with the node and will unregister it.

Resources