如何找到 Delta Live Tables 中表的命名空间以进行查询?

huangapple go评论52阅读模式
英文:

How to find namespace of tables in Delta Live Tables to query?

问题

我使用Delta Live Tables创建了一个管道。

如何知道表的命名空间?

这个DLT管道的名称是"dlt_test",然后我尝试了:

select * from dlt_test.live_gold
select * from dlt_test_dlt_db.live_gold

然而,两者都失败并返回:

[TABLE_OR_VIEW_NOT_FOUND] 表或视图 `dlt_test_dlt_db`.`live_gold` 无法找到。

那么如何查询DLT中的表格?

英文:

I created a pipeline using Delta Live Tables.

How to know the namespace of the tables?

The name of this DLT pipeline is "dlt_test", then I tried

select * from dlt_test.live_gold
select * from dlt_test_dlt_db.live_gold

However, both failed and returned:

[TABLE_OR_VIEW_NOT_FOUND] The table or view `dlt_test_dlt_db`.`live_gold` cannot be found.

So how to query the tables in DLT?

如何找到 Delta Live Tables 中表的命名空间以进行查询?

答案1

得分: 1

你需要检查DLT管道设置 - 点击"设置"按钮,然后你会看到两个选项:

  • 如果在Hive Metastore中注册,目标模式

如何找到 Delta Live Tables 中表的命名空间以进行查询?

  • 如果在Unity Catalog中存储数据,目标目录和模式

如何找到 Delta Live Tables 中表的命名空间以进行查询?

还有可能是表格没有在Hive Metastore或Unity Catalog中注册。在这种情况下,你需要查看数据存储位置("存储位置"选项),然后所有表格都将位于该位置下的"tables"目录。

英文:

You need to check DLT pipeline settings - click on "Settings" button, and there you will see two options:

  • Target schema if you're registering in the Hive Metastore

如何找到 Delta Live Tables 中表的命名空间以进行查询?

  • Target catalog & schema if you storing data in Unity Catalog

如何找到 Delta Live Tables 中表的命名空间以进行查询?

Also it could be possible that tables aren't registered in either Hive Metastore or in the Unity Catalog. In this case, you will need to see where data is stored (the "Storage location" option), then all tables will be in the tables directory under that location.

huangapple
  • 本文由 发表于 2023年7月17日 21:01:22
  • 转载请务必保留本文链接:https://go.coder-hub.com/76704762.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定