npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cloud_etl

v1.0.2

Published

Service for ETL data

Readme

MS SQl Server to Google Bigquery

Descripttions

Source code base on cli to read csv data (exported auto by SQLCMD) and passing it to google bigquery

Usage

Install nodejs on server. Link: https://nodejs.org/en/ Run follow command:

CMD1: load table to google bigquery

 node --max-old-space-size=8192 app.js  ggc_process_cdc <datasetid> <tableid>  <sourcefile> <schemafile> <isCreated>
  • isCreated = true process will create table in google bigquery.
  • isCreated = false process will filter csv to another csv then push new csv to google cloud storage then load data to google big query.

CMD2: load cdc table to google big query

node --max-old-space-size=8192 app.js ggc_process_cdc <datasetid> <tableid>  <sourcefile> <schemafile> <isCreated>
  • isCreated = true process will create table in google bigquery inside dataset TEMP.
  • isCreated = false process will filter csv to another csv then push new csv to google cloud storage then load data to google bigquery dataset TEMP. After that run merged script to merged change from temp table to master table.

CMD3: convert schema format from mssql to google big query

node --max-old-space-size=8192 app.js convert_mssql_schema <source> <target>
  • Convert script schema auto export from mssql server to txt schema format google big query.

Notes: : Dataset name in google bigquery. : Table name will be create in google bigquery. This name = tablename in MS SQL SERVER. : Full path file of csv file. : full path of schema file.

Excample

 node --max-old-space-size=8192  app.js ggc_process CONTRACTS OtoMakers /OtoMakers.txt true

MS SQL

Command to export csv file:

 sqlcmd -S . -U <user> -P <password> -d <database> -Q "select * from OtoMakers" -o E:\Temp\OtoMakers.csv -s"#" -W  -u

SCHEMA Template

Map schema config:

MSSQL - GGBQ:
nvarchar - string
boolean - integer
int - integer
long - integer
datetime - NUMERIC
decimal - Timestamp

RawContract Schema txt example:

Id:integer,AffiliateOrganizationId:integer,CertificationNumber:string,CompanyId:integer,ContractType:integer,Created:integer,CreatedBy:integer,CreatedDate:Timestamp,HoldTimeExpire:Timestamp,HolderId:integer,MissingInfomationText:string,MissingInfomationType:integer,SellerName:string,SourceOfDataType:integer,CustomerPhone:string,Cost:NUMERIC,TransactionCode:string,TransactionStatus:integer,RevenueRequestStatus:integer,RevenueRequestCode:string,CertificationRequestStatus:integer,CertificationRequestCode:string,EffectiveDate:Timestamp,ExpiredDate:Timestamp,Flags:integer,TransactionDate:Timestamp,RevenueFailsCount:integer,CertificationFailsCount:integer,IsBlock:integer,InsuranceProductId:integer,InsuranceProductCategoryId:integer,InsuranceProductCategoryCode:string,IsDeleted:integer,Status:integer

CMD get schema: mssql-scripter -S <hostIp>,1633 -d <database> -U <user> -P <password> --include-objects InsurancePrograms > ./InsurancePrograms.sql

Step by Step

  1. Export csv to sourcefile path
  2. Create schema file with name = TableName exported or run cli convert_mssql_schema
  3. Copy schema file to schema folder
  4. Run cmd: node --max-old-space-size=8192 app.js ggc_process

POSTGRESQL

  1. Must install postgres cli
  2. cli export schema: PGPASSWORD= pg_dump -d organization -U postgres -h -p -s -t unit -f /ORGANIZATION.Unit.sql
  3. cli run convert to GBQ schema: node --max-old-space-size=8192 app.js convert_postgres_schema /ORGANIZATION.Unit.sql /ORGANIZATION.Unit.txt

License Information

This project is licensed according to VSIT

Copyright (c) 2019. VSIT ([email protected])

Licensed under the VSIT, Version 1.0 (the "License");
you may not use this file except in compliance with the License.