too much to list

This commit is contained in:
Paul Trowbridge 2018-05-25 02:25:36 -04:00
parent 92d56aaba2
commit 44db887b6a
9 changed files with 1256 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,11 +1,11 @@
{ {
"srce":"dcard", "srce": "dcard",
"sequence":1, "sequence": 1,
"defn": [ "defn": [
{ {
"key": "{Description}", "key": "{Description}",
"map": "y", "map": "y",
"flag": "g", "flag": "",
"field": "f20", "field": "f20",
"regex": ".{1,20}", "regex": ".{1,20}",
"retain": "y" "retain": "y"

View File

@ -10,7 +10,7 @@ FROM
{ {
"key": "{Description}", "key": "{Description}",
"map": "y", "map": "y",
"flag": "g", "flag": "",
"field": "f20", "field": "f20",
"regex": ".{1,20}", "regex": ".{1,20}",
"retain": "y" "retain": "y"

View File

@ -1,4 +1,26 @@
DROP FUNCTION tps.report_unmapped; CREATE OR REPLACE FUNCTION tps.jsonb_concat(
state jsonb,
concat jsonb)
RETURNS jsonb AS
$BODY$
BEGIN
--RAISE notice 'state is %', state;
--RAISE notice 'concat is %', concat;
RETURN state || concat;
END;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
DROP AGGREGATE IF EXISTS tps.jsonb_concat_obj(jsonb);
CREATE AGGREGATE tps.jsonb_concat_obj(jsonb) (
SFUNC=tps.jsonb_concat,
STYPE=jsonb,
INITCOND='{}'
);
DROP FUNCTION IF EXISTS tps.report_unmapped;
CREATE FUNCTION tps.report_unmapped(_srce text) RETURNS TABLE CREATE FUNCTION tps.report_unmapped(_srce text) RETURNS TABLE
( (
source text, source text,

View File

@ -4,7 +4,8 @@
"loading_function":"csv", "loading_function":"csv",
"constraint":[ "constraint":[
"{Trans. Date}", "{Trans. Date}",
"{Post Date}" "{Post Date}",
"{Description}"
], ],
"schemas":{ "schemas":{
"default":[ "default":[