This topic was automatically generated from Slack. You can find the original thread here.
Hello community ![]()
I’m trying to use the HTTP NODE API for BigQuery (since only insert rows is supported).
In this example, I’m looking to test just creating a dataset.
module.exports = defineComponent({
props: {
google_cloud: {
type: "app",
app: "google_cloud",
}
},
async run({ steps, $ }) {
// Required workaround to get the @google-cloud/storage package
// working correctly on Pipedream
require("@dylburger/umask")()
// Imports the Google Cloud client library
const { BigQuery } = require('@google-cloud/bigquery');
async function createDataset() {
// Creates a client
const bigqueryClient = new BigQuery();
// Create the dataset
const [dataset] = await bigqueryClient.createDataset('test_from_pipedream');
console.log(`Dataset ${dataset.id} created.`);
}
createDataset();
},
})
The result is This step was still trying to run code when the step ended. Make sure you promisify callback functions and await all Promises. (Reason: GetAddrInfoReqWrap, Learn more: https://pipedream.com/docs/code/nodejs/async/)
Any help is appreciated. Thank you so much ![]()