https://github.com/Khezen/mergejson //latest 3months ago https://github.com/boschni/json-merger https://github.com/datavis-tech/graph-data-structure https://github.com/mananshah99/graph-json https://github.com/dagrejs/graphlib https://www.npmjs.com/package/json-query https://github.com/jsonata-js/jsonata http://breeze.github.io/doc-js/query-using-json.html https://stackoverflow.com/questions/11076067/finding-matches-between-multiple-javascript-arrays Graph Representation in Json https://stackoverflow.com/questions/43052290/representing-a-graph-in-json Blockchains https://101blockchains.com/where-blockchain-is-stored/ https://github.com/nguyentb/Personal-data-management https://ieeexplore.ieee.org/document/8876647 FileStream ----------------------- https://nodejs.dev/learn/reading-files-with-nodejs //converting mysql to mongodb https://stackoverflow.com/questions/6251548/converting-database-from-mysql-to-mongodb Datatype conversion ------------------------------- https://blog.back4app.com/migrating-from-sql-to-nosql/ https://stackoverflow.com/questions/49208561/how-to-merge-object-of-multiple-json-into-one-json-file-using-node-js/49209093 Better coding ----------------------------------------------------- https://bytefish.medium.com/clean-up-your-code-by-removing-if-else-statements-31102fe3b083 NPM Library ------------------------------------------------ https://www.npmjs.com/package/node-json-transform const multiHashing= require('multihashing-async'); //https://www.npmjs.com/package/multihashing-async#in-nodejs-through-npm //https://github.com/multiformats/js-multihashinghttps://codeburst.io/a-simple-guide-to-es6-iterators-in-javascript-with-examples-189d052c3d8e var ab2str = require('arraybuffer-to-string'); //https://www.npmjs.com/package/arraybuffer-to-string To publish and unpublish package -------------------------------- npm publish npm unpublish --force packagename To create NPX -------------------------------- https://stackoverflow.com/questions/33509816/what-exactly-does-usr-bin-env-node-do-at-the-beginning-of-node-files https://stackoverflow.com/questions/54132430/is-it-possible-to-use-locally-installed-ts-node-in-package-json-bin https://qastack.id/programming/33535879/how-to-run-typescript-files-from-command-line To Run the Script ------------------------------------------------- >ts-node MetaModelBuilder.ts connection.json schemas schema_all.json >npm run penta-mapping connection.json schemas schema_all.json >npm run penta-customer-hashing customer_config.json schemas customer_hashed10_all.json dir *.ts /b /s > ts-files.txt tsc @ts-files.txt del ts-files.txt Error messages -------------------------------------------- npm - “Can't find Python executable ”python“, you can set the PYTHON env variable.” >npm config set python C:\Program Files\Python37\python.exe gyp Failing when Installing pg-native >brew install postgresql https://stackoverflow.com/questions/32948935/gyp-failing-when-installing-pg-native 'tsc command not found' in compiling typescript npm install -g typescript if NPX does not load the latest file // do not do this oneC:\Users\Johan\AppData\Roaming\npm>del node_modules C:\Users\Johan\AppData\Roaming\npm-cache> rm -r * C:\Users\Johan\AppData\Local\npm-cache\_npx> rm -r * Note: C:\Users\Johan\AppData\Roaming\npm\node_modules\penta-mapping is the actual project ------------------ Pull from branch ------------------------- jiskandar@Johans-MacBook-Pro Client % npm install jiskandar@Johans-MacBook-Pro Client\models\src % npm install To run MongoDB (i.e. the mongod process) as a macOS service, issue the following: brew services start mongodb-community@4.4 To stop a mongod running as a macOS service, use the following command as needed: brew services stop mongodb-community@4.4 If you started MongoDB as a macOS service: brew services list //set the password https://stackoverflow.com/questions/38921414/mongodb-what-are-the-default-user-and-password //if want to run mongo in docker with user name and password https://www.code4it.dev/blog/run-mongodb-on-docker Installing Mongo Mac ------------------------- https://shashank6341.medium.com/installing-mongodb-on-macos-catalina-big-sur-or-older-d47c18b0c57d *********************** When Pull the Develop or other branch *************************** make sure the DBMS is running select the right nvm version 15.3, the better one is nvm install v16.14.2 1. npm install -g ts-node 2. npm install -g node-gyp //3. node-gyp configure 3. sudo apt-get install libpq-dev select the right nvm version 15.3 To Run the Script ------------------------------------------------- >ts-node MetaModelBuilder.ts connection.json schemas schema_all.json or >npm run penta-mapping connection.json schemas schema_all.json >ts-node Customer.ts customer_config1.json schemas customer_test1.json or >npm run penta-customer-hashing customer_config.json schemas customer_hashed10_all.json npx penta-mapping ./config/crjw_schema_config.json . crjw_schema_graph.json npx penta-customer-hashing ./config/crjw_customer_config.json . crjw_customer_hash.json ************************************************************ generate customer hashing Client> ts-node Customer.ts ../config/customer_crjw_mongo_1_config.json ../schemas crjw_mongo_1_hash.json ts-node Customer.ts ./config/customer_crjw_mongo_2_config.json schemas crjw_mongo_2_hash.json ts-node Customer.ts ./config/customer_crjw_mongo_5_config.json schemas crjw_mongo_5_hash.json ts-node Customer.ts ../config/customer_dvdrental_postgres_1_config.json ../schemas dvdrental_postgres_hash.json ts-node Customer.ts ../config/customer_northwind_mssql_config.json ../schemas northwind_mssql_hash.json ts-node Customer.ts ../config/customer_employees_mysql_config.json ../schemas employees_mysql_hash.json ts-node Customer.ts ../config/customer_jobdatabase_mysql_config.json ../schemas jobdatabase_mysql_hash.json ts-node Customer.ts ../config/customer_hr_oracle_config.json ../schemas hr_oracle_hash.json ts-node Customer.ts ../config/customer_sample_db2_config.json ../schemas sample_db2_hash.json ssh -N -L localhost:8888:localhost:27017 PrivacyLock@pentadigital.net ts-node Customer.ts ../config/customer_crjw_mongo_config_tunnel.json ../schemas crjw_mongo_hash_tunnel.json npx penta-customer-hash ./config/customer_crjw_mongo_config_tunnel.json ./schemas crjw_mongo_hash_tunnel.json ssh -N -L localhost:8888:localhost:3306 PrivacyLock@pentadigital.net ts-node Customer.ts ../config/customer_employees_mysql_config_tunnel.json ../schemas employees_mysql_hash_tunnel.json ssh -N -L localhost:8888:localhost:1521 PrivacyLock@pentadigital.net ts-node Customer.ts ../config/customer_hr_oracle_config_tunnel.json ../schemas hr_oracle_hash_tunnel.json ssh -N -L localhost:8888:localhost:5432 PrivacyLock@pentadigital.net ts-node Customer.ts ../config/customer_dvdrental_postgres_config_tunnel.json ../schemas dvdrental_postgres_hash_tunnel.json ssh -N -L localhost:8888:localhost:50000 PrivacyLock@pentadigital.net ts-node Customer.ts ../config/customer_sample_db2_config_tunnel.json ../schemas sample_db2_hash_tunnel.json npx penta-customer-hash ./config/customer_sample_db2_config_tunnel.json ./schemas sample_db2_hash_tunnel.json ************************************************************ generate GraphNodes Client> //ts-node MetaModelBuilder.ts ./config/schema_crjw_mongo_config.json schemas crjw_mongo_graph.json ts-node MetaModelBuilder.ts ../config/schema_crjw_mongo_config.json ../schemas crjw_mongo_graph.json ts-node MetaModelBuilder.ts ../config/schema_dvdrental_postgres_config.json ../schemas dvdrental_postgres_graph.json ts-node MetaModelBuilder.ts ../config/schema_employee_mysql_config.json ../schemas employee_mysql_graph.json ts-node MetaModelBuilder.ts ../config/schema_hr_oracle_config.json ../schemas hr_oracle_graph.json ts-node MetaModelBuilder.ts ../config/schema_northwind_mssql_config.json ../schemas northwind_mssql_graph.json ts-node MetaModelBuilder.ts ../config/schema_sample_db2_config.json ../schemas sample_db2_graph.json ts-node MetaModelBuilder.ts ./config/schema_dvdrental_employee_postgres_mysql_schema_config.json schemas dvdrental_employee_postgres_mysql_graph.json ts-node MetaModelBuilder.ts ./config/schema_jobdatabase_mysql_config.json schemas jobdatabase_mysql_graph.json ts-node MetaModelBuilder.ts ./config/schema_jobnetwork_crjw_mongo_mongo_config.json schemas jobnetwork_crjw_mongo_mongo_graph.json ts-node MetaModelBuilder.ts ./config/schema_jobnetwork_employees_hr_dvdrental_mongo_mysql_oracle_postgres_config.json schemas jobnetwork_employees_hr_dvdrental_mongo_mysql_oracle_postgres_graph.json ts-node MetaModelBuilder.ts ./config/schema_jobnetwork_employees_hr_mongo_mysql_oracle_config.json schemas schema_jobnetwork_employees_hr_mongo_mysql_oracle_graph.json ts-node MetaModelBuilder.ts ./config/schema_jobnetwork_employees_hr_dvdrental_northwind_mongo_mysql_oracle_postgres_mssql_config.json schemas schema_jobnetwork_employees_hr_mongo_mysql_oracle_mssql_graph.json ssh -N -L localhost:8888:localhost:27017 PrivacyLock@pentadigital.net ts-node MetaModelBuilder.ts ../config/schema_crjw_mongo_config_tunnel.json ../schemas crjw_mongo_graph_tunnel.json ssh -N -L localhost:8888:localhost:3306 PrivacyLock@pentadigital.net ts-node MetaModelBuilder.ts ../config/schema_employee_mysql_config_tunnel.json ../schemas employee_mysql_graph_tunnel.json ssh -N -L localhost:8888:localhost:1521 PrivacyLock@pentadigital.net ts-node MetaModelBuilder.ts ../config/schema_hr_oracle_config_tunnel.json ../schemas hr_oracle_graph_tunnel.json ssh -N -L localhost:8888:localhost:5432 PrivacyLock@pentadigital.net ts-node MetaModelBuilder.ts ../config/schema_dvdrental_postgres_config_tunnel.json ../schemas dvdrental_postgres_graph_tunnel.json ssh -N -L localhost:8888:localhost:50000 PrivacyLock@pentadigital.net ts-node MetaModelBuilder.ts ../config/schema_sample_db2_config_tunnel.json ../schemas sample_db2_graph_tunnel.json npx penta-data-mapping ./config/schema_sample_db2_config_tunnel.json ./schemas sample_db2_graph_tunnel1.json