Vertica Blog

OpenText Vertica 23.3 – the Smarter Data Lakehouse

Posted July 31, 2023 by Paige Roberts, Vertica Open Source Relations Manager

Read More

Unveiling the Most Recent Version of the Vertica Grafana Data Source Plugin

With over 380K downloads, the Vertica Grafana Data Source plugin just got an upgrade! The plugin was migrated from the deprecated older Grafana toolkit to align with Grafana's new Create-Plugin tool. This accelerates the plugin development with their modern build set up that requires no additional configuration. Additionally, the Vertica SQL Go driver received an...
Quick Tip on a blue enter key on a keyboard

Setting Session Authorization to Troubleshoot

There are possible scenarios in which a dbadmin would want to run queries as another user to troubleshoot or test. You can use SET SESSION AUTHORIZATION to impersonate another user and run queries. Let's understand this with an example. Here we create a user named test, resource pool named userpool, and make this a default...

Converting CHAR and VARCHAR to BINARY or VARBINARY

Jim Knicely authored this tip. As of Vertica 9.1.1, explicit coercion (casting) from CHAR and VARCHAR data types to either BINARY or VARBINARY data types is supported! Prior to Vertica 9.1.1: dbadmin=> INSERT INTO test_coercion SELECT 'Convert me!'; OUTPUT -------- 1 (1 row) dbadmin=> SELECT c1::VARBINARY FROM test_coercion; ERROR 2366: Cannot cast type varchar to...

Getting Help with Command-Line Tools

Jim Knicely authored this post. Vertica comes with some nifty command-line tools like vsql, admintools, and vbr. If you need assistance using any of these, you can run them with the –-help parameter to view the options available for each tool. Have fun!
Vertica and Python logos stacked

vertica-python Becomes Vertica’s First Officially Supported Open Source Database Client

Tom Wall authored this post. We are very excited to announce that vertica-python, the open source python database client for Vertica created by Uber Technologies Inc., will officially become a supported database client for Vertica! This is a great milestone for Vertica and our community of users and developers. Not only do we expect to...

Subscribe For Email Updates

Sign-up and select Vertica in your preferences to receive our monthly Vertica newsletter.

Sign-up

Cascading Schema Ownership

Jim Knicely authored this tip.</br? Yesterday’s quick tip revealed that as of Vertica 9.1.1, you can transfer the ownership of a schema to another user. But what about the underlying schema objects (i.e., TABLES, VIEWS, etc.)?</br? By default, the ALTER SCHEMA…OWNER TO command does not affect ownership of objects in the target schema or the...
Modern Database Analytics

Change the Owner of a Schema

Jim Knicely authored this tip. As of Vertica 9.1.1, you can now transfer the ownership of a schema to another user! dbadmin=> CREATE USER etl_user; CREATE USER dbadmin=> ALTER SCHEMA my_etl_schema OWNER TO etl_user; ALTER SCHEMA dbadmin=> SELECT schema_name, schema_owner FROM schemata WHERE schema_name = 'my_etl_schema'; schema_name | schema_owner ---------------+-------------- my_etl_schema | etl_user (1 row)...
Programmer

Find the Number of Days Passed and Remaining in the Relative Year

Jim Knicely authored this post. Although there aren’t any specific functions that will return the number of days that have passed and that are remaining in a given year, you can combine a few of Vertica’s built-in date functions to find these numbers. You can encapsulate the date logic above into several user-defined functions that...

Explore Popular Topics

Displaying the Current Schema

Each user session has a search path of schemas. Vertica uses this search path to find tables and user-defined functions (UDFs) that are unqualified by their schema name. You can use the CURRENT_SCHEMA function to display the name of the current schema (i.e., the first “valid” schema in the user’s search path). dbadmin=> SHOW search_path;...

Referencing Multiple Related LONG VARCHAR Columns

Jim Knicely authored this post. Table columns having the LONG VARCHAR data type can store up to 32,000,000 octets. Since there is a table row limit size of 32,768,000 bytes, how do I reference more than one related LONG VARCHAR, each having the maximum length? Simple. Use more than one table! dbadmin=> CREATE TABLE test1...
Database Server Room

Generate Random Integers, Including Negative Numbers

Jim Knicely authored this tip. The RANDOMINT(n) function returns one of the n integers from 0 through n – 1. Those are all positive integers. What if I want to include negative integers? That’s easy with a simple multiplication. dbadmin=> SELECT DECODE(randomint(2), 1, 1, -1) * randomint(11) "Random INT from -10 to 10"; Random INT...

Summarize a Table’s Projections: Quick Tip

Jim Knicely authored this tip. Use the built-in Vertica function GET_TABLE_PROJECTIONS to quickly summarize the details of all of the projections of a Vertica table. dbadmin=> \t Showing only tuples. dbadmin=> SELECT get_table_projections('public.jim'); Current system K is 1. # of Nodes: 3. Table public.jim has 3 projections. Projection Name: [Segmented] [Seg Cols] [# of Buddies]...

Work hard, have fun, and make a difference!

We love this 2014 blog post and our intern program, so we're bringing it back to the top of the blog. Jaimin is still here at Vertica, working hard on the core of our analytics database. Watch this space! My name is Jaimin and I work as a Software Engineer in the Distributed Query Optimizer...

Permanently Attach a Comment to a Query: Quick Tip

Jim Knicely authored this tip. There are several system tables like QUERY_REQUESTS that store the queries executed in the database. To help understand why a query was executed (i.e., for debugging purposes), you might want to add a comment to the SQL code. dbadmin=> SELECT request FROM query_requests WHERE transaction_id = current_trans_id() AND statement_id =...