Import External Data | HASH BY RANDOM Option | VantageCloud Lake - Disable HASH BY RANDOM - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

You can use CREATE TABLE AS with a SELECT subquery to copy data from a foreign table into a permanent table without a primary index. See Example: Copying Data from Foreign Table into Permanent Table.

Internally, the SELECT subquery performs an INSERT ... SELECT operation with the HASH BY RANDOM clause to provide even distribution of data. The HASH BY RANDOM clause is the default for an INSERT … SELECT operation from a foreign table into a permanent table without a primary index. You can disable this behavior.

This statement disables the random distribution of rows for the session.

SET QUERY_BAND = 'DisableHashByRandom = ON' FOR SESSION;

This statement disables the random distribution of rows for the transaction.

SET QUERY_BAND = 'DisableHashByRandom = ON' FOR TRANSACTION;