2017-11-02 15:07:47 -04:00
|
|
|
UPDATE tps.SRCE
|
|
|
|
|
|
|
|
SET DEFN =
|
2017-10-25 10:44:57 -04:00
|
|
|
$$
|
|
|
|
{
|
2017-11-02 15:07:47 -04:00
|
|
|
"name": "WMPD",
|
|
|
|
"descr": "Williams Paid File",
|
|
|
|
"type":"csv",
|
2017-10-25 10:44:57 -04:00
|
|
|
"schema": [
|
|
|
|
{
|
2017-11-02 15:07:47 -04:00
|
|
|
"key": "Carrier",
|
2017-10-25 10:44:57 -04:00
|
|
|
"type": "text"
|
|
|
|
},
|
|
|
|
{
|
2017-11-02 15:07:47 -04:00
|
|
|
"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"
|
|
|
|
},
|
|
|
|
{
|
2017-11-02 15:07:47 -04:00
|
|
|
"key": "Inv Dt",
|
2017-10-25 10:44:57 -04:00
|
|
|
"type": "date"
|
|
|
|
},
|
|
|
|
{
|
2017-11-02 15:07:47 -04:00
|
|
|
"key": "Customs Entry#",
|
2017-10-25 10:44:57 -04:00
|
|
|
"type": "text"
|
|
|
|
},
|
|
|
|
{
|
2017-11-02 15:07:47 -04:00
|
|
|
"key": "Miles",
|
2017-10-25 10:44:57 -04:00
|
|
|
"type": "numeric"
|
2017-11-02 15:07:47 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"key": "Frt Class",
|
|
|
|
"type": "text"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"key": "Master B/L",
|
|
|
|
"type": "text"
|
2017-10-25 10:44:57 -04:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"unique_constraint": {
|
2017-11-02 15:07:47 -04:00
|
|
|
"fields":[
|
|
|
|
"{Pay Dt}",
|
|
|
|
"{Carrier}"
|
2017-10-25 10:44:57 -04:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2017-11-02 15:07:47 -04:00
|
|
|
$$::JSONB
|
|
|
|
WHERE
|
|
|
|
SRCE = 'WMPD'
|