Using PostgreSQL Spark-connector in YugabyteDB - yugabytedb

[Question posted by a user on YugabyteDB Community Slack]
Is it possible to work with the Postgres tables using Spark-connector? Write and read to a Yugabyte Postgres?

Yes, it is possible to read and write in YugabyteDB through the JDBC Spark connector. You can follow the Spark documentation as is.
Because YugabyteDB is PostgreSQL-compliant most PostgreSQL connectors should work just fine.

Related

Can’t create YCQL index with WHERE clause in YugabyteDB

[Question posted by a user on YugabyteDB Community Slack]
Can somebody explain to me how to work with indexes metadata in YCQL?
I found this article: https://docs.yugabyte.com/preview/api/ycql/ddl_create_index/.
And I can't create example INDEX with WHERE condition with this exception:
com.datastax.driver.core.exceptions.SyntaxError: Feature Not Supported
CREATE INDEX idx ON orders (warehouse_id) WHERE warehouse_id < 100
^^^^^^
(ql error -14)
Server: YCQL 3.9.0
Driver: Yugabyte CQL Java Driver 3.8.2
YugabyteDB 2.4.4.0.
You need to upgrade to 2.6.x at a minimum to have that feature. After you upgrade you'll be able to create the index.

Using read-replicas in YugabyteDB for DR

[Question posted by a user on YugabyteDB Community Slack]
I’m trying to understand the tolerance failure in YugabyteDB.
My scenario is as follows:
Universe is setup with primary data cluster and 1 read replica cluster, max_stale_read_bound_time_ms = 60.
And the primary data cluster got wipe out (lost all data).
Questions:
Would we be able to rebuild the primary data cluster with the read replica cluster?
Can the read replica cluster become the primary data cluster?
The answer is no to both.
xCluster is what you want to use for DR.
The design point for read-replicas in YugabyteDB is not for DR, but rather to bring data closer to where data is being read from. And read replicas have no yb-master. Without a yb-master, one cannot read from it.

Setting PostgreSQL options in YugabyteDB YSQL as g-flag

[Question posted by a user on YugabyteDB Community Slack]
I’m trying to set enable_nestloop permanently as a g-flag. How can I set these PostgreSQL config options?
PostgreSQL parameters can be set with the [--ysql_pg_conf][1] flag as comma separated like ysql_pg_conf=enable_nestloop=false

Set wal_level = logical instead of replica in YugabyteDB?

[Question posted by a user on YugabyteDB Community Slack]
Is there a way to set wal_level = logical instead of replica in YugabyteDB? I’m looking to implement CDC so I can synchronize other systems with the changes.
Note that YugabyteDB doesn’t reuse the PostgreSQL storage engine & replication mechanism, but has built its own. And it doesn’t support setting wal_level=logical.
Currently, CDC support is in the works https://github.com/yugabyte/yugabyte-db/issues/9019.

How are custom types stored in YugabyteDB YCQL?

[Question posted by a user on YugabyteDB Community Slack]
How are custom types CREATE TYPE .. UDT stored in rocksdb underneath ?
They are stored in rocksdb as a serialized map or struct.

Resources