Comments (3)
@joshnarani9 Thanks for posting your question. The version you're using was released in January of 2020; we recommend using a more recent version of the library if possible. If it's not possible to upgrade to v2+, then the latest v1 version (v1.137.x) would be best.
Can you provide some additional information about your use case? A code sample would be great. That will help us answer your question better.
from java-bigquery.
Hi @obada-ab , Thanks and please find the below code snippet which is executed by 20 worker threads at the same time. Here we are trying to insert rows data into a table using getTable and insertAll from bigquery library. Please let us know if the connections from this will be thread safe or not.
Set<Map.Entry<String, List<InsertAllRequest.RowToInsert>>> entries = mapData.entrySet();
entries.forEach(entry -> {
try {
TableId tableId = "t";
****BQUtils.getConnection().getTable(tableId);****
InsertAllRequest insertRows =
InsertAllRequest.newBuilder(tableId).setTable(tableId).setTemplateSuffix(entry.getKey())
.setIgnoreUnknownValues(true).setSkipInvalidRows(true).setRows(entry.getValue()).build();
****InsertAllResponse response = BQUtils.getConnection().insertAll(insertRows);****
} catch (InterruptedException e) {
LOGGER.error("applyInsert(): exception:", e);
}
});
In the above code snippet, These two functionalities are used with bigquery library called by 20 or more threads at a time.
BQUtils.getConnection().getTable(tableId);
InsertAllResponse response = BQUtils.getConnection().insertAll(insertRows);
from java-bigquery.
@joshnarani9 we only support the latest v2 version of the Java client library. If you are running a business/have a business reason for using an old version of the client library, please let your support POC know about your query so that they can issue an internal support case.
from java-bigquery.
Related Issues (20)
- Creating Schema object out of TableFieldSchema
- Support universe domain feature
- bigquery.it.ITBigQueryTest: testInsertAllWithErrors failed HOT 1
- Add support for queryId in TableResult
- Update universe domain error message
- Question: Does BigQuery java SDK support Kotlin coroutines?
- Need the new "unreachable" field to be supported by BigQuery::listDatasets API HOT 6
- BigQueryOption.Builder ignores host parameter (regression versus 2.35.0) HOT 3
- Improve documentation: It's unclear how to conenct to a local emulator HOT 3
- Refactor TableResult to builder pattern
- Add support for metadata cache statistics in query statistics
- bigquery.it.ITBigQueryTest: testStatelessQueriesWithLocation failed HOT 1
- BigQueryOption setHost() is broken HOT 1
- Can't connect to an emulator with 2.37.0 HOT 1
- bigquery.it.ITBigQueryTest: testFastDMLQuery failed HOT 1
- BigQuery returns NULLABLE mode for a field that has a REQUIRED mode (field created as a NOT NULL from the beginning)
- The build failed
- unable to call setDescription on RoutineInfo.Builder HOT 4
- [Regression] Can no longer use `setHost` to override default host HOT 5
- FieldValueList & FieldValue throwing null pointer exception when getting value of nullable field HOT 3
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 java-bigquery.