Please let me know whether Snowflake Spark connector has the ability to create Snowflake external table?
Asked
Active
Viewed 486 times
2 Answers
0
Spark connector does support DDL statement and CREAT EXTERNAL TABLE is a DDL statement
https://docs.snowflake.com/en/user-guide/spark-connector-use.html#executing-ddl-dml-sql-statements

Iqra Ijaz
- 261
- 1
- 3
-
thanks @Iqra, however, I can't find an example of external table creation on the page you mentioned, would be good if there is something like this on the page. – Truc Nguyen Aug 04 '20 at 14:12
0
Not sure about how you can create external tables with spark connector, but, what I usually do is to create a stage in snowflake using a Blob Storage or S3 Bucket and you can work it like a local file. Which can be use in your queries using spark connector, also, any new file on the stage (BlobStorage/S3 Bucket) will be available through a query such as:
SELECT * FROM @"STAGE_NAME"/example.json;
I ain't sure if this is of any help, I don't know how you are trying to apply it. But if it does, I'll be glad to put a example here.

Luis Peña
- 61
- 4
-
I end up creating a tool by myself which does not use spark connector (instead python connector). Thanks anyway :) – Truc Nguyen Sep 03 '20 at 09:22