【发布时间】:2020-06-25 12:46:04
【问题描述】:
我在 azure function 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。
【问题讨论】:
标签: node.js azure azure-functions snowflake-cloud-data-platform azure-function-app