mariadb-dev-example-modern-sql/zeppelin/bitemporal-table-demo.json

1 wiersz
35 KiB
JSON

2020-04-01 22:37:22 +00:00
{"paragraphs":[{"title":"Create a new database","text":"%mariadb\n\nCREATE DATABASE accounting;\n","user":"anonymous","dateUpdated":"2020-03-26T14:12:22+0000","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{"0":{"graph":{"mode":"table","height":300,"optionOpen":false,"setting":{"table":{"tableGridState":{},"tableColumnTypeState":{"names":{"Database":"string"},"updated":false},"tableOptionSpecHash":"[{\"name\":\"useFilter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable filter for columns\"},{\"name\":\"showPagination\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable pagination for better navigation\"},{\"name\":\"showAggregationFooter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable a footer for displaying aggregated values\"}]","tableOptionValue":{"useFilter":false,"showPagination":false,"showAggregationFooter":false},"updated":false,"initialized":false}},"commonSetting":{}}}},"editorSetting":{"language":"sql","editOnDblClick":false,"completionKey":"TAB","completionSupport":true},"editorMode":"ace/mode/sql","editorHide":false,"title":true},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1585065832325_764911294","id":"20200324-160352_592975270","dateCreated":"2020-03-24T16:03:52+0000","dateStarted":"2020-03-26T14:12:22+0000","dateFinished":"2020-03-26T14:12:22+0000","status":"FINISHED","progressUpdateIntervalMs":500,"focus":true,"$$hashKey":"object:81724","results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"Query executed successfully. Affected rows : 1"}]}},{"title":"Create a new bitemporal table","text":"%mariadb\n\nCREATE TABLE accounting.employees (\n id INT NOT NULL AUTO_INCREMENT,\n first_name VARCHAR(100) NOT NULL,\n last_name VARCHAR(100) NOT NULL,\n department VARCHAR(25) NOT NULL,\n salary DECIMAL(9,2) NOT NULL,\n date_start DATE NOT NULL,\n date_end DATE NOT NULL DEFAULT '9999-12-31',\n PERIOD FOR emp_period(date_start, date_end),\n PRIMARY KEY (id)\n) WITH SYSTEM VERSIONING;\n","user":"anonymous","dateUpdated":"2020-03-26T14:12:26+0000","config":{"colWidth":12,"fontSize":9,"enabled":true,"results":{"0":{"graph":{"mode":"table","height":300,"optionOpen":false,"setting":{"table":{"tableGridState":{},"tableColumnTypeState":{"names":{"id":"string","first_name":"string","last_name":"string","department":"string","salary":"string","date_start":"string","date_end":"string"},"updated":false},"tableOptionSpecHash":"[{\"name\":\"useFilter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable filter for columns\"},{\"name\":\"showPagination\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable pagination for better navigation\"},{\"name\":\"showAggregationFooter\",\"valueType\":\"boolean\",\"defaultValue\":false,\"widget\":\"checkbox\",\"description\":\"Enable a footer for displaying aggregated values\"}]","tableOptionValue":{"useFilter":false,"showPagination":false,"showAggregationFooter":false},"updated":false,"initialized":false}},"commonSetting":{}}}},"editorSetting":{"language":"sql","editOnDblClick":false,"completionKey":"TAB","completionSupport":true},"editorMode":"ace/mode/sql","editorHide":false,"title":true},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1585064575704_-1680557328","id":"20200324-154255_1444580934","dateCreated":"2020-03-24T15:42:55+0000","dateStarted":"2020-03-26T14:12:26+0000","dateFinished":"2020-03-26T14:12:26+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:81725","results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"Query executed successfully. Affected rows : 0"}]}},{"title":"Insert values","text":"%mariadb\n\nINSERT INTO accounting.employees (first_name, last_name, department, salary, date_start) \nVALUES \n ('Tracy', 'Smith', 'HR', 65000.00, '2016-01-01'),\n ('James', 'Brown', 'MKT', 45000.00, '2016-04-15'),\n ('Stacy