Executing a Data Factory Pipeline using JavaScript

In Azure Data Factory, I constructed a pipeline to transfer data from an Azure Storage Table to an Azure SQL database Table.

The Azure Storage Table receives data from a JavaScript chatbot that captures responses and saves them in the table. I want to initiate the CopyTabletoSQL process through my JavaScript application after all responses have been recorded.

Here is the description of my CopyTableToSQL pipeline.

{
"name": "CopyTabletoSQL",
"type": "Copy",
"policy": {
    "timeout": "7.00:00:00",
    "retry": 0,
    "retryIntervalInSeconds": 30,
    "secureOutput": false
},
"typeProperties": {
    "source": {
        "type": "AzureTableSource"
    },
    "sink": {
        "type": "SqlSink",
        "writeBatchSize": 10000
    },
    "enableStaging": false,
    "dataIntegrationUnits": 0
},
"inputs": [
    {
        "referenceName": "tableInputDataset",
        "type": "DatasetReference"
    }
],
"outputs": [
    {
        "referenceName": "OutputSqlTable1",
        "type": "DatasetReference"
    }
]
}

Is there a way to trigger this from a JavaScript application? The official documentation (https://learn.microsoft.com/en-us/azure/data-factory/concepts-pipeline-execution-triggers) lists .net, PowerShell, REST API, and Python SDK as options but does not mention anything specific for node.js.

Answer №1

As of now, the Azure Data Factory Node.js SDK is not supported. If you have already created a pipeline in your ADF account, you can utilize the Azure Data Factory Pipelines - Create Run REST API to execute it.

To do this, you will need to generate an Authorization token in the Headers. You can reference the ADAL Node.js SDK to generate the token.

Before proceeding, make sure to grant permission to your ADF app.

https://i.sstatic.net/1elie.png

https://i.sstatic.net/qfsAf.png

I hope this information proves helpful for you.

Answer №2

One way to utilize a REST API with JavaScript is to make a call using the appropriate method.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Struggling to understand why my React Component is failing to render properly

Could there be an issue with how I imported react or am I simply overlooking something small? Any feedback would be greatly appreciated. As a beginner in programming, I may be missing a simple solution that I'm not experienced enough to identify. Than ...

What could be causing the sudden disappearance of the button?

There is an element with the ID "alpha" that contains the text "Now I'm here...". When the button is clicked, only the text should be removed, not the button itself. <div id="alpha">Now I'm here...</div> <button type="button" oncl ...

Issues with the code: $("input[type=checkbox]:checked").each(function() { var checkboxId = $(this).attr("id"); });

When submitting a form, I need to retrieve the IDs of all checked checkboxes. Currently, $(this).id() is causing an error. What is the correct code to obtain the IDs of all checked checkboxes? $("#pmhxform input:checkbox:checked").each(function() { ...

executing the sudo command along with forever running

I am facing a challenge with starting my Node.js web app using a specific command: sudo node /home/azureuser/myapp/node_modules/concurrently/src/main.js --kill-others "npm run start-prod" "npm run start-prod-api" Running this command successfully starts ...

Tips for extracting a specific segment from a URL string

Take a look at the outcome of the console.log below: console.log('subscribe:', event.url); "https://hooks.stripe.com/adapter/ideal/redirect/complete/src_1E2lmZHazFCzVZTmhYOsoZbg/src_client_secret_EVnN8bitF0wDIe6XGcZTThYZ?success=true" I need to ...

What steps should I follow to recreate this PHP hashing method in Node.js?

I am currently trying to replicate a password hashing algorithm in node.js (using LTS version 14.x) that was initially coded in PHP (version 7.2). Despite my efforts, the node.js implementation I have created seems to deviate from the original after the fi ...

Issue encountered with Array returning an Empty Set

Issue Update: When I enter something in the input box, print_r($_POST); in the php file is empty. Array ( [q] => running ) However, when I try to print json_encode($jsonArray);, it returns [] The PHP code that fetches data from the Interest table ...

Utilizing class attributes within multiple classes

I have created a custom class called MutationValidator as follows: const ERR_MSG = 'Error1'; @Service() export class MutationValidator { .. } This class is used in another class like so: import { MutationValidator } from './mutation ...

Displaying a div when a radio button is clicked in React

I am attempting to create a functionality where clicking on one radio button will display another div in React. As a beginner in React, I have tried implementing the code below but encountered issues with hiding and displaying the content based on user inp ...

VueJS error: 'Property or method is not defined on the instance' message appears despite the method being defined on the instance

Is there a way in Vue.js to dynamically assign the class 'adjust' based on the value of a computed property called "isTrueSet"? I keep encountering the following error message: [Vue warn]: Property or method "itTrueSet" is not defined on the inst ...

Python: Storing data retrieved from AJAX response as a .json file and loading it into a pandas DataFrame

Greetings and thank you for taking the time to read this, My objective is to extract company information from a specific stock exchange and then store it in a pandas DataFrame. Each company has its own webpage identified by unique "KodeEmiten" endings, wh ...

Error: The value being evaluated in document.getElementById(x).style is not an object and is not supported

Desired Outcome for my Javascript: I am working with a div that includes an "onmouseover='getPosition(x)'" attribute which can be dynamically added and removed through my javascript by clicking a specific button. The function 'getPosition() ...

Resize an image to fit perfectly within a material-ui grid

Is there a way to resize images within a grid layout without them getting cropped? Each image I try to fit into the top horizontal grid behaves differently due to varying dimensions. Instead of stretching and fitting into the container, the images end up b ...

Error in the JSON response

After making a JSON call using curl, I receive the following data: { 'result': { 'today_runtime': 830, 'month_runtime': 39991, 'today_energy': 1293, 'month_energy': 55326 ...

What is the convention for using one-letter function names in jQuery and JSON?

Could someone please clarify the functionality of this code snippet? One aspect that I find frustrating about this function is its use of a single-lettered name. How can I determine the purpose of this function and what triggers it to run? function ...

Unable to access MongoDB API via standard HTTP requests

I've been attempting to access the MongoDB API using an API key for authentication, but I keep receiving a 401 status code. Below is the code snippet I've been using: fetch(‘https://eu-west-2.aws.data.mongodb-api.com/app/application-0-dhdvm/en ...

What is the best way to generate all possible combinations between two arrays of objects?

I am faced with the challenge of combining two arrays of objects, named origin and destination, to generate a final array that contains all possible combinations from the two arrays. For instance: origin = [ { id: 1, regionName: "Africa North&q ...

Is it possible to include indices in a list of hashes when sending an Ajax request to the controller in JSON format?

When sending data to a Rails controller: $.ajax({ url: '/haha', type: 'put', dataType: 'json', data: { multiplication: [ { "a": 5, "b": 5 }, { "a": 5, "b": 5 ...

Steps for Loading Image after Preloader:1. Set up a preloader

My goal is to have the current thumbnail image passed to the #big-image div and shown with a pre-loader when the page-gallery--thumbnails li class is clicked. However, the current code is not meeting my expectations as the image loads before the pre-loader ...

Extracting data from JSON response

The JSON output is as follows: [{"Post":{"name":"Name1","text":"Text1"}}, {"Post":{"name":"Name2","text":"Text2"}}] In attempting to retrieve the values, I used the following code: var data = $.parseJSON(result) // converting JSON to object I tried acc ...