The data architect has mandated that all tables in the Lakehouse should be configured as external Delta Lake tables. Which approach will ensure that this requirement is met?
A.
Whenever a database is being created, make sure that the LOCATION keyword is used
B.
When configuring an external data warehouse for all table storage, leverage Databricks for all ELT.
C.
Whenever a table is being created, make sure that the LOCATION keyword is used.
D.
When tables are created, make sure that the EXTERNAL keyword is used in the CREATE TABLE statement.
E.
When the workspace is being configured, make sure that external cloud object storage has been mounted.
A. is not correct:
having schema with LOCATION
CREATE SCHEMA my_schema
LOCATION 's3://<bucket-path>/my_schema';
Table Location Scenarios:
Table Without LOCATION:
CREATE TABLE my_schema.my_table (id INT);
The table will be stored in the default warehouse directory (e.g., dbfs:/user/hive/warehouse/), not the schema's LOCATION.
Table With Explicit LOCATION: If you want the table to be stored under the schema's LOCATION, you need to specify the location explicitly:
CREATE TABLE my_schema.my_table (id INT)
LOCATION 's3://<bucket-path>/my_schema/my_table/';
So, if you want all tables under the schema to use the schema’s LOCATION, explicitly specify the LOCATION for each table during creation.
A is correct. If a database is created using location keyword then by default all the tables created in it will use that location. They folows <provided location>/_unity_catalog/tables/<uuid>
C is the correct answer. According to the documentation only the LOCATION is needed to make a table external. Moreover, we can also assume the keyword EXTERNAL is optional in the SQL statement.
https://docs.databricks.com/en/sql/language-manual/sql-ref-external-tables.html
'A' seems more appropriate.
All the tables in Delta lake house should be marked as external.. which can be achieved using location keyword at database level instead of each table level.
According to what I've found in Databricks forums: "Database location and Table location are independent". So it looks like specifying location at DB level is not sufficient as tables will be still created as managed ones.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Sriramiyer92
1 month, 3 weeks agocarah
1 month, 3 weeks agoy2kal
3 months agoakashdesarda
3 months agoleopedroso1
11 months, 3 weeks agoCY
12 months agoYogi05
1 year, 1 month agoYogi05
1 year, 1 month agoLaraujo2022
1 year, 2 months agoIsio05
8 months agoQuadronoid
1 year, 3 months agomouad_attaqi
1 year, 3 months agochokthewa
1 year, 3 months agomht3336
1 year agoDusica
8 months, 1 week ago