Skip to content

Instantly share code, notes, and snippets.

@mshakhomirov
Created March 7, 2023 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mshakhomirov/48977d79cf5185f07bee34af322862a2 to your computer and use it in GitHub Desktop.
Save mshakhomirov/48977d79cf5185f07bee34af322862a2 to your computer and use it in GitHub Desktop.
CREATE OR REPLACE EXTERNAL TABLE source.custom_hive_partitioned_table
WITH PARTITION COLUMNS (
dt STRING, -- column order must match the external path
lang STRING)
OPTIONS (
uris = ['gs://events-export-avro/public-project/avro_external_test/*'],
format = 'AVRO',
hive_partition_uri_prefix = 'gs://events-export-avro/public-project/avro_external_test',
require_hive_partition_filter = false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment