我在azure函数app中用nodejs写了一个小代码,用来和雪花连接。 这是我的代码
context.log("starting connection");
var snowflake = require('snowflake-sdk');
// Create a Connection object that we can use later to connect.
context.log("prep conn");
var connection = snowflake.createConnection( {
account: "macc_name",
username: "usr",
password: "psswd",
database: "TEST",
schema: "schema"
}
);
console.log("making conn");
connection.connect(
function(err, conn) {
if (err) {
context.error('Unable to connect: ' + err.message);
}
else {
context.log('Successfully connected to Snowflake.');
// Optional: store the connection ID.
connection_ID = conn.getId();
context.log("COnnection id is : " + connection_ID)
}
}
)
但是当我转到功能的监视选项卡时,我只看到下面的日志
starting connection
prep conn
making conn
但我看不见这些圆木。
Successfully connected to Snowflake.
COnnection id is : xxxxxxxxxxxxxxxx
任何想法,我可以看到这些日志以及,因为我没有得到任何关于我的雪花连接状态的信息。 Azure功能正在完成,状态代码为200。
你检查过库杜控制台了吗?
从菜单中选择Debug console>; cmd
进入日志文件>; 应用程序>; 函数>; 函数>; [函数名称]
https://[your-function-app].scm.AzureWebsites.net/
您将看到日志文件列表。