Snowpark Migration Accelerator: Verwendung

Beschreibung

Der USING-Befehl in Spark gibt an, welches Dateiformat bei der Erstellung einer Tabelle verwendet werden soll. Gängige Formate sind CSV, JSON und AVRO. Ausführlichere Informationen über den USING-Befehl zur Erstellung einer Tabelle finden Sie in der Databricks-Dokumentation.

Syntax

CREATE TABLE [IF NOT EXISTS] [db_name.]table_name
  [(col_name1 col_type1 [COMMENT col_comment1], ...)]
  USING data_source
  [OPTIONS (key1 [ = ] val1, key2 [ = ] val2, ...)]
  [PARTITIONED BY (col_name1, col_name2, ...)]
  [CLUSTERED BY (col_name3, col_name4, ...) INTO num_buckets BUCKETS]
  [LOCATION path]
  [COMMENT table_comment]
  [TBLPROPERTIES (key1 [ = ] val1, key2 [ = ] val2, ...)]
  [AS select_statement]
Copy

Beispielhafte Quellcode-Muster

Die Anweisung USING Datenquelle wird in Snowflake nicht unterstützt. Während der Migration wird diese Anweisung auskommentiert und mit einer Fehler-, Warn- und Informationsmeldung (EWI) versehen, die anzeigt, dass sie nicht unterstützt wird.

Beispieldaten

CREATE TABLE table1
(
id INTEGER
) USING DELTA;
Copy
CREATE TABLE table1
(
id INTEGER
) /*** MSC-WARNING - MSCEWI# - SNOWFLAKE DOES NOT SUPPORT USING STATEMENT ***/
-- USING DELTA;
Copy

Bekannte Probleme

Snowflake unterstützt in SQL-Anweisungen nicht die USING-Quelldatenklausel.