[英]aws emr with glue: how to specify database name?
I'm trying to run a hive job using Glue metadata.我正在尝试使用 Glue 元数据运行 hive 作业。 From the aws docs来自 aws 文档
Under AWS Glue Data Catalog settings select Use for Hive table metadata.在 AWS Glue 数据目录设置下 select 用于 Hive 表元数据。
I created a cluster that apparently connects to the default
database from glue (i can tell by running show tables;
from hive, which lists a table from default
database.我创建了一个集群,该集群显然从胶水连接到default
数据库(我可以通过运行show tables;
来自 hive,它列出了default
数据库中的一个表。
Now does anyone know how to provide an option to connect to another database from glue?现在有谁知道如何提供从胶水连接到另一个数据库的选项? The only thing I could find in the docs is the opportunity of providing a hive.metastore.glue.catalogid
where you can provide a catalog from another account, but I cannot find anything in the docs about using the right database.我在文档中唯一能找到的是提供hive.metastore.glue.catalogid
的机会,您可以在其中提供另一个帐户的目录,但我在文档中找不到有关使用正确数据库的任何内容。
Or perhaps all the databases are loaded.或者可能所有数据库都已加载。 If so, do you know how to access them within hive?如果是这样,您知道如何在 hive 中访问它们吗?
Ok, it turns out all the databases are loaded in hive.好的,原来所有的数据库都加载在 hive 中。 You can simply access them by using select * from my_database_name.my_table_name
, or by setting the database name once with use my_database_name
您可以使用 my_database_name.my_table_name 中的select * from my_database_name.my_table_name
或use my_database_name
my_database_name 设置一次数据库名称来简单地访问它们
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.