[ 8/3 ]
 
 
https://colorfield.be/blog/drupal-8-json-custom-migration
 
 
 
drush site-install standard --site-name=UNE --account-name=js --account-pass=js -y
 
<create product content type>
upc (Integer)
description (Plain text)
Price (Float) 
 
Make module
config to read [external]/sites/default/files/products.json
 
copy [migrate_test] folder to /modules
 
drush en migrate_test -y
drush ms
drush mi --group=product
 
 
ReImport 
drush mi --group=product --update
!Install : https://www.drupal.org/project/views_datasource
========================= dataset ======================================
 
{
  "product": [
    {
      "upc": "11111",
      "name": "JS Widget",
      "description": "Helpful for many things.",
      "price": "14.99"
    },
    {
      "upc": "22222",
      "name": "JS Sprocket",
      "description": "Helpful for things needing sprockets.",
      "price": "8.99"
    },
    {
      "upc": "33333",
      "name": "JS Custom",
      "description": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
      "price": "999.99"
    },
    {
      "upc": "444444",
      "name": "JS Spiderman",
      "description": "\n\tQuit log = in units of 4mg \n\tmorning, day, evening, notes (Symptoms/discomfort out of )\n\n\t==============================\n\n\tthr 3/24 - 1,1,2 \n\n\tfri 3/25 - 1,1,2 \n\n\tsat 3/26 - 0,1,1 \n\n\tsun 3/27 - 0,2,1 \n\n\tmon 3/28 - 2,2,1 \n\n\ttue 3/29 - 2,0,1 -  walked ~2miles\n\n\twed 3/30 - 1,1,1 - ran 1 block + 2 park laps\n\n\tthr 3/31 - 0,2,1 - \n\n\tfri 4/1 - 2,0,1 -  Evening and early bedtime attempt sucked.\n\n\tSat 4/2 - 0,0,1  - Fellow golfers dipped, did not cave. \n\n\tSun 4/3 - 0,0,1  - Lots of activty to distract. Hungery. \n\n\tMon 4/4 - 0,0,0  -  Work. pretty draining , activily keeping out of my head!\n\n\tTuesday 4/5 - 0.25,0,0  -  Portland WW interview. Anxious and foggy\n\n\tWed 4/6 - 0,0,0  -  Some cravings, very foggy, less widthdrawl terriblness\n\n\tThr 4/7 - 0,0,0  -  Little anxious, always hungry!\n\n\tFri 4/8 - 0,0,0  -  Little anxious, super dizzy\n\n\tSat 4/9 - 0,0,0  -  Little dizzy, foggy, distracted\n\n\tSun 4/10 - 0,0,0  -  Little dizzy, foggy, distracted\n\n\tMon 4/11 - 0,0,  -  Foggy, distracted, slow processing\n\n\t \n\n\t \n\n\t \n\n\t \n\n\t \n\n\t \n\n\t \n\n\t \n\n\t \n\n\t \n\n\t \n",
      "price": "999.99"
    }	  
  ]
}