Skip to content

Instantly share code, notes, and snippets.

View johnathan728's full-sized avatar

Johnathan Pierce johnathan728

View GitHub Profile
@johnathan728
johnathan728 / crm_campaign_data_integration_flow.ps1
Created July 21, 2025 15:32
Automates integration of CRM, campaign, and performance data using Power Automate to ensure secure, real-time and batch data synchronization.
# crm_campaign_data_integration_flow.ps1
# PowerShell script to simulate logic for Power Automate's HTTP-based data integration workflows
# Configuration
$crmApiUrl = "https://api.crmcompany.com/v1/customers"
$campaignApiUrl = "https://api.marketingplatform.com/v2/campaigns"
$authToken = "Bearer YOUR_ACCESS_TOKEN_HERE"
$headers = @{
"Authorization" = $authToken
"Content-Type" = "application/json"
@johnathan728
johnathan728 / pls_sem_analysis_survey190.R
Created July 21, 2025 13:22
SmartPLS and SPSS/Amos analysis of survey data to validate a conceptual model with mediation and moderation effects.
# Load required libraries
library(plspm)
library(lavaan)
library(semTools)
library(dplyr)
# Load and preview data
survey_data <- read.csv("survey_data_190.csv")
head(survey_data)
@johnathan728
johnathan728 / shopify_netsuite_integration_flow.js
Created July 14, 2025 20:13
Automated Shopify-NetSuite integration using Celigo for syncing orders, customers, and inventory with custom mapping, transformations, and robust error handling.
/**
* Shopify-NetSuite Integration Flow - Order Sync Script
* Filename: shopify_netsuite_integration_flow.js
*/
// Sample mapping and transformation script for Celigo integrator.io
function transformOrder(record) {
try {
let transformed = {};
@johnathan728
johnathan728 / netsuite_salesforce_integration.apex
Created July 10, 2025 13:11
One-way integration from NetSuite to Salesforce using Celigo, with mobile access and Outlook sync for enhanced sales team productivity.
public class NetSuiteIntegrationHandler {
private static final String NETSUITE_ENDPOINT = 'https://api.netsuite.com/customers';
private static final String AUTH_TOKEN = 'Bearer YOUR_NETSUITE_API_TOKEN';
public class NetSuiteCustomer {
public String externalId;
public String name;
public String email;
public String phone;
@johnathan728
johnathan728 / PowerBI_NetSuite_CSV_Integration.pq
Created July 9, 2025 21:52
Integrated NetSuite and dynamic CSV data into Power BI with automated refresh, unified modeling, and interactive vendor-performance dashboards.
let
// Connect to NetSuite via ODBC
NetSuiteODBC = Odbc.DataSource("dsn=NetSuiteODBC", [HierarchicalNavigation=true]),
TransactionsTable = NetSuiteODBC{[Name="Transactions"]}[Data],
CleanedTransactions = Table.TransformColumnTypes(TransactionsTable, {
{"TransactionID", Int64.Type}, {"VendorID", Int64.Type}, {"Amount", type number}, {"Date", type date}
}),
// Connect to dynamic CSV folder (Everstage files)
SourceFolder = Folder.Files("https://company.sharepoint.com/sites/data/EverstageCSVs"),
@johnathan728
johnathan728 / etl_pipeline_adf_sql_powerbi.py
Created July 2, 2025 19:00
ETL pipeline development using Azure Data Factory, MS SQL stored procedures, and interactive dashboards in Power BI for data insights.
# etl_pipeline_adf_sql_powerbi.py
import pyodbc
from azure.identity import DefaultAzureCredential
from azure.mgmt.datafactory import DataFactoryManagementClient
from azure.mgmt.datafactory.models import *
# Azure configuration
subscription_id = 'YOUR_SUBSCRIPTION_ID'
rg_name = 'YOUR_RESOURCE_GROUP'
@johnathan728
johnathan728 / retail_elt_pipeline.py
Created July 1, 2025 19:42
Built scalable ELT pipelines using Airflow and dbt to ingest, transform, and monitor diverse data sources into Snowflake for analytics.
from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.operators.python import PythonOperator
from airflow.providers.slack.operators.slack_webhook import SlackWebhookOperator
from airflow.utils.dates import days_ago
from airflow.models import Variable
import snowflake.connector
import requests
default_args = {
@johnathan728
johnathan728 / migration.py
Created June 9, 2025 02:12
migrating financial records from Sage 50 to QuickBooks Enterprise Desktop
import csv
# Define Sage 50 to QuickBooks field mapping
field_mapping = {
'Date': 'TRNS_DATE',
'Vendor': 'NAME',
'Amount': 'AMOUNT',
'Account': 'ACCOUNT',
'Memo': 'MEMO',
'Type': 'TRNSTYPE'
@johnathan728
johnathan728 / ETL.py
Created June 6, 2025 21:46
modular ETL framework using Python and Snowflake for ingesting, cleaning, and transforming third-party behavioral data
import snowflake.connector
import pandas as pd
import requests
# Configuration
SNOWFLAKE_CONFIG = {
'user': 'your_user',
'password': 'your_password',
'account': 'your_account',
'warehouse': 'your_warehouse',
@johnathan728
johnathan728 / engine.py
Created June 6, 2025 21:37
ingesting tick-level market data, extracting features, executing a basic event-driven strategy, and simulating order execution in a low-latency environment
import numpy as np
import pandas as pd
import time
import queue
import threading
from collections import deque
# Simulated tick data generator
def generate_tick_data(n=10000):
timestamps = np.arange(n)