I created an Azure Function (Node.js) with an Event Grid trigger that reads Parquet files from an Azure Storage container using DuckDB. It works perfectly when I run it locally with func start, but after publishing to Azure using func azure functionapp publish <app_name>, the function doesn’t appear or run in the portal. I'm unsure if it's a deployment issue or something related to DuckDB compatibility in Azure Functions. Has anyone faced a similar problem or know how to debug this?
Edit1:
I’m working with Azure Functions using Node.js (JavaScript). I created and published an HTTP trigger function using the following command:
func azure functionapp publish my-function --javascript
It worked perfectly — I saw the function listed in the Azure portal.
Later, I added another function with an Event Grid trigger. In this function, I use DuckDB to read a .parquet file from Azure Storage. It works locally when I run func start.
But when I try to publish both functions again using the same command, the new Event Grid function is not deployed, and the previously working HTTP function also disappears from the Azure portal. It seems like something is breaking the deployment.
Here’s the core code from my Event Grid function (using DuckDB to query parquet data from storage):
const duckdb = require('duckdb');
module.exports = async function (req, context) {
try {
const db = new duckdb.Database(':memory:');
const conn = db.connect();
conn.run('INSTALL azure;');
conn.run('LOAD azure;');
conn.run("SET azure_storage_connection_string='my-azure_storage_connection_string';");
const query = "SELECT * FROM 'az://my-container/path/test.parquet';";
const data = await new Promise((resolve, reject) => {
conn.all(query, (err, rows) => {
if (err) reject(err);
else resolve(rows);
});
});
conn.close();
context.res = {
status: 200,
body: data,
};
} catch (error) {
context.res = {
status: 500,
body: 'Internal Server Error',
};
}
};