tps/templates/srce_template.pgsql

128 lines
2.3 KiB
Plaintext
Raw Normal View History

UPDATE tps.SRCE
SET DEFN =
2017-10-25 10:44:57 -04:00
$$
{
"name": "WMPD",
"descr": "Williams Paid File",
"type":"csv",
2017-10-25 10:44:57 -04:00
"schema": [
{
"key": "Carrier",
2017-10-25 10:44:57 -04:00
"type": "text"
},
{
"key": "SCAC",
"type": "text"
},
{
"key": "Mode",
"type": "text"
},
{
"key": "Pro #",
"type": "text"
},
{
"key": "B/L",
"type": "text"
},
{
"key": "Pd Amt",
"type": "numeric"
},
{
"key": "Loc#",
"type": "text"
},
{
"key": "Pcs",
"type": "numeric"
},
{
"key": "Wgt",
"type": "numeric"
},
{
"key": "Chk#",
"type": "numeric"
},
{
"key": "Pay Dt",
"type": "date"
},
{
"key": "Acct #",
"type": "text"
},
{
"key": "I/O",
"type": "text"
},
{
"key": "Sh Nm",
"type": "text"
},
{
"key": "Sh City",
"type": "text"
},
{
"key": "Sh St",
"type": "text"
},
{
"key": "Sh Zip",
"type": "text"
},
{
"key": "Cons Nm",
"type": "text"
},
{
"key": "D City ",
"type": "text"
},
{
"key": "D St",
"type": "text"
},
{
"key": "D Zip",
"type": "text"
},
{
"key": "Sh Dt",
2017-10-25 10:44:57 -04:00
"type": "date"
},
{
"key": "Inv Dt",
2017-10-25 10:44:57 -04:00
"type": "date"
},
{
"key": "Customs Entry#",
2017-10-25 10:44:57 -04:00
"type": "text"
},
{
"key": "Miles",
2017-10-25 10:44:57 -04:00
"type": "numeric"
},
{
"key": "Frt Class",
"type": "text"
},
{
"key": "Master B/L",
"type": "text"
2017-10-25 10:44:57 -04:00
}
],
"unique_constraint": {
"fields":[
"{Pay Dt}",
"{Carrier}"
2017-10-25 10:44:57 -04:00
]
}
}
$$::JSONB
WHERE
SRCE = 'WMPD'