在 Hive .hql 文件中记录消息
Logging messages in Hive .hql file
我在 Hive 中有一些 运行 的插入语句。我打算将它们放在 .hql 文件中,并通过 beeline -f 选项 运行 它。有没有一种方法可以在插入之间回显一些日志消息,以便我了解进度。喜欢:
回声"Starting the inserts ........."
插入 1
回声"Insert 1 complete"
插入 2
回声"Insert script is complete"
我尝试使用 linux shell 命令 echo 作为
!echo ""
但它没有将 echo 识别为命令
set msg = "Starting Insert";
set msg;
insert into .... ;
set msg = "Insert complete";
set msg;
!sh echo ...
!sh echo "Starting the inserts ........."
insert ...
!sh echo "Insert 1 complete"
insert ...
!sh echo "Insert script is complete"
我在 Hive 中有一些 运行 的插入语句。我打算将它们放在 .hql 文件中,并通过 beeline -f 选项 运行 它。有没有一种方法可以在插入之间回显一些日志消息,以便我了解进度。喜欢:
回声"Starting the inserts ........." 插入 1
回声"Insert 1 complete"
插入 2
回声"Insert script is complete"
我尝试使用 linux shell 命令 echo 作为 !echo ""
但它没有将 echo 识别为命令
set msg = "Starting Insert";
set msg;
insert into .... ;
set msg = "Insert complete";
set msg;
!sh echo ...
!sh echo "Starting the inserts ........."
insert ...
!sh echo "Insert 1 complete"
insert ...
!sh echo "Insert script is complete"