google-cloud-spanner

Timestamp converter not working in Spring Data Rest with Spanner

て烟熏妆下的殇ゞ 提交于 2021-02-11 18:18:37
问题 I'm trying to convert the input timestamp which will be in the string format to cloud timestamp with the help of a Spring Data Rest custom converter which is not working. Need an help on the same in understanding why custom converters are not invoked. Input: http://localhost:8080/apipromocentral/promotions RequestBody : {"startDateTime": "2019-11-07 15:53:00"} POJO: @ApiModel @Data @AllArgsConstructor @Table(name = "PROMOTIONS") public class Promotion { /** * promotion id */ @ApiModelProperty

Timestamp converter not working in Spring Data Rest with Spanner

空扰寡人 提交于 2021-02-11 18:17:06
问题 I'm trying to convert the input timestamp which will be in the string format to cloud timestamp with the help of a Spring Data Rest custom converter which is not working. Need an help on the same in understanding why custom converters are not invoked. Input: http://localhost:8080/apipromocentral/promotions RequestBody : {"startDateTime": "2019-11-07 15:53:00"} POJO: @ApiModel @Data @AllArgsConstructor @Table(name = "PROMOTIONS") public class Promotion { /** * promotion id */ @ApiModelProperty

When connecting to Google Cloud Spanner Emulator with jdbc, credentials that should not be needed are required

扶醉桌前 提交于 2021-02-11 13:00:29
问题 When I try to connect using the Google Cloud Spanner Open Source JDBC Driver, I get the following error message: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more URI:jdbc:cloudspanner:localhost:9010/projects/my-project

When connecting to Google Cloud Spanner Emulator with jdbc, credentials that should not be needed are required

旧巷老猫 提交于 2021-02-11 12:59:39
问题 When I try to connect using the Google Cloud Spanner Open Source JDBC Driver, I get the following error message: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more URI:jdbc:cloudspanner:localhost:9010/projects/my-project

Does a Secondry index lock anything when it is being created?

拥有回忆 提交于 2021-02-10 06:29:23
问题 Given the following table schema: CREATE TABLE Record ( -- uuidv4 recordId STRING(36) NOT NULL, -- uuidv4 userId STRING(36), isActive BOOL lastUpdate TIMESTAMP NOT NULL OPTIONS (allow_commit_timestamp=true) ... ) PRIMARY KEY (recordId) CREATE NULL_FILTERED INDEX RecordByUser ON Record (userId, isActive) For every record created we make a record (in the index) to be able able to get all of a user's records by their userId. Depending on what may be needed there could be an extra STORING clause

Unable to convert java.sql.Timestamp to com.google.cloud.Timestamp in Spring Data Cloud Spanner

别等时光非礼了梦想. 提交于 2021-01-29 13:56:45
问题 While using Spring Data Cloud Spanner, we are unable to persist java.sql.Timestamp type data in spanner db. The database column type is Timestamp. Following is the entity: @Table(name = "TEST") public class Test { @PrimaryKey @Column(name = “ID”) private String id; @Column(name = "CREATED_ON") private java.sql.Timestamp createdOn; } We are using Spring Data Rest to persist. As per my analysis, I see a converter is already there which converts java.sql.TimeStamp to com.google.cloud.Timestamp.

PubSub to Spanner Streaming Pipeline

若如初见. 提交于 2021-01-29 08:31:36
问题 I am trying to stream PubSub message of type JSON to spanner database and the insert_update works very well. Spanner table has composite primary key, so need to delete the existing data before inserting new data from PubSub (so only latest data is present). Spanner replace or insert/update mutations does not work in this case. I added pipeline import org.apache.beam.* ; public class PubSubToSpannerPipeline { // JSON to TableData Object public static class PubSubToTableDataFn extends DoFn

Does the Google Spanner Emulator work with the Google Spanner JDBC Driver?

孤街浪徒 提交于 2020-12-15 05:59:35
问题 I have tried this isn DBeaver and DataGrip. Running with the Google Spanner Emulator locally (0.8.0) export SPANNER_EMULATOR_HOST=localhost:9010 Executing: docker run -p 127.0.0.1:9010:9010 -p 127.0.0.1:9020:9020 gcr.io/cloud-spanner-emulator/emulator:0.8.0 [cloud-spanner-emulator] 2020/07/17 22:23:21 gateway.go:135: Cloud Spanner emulator running. [cloud-spanner-emulator] 2020/07/17 22:23:21 gateway.go:136: REST server listening at 0.0.0.0:9020 [cloud-spanner-emulator] 2020/07/17 22:23:21

Does the Google Spanner Emulator work with the Google Spanner JDBC Driver?

馋奶兔 提交于 2020-12-15 05:57:06
问题 I have tried this isn DBeaver and DataGrip. Running with the Google Spanner Emulator locally (0.8.0) export SPANNER_EMULATOR_HOST=localhost:9010 Executing: docker run -p 127.0.0.1:9010:9010 -p 127.0.0.1:9020:9020 gcr.io/cloud-spanner-emulator/emulator:0.8.0 [cloud-spanner-emulator] 2020/07/17 22:23:21 gateway.go:135: Cloud Spanner emulator running. [cloud-spanner-emulator] 2020/07/17 22:23:21 gateway.go:136: REST server listening at 0.0.0.0:9020 [cloud-spanner-emulator] 2020/07/17 22:23:21

Does Google Cloud Spanner support Index Intersection/Combination/Merge?

吃可爱长大的小学妹 提交于 2020-12-06 06:58:47
问题 Explanation about the functionality in question: Postgres (Index Combination), MySQL (Index Merge) & MongoDB (Index Intersection) have a functionality, where the DB uses multiple single-column indices (indexes) when there is no multi-column index found for a given query that has multiple columns in the where clause. Here is what Postgres' documentation speaks about this feature - https://www.postgresql.org/docs/8.3/indexes-bitmap-scans.html An excerpt from the link Beginning in release 8.1,