Comments (10)
do you mean on_error='%s'
where %s can be either one of them?
CONTINUE | SKIP_FILE | SKIP_FILE_num | SKIP_FILE_num% | ABORT_STATEMENT
?
I assume this change is used for Talend Connector.
from snowflake-jdbc.
Yes, @smtakeda, this is correct.
from snowflake-jdbc.
@smtakeda, I added pull requests for 2 possible solutions:
#36
#37
from snowflake-jdbc.
@olhava what behavior do you expect when the error occurs? For example, COPY
with ABORT_TRANSACTION
will raise an SQL error if an invalid data are included in the source. Do you want the API to raise the exception as is?
from snowflake-jdbc.
Adding a test case. This is the expected error. if this works, I'll commit the change and release next week.
StreamLoader underTest = ...
try
{
underTest.finish();
fail("should raise an exception");
}
catch (Loader.ConnectionError ex)
{
assertThat(ex.getCause() instanceof SQLException, equalTo(Boolean.TRUE));
SQLException sqlEx = (SQLException) ex.getCause();
assertThat(sqlEx.getErrorCode(), equalTo(100038));
}
from snowflake-jdbc.
@smtakeda Yes, in case error occurs with on_error = ABORT_TRANSACTION
, it's okay to throw Loader.ConnectionError
.
One more concern in case of onErrorNumPercents, I did not find the documentation about the type of percentage value. I've set the type as Integer in my pull request, maybe it should be changed to Float if it is allowed.
from snowflake-jdbc.
@olhava sounds good.
I'm making the parameter to a single string type and validate them when specified. It may not be the best, but I don't want to clutter the parameters only for ON_ERROR option:
The validation will be done with this regex:
private final static Pattern validPattern = Pattern.compile(
"(?:ABORT_STATEMENT|CONTINUE|SKIP_FILE(?:_\\d+%?)?)"
from snowflake-jdbc.
Btw, I'm going to remove copyEmptyFieldAsEmpty
. It turned out it is no longer useful as I fixed the default behavior where null and empty data are treated as is instead of converting to null at all times:
f8b07f6
from snowflake-jdbc.
Fixed in f3469af
from snowflake-jdbc.
Actually the fix is already out.
from snowflake-jdbc.
Related Issues (20)
- SNOW-999335: Spark snowflake read results in certificate issue HOT 13
- SNOW-1001015: Cannot convert value in the driver from type:FIXED(38,0) to type:int, value=5,738,342,984 HOT 2
- SNOW-1003959: Slow query in spring boot not showing the SQL executed. HOT 6
- SNOW-1005946: Make SQL text optional for the input to `StmtUtil.cancel`
- SNOW-1008792: since 3.13.19 , I can not package the snowflake-jdbc into my fat jar HOT 2
- SNOW-1023077: JDBC driver package is too big HOT 2
- SNOW-1042432: Do not use com.amazonaws classes in core SF classes HOT 5
- SNOW-1045676: Update getSQLKeywords to match actual reserved keywords in Snowflake HOT 3
- SNOW-1053954: No enum constant net.snowflake.client.jdbc.SnowflakeType.VECTOR HOT 1
- SNOW-1094021: Add Methods to Datasource to support further Connection Settings HOT 2
- SNOW-1161547: number of retries is fixed to 0 for getQueryMetadata from queryID HOT 5
- SNOW-1163212: InvalidPathException on Windows due to Nested file path HOT 10
- SNOW-1168175: Tiny bug: Link to Release notes in CHANGELOG is outdated HOT 3
- SNOW-1196082: Inserting and reading timestamps is not symetric if too much columns inserted with batch HOT 10
- SNOW-1229142: Should not shade apache commons logging HOT 9
- SNOW-1250205: Driver returns incorrect column type while querying on Query History Views HOT 4
- SNOW-1272895: Key Pair Authentication with Encrypted Key Not Working HOT 9
- SNOW-1304351: The `threetenbp` package is vulnerable to Denial of Service (DoS) due to an Uncaught Exception HOT 2
- SNOW-1313790: Separate cloud-vendor-specific dependencies from thin JAR HOT 1
- SNOW-1335472: Support Virtual Threads by using `ReentrantLock` instead of `synchronized` for `SFSession#open` HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snowflake-jdbc.