This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require('node-fetch'); | |
const fs = require('fs'); | |
const csv = require('csv-parser'); | |
const csvFilePath = 'CSV TEMPLATE'; | |
const apiEndpoint = 'CUSTOMER SPECIFIC INCIDENTS SYNC ENDPOINT'; | |
const apiKey = 'API KEY'; | |
fs.createReadStream(csvFilePath) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Client } = require('pg'); | |
const axios = require('axios'); | |
// Set debug mode | |
const debug = true; // Set to false to make actual API calls | |
// Database connection string | |
const connectionString = [CONNECTION STRING FROM DX] | |
// Create a new PostgreSQL client |