Push to db block
This commit is contained in:
parent
33c2b95125
commit
8471f32690
@ -1 +1 @@
|
|||||||
**Hello world!!!**
|
# Block for DB operations like lookup, insert, update etc.
|
||||||
@ -1,6 +1,10 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"namespace": "",
|
"namespace": "staging",
|
||||||
"connectionId": ""
|
"connectionId": "e0f62962-1268-4bcf-b336-72ebfbe43578"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"namespace": "default",
|
||||||
|
"connectionId": "default"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
30
main.sql
30
main.sql
@ -1 +1,29 @@
|
|||||||
Select * from dummy_table limit 10;
|
INSERT INTO public.applications (
|
||||||
|
application_key,
|
||||||
|
application_timestamp,
|
||||||
|
application_ssn,
|
||||||
|
application_email_address,
|
||||||
|
application_bank_account_number,
|
||||||
|
application_is_rejected,
|
||||||
|
application_date_of_birth,
|
||||||
|
application_customer_type
|
||||||
|
)
|
||||||
|
VALUES (
|
||||||
|
$application_key,
|
||||||
|
$application_timestamp,
|
||||||
|
$application_ssn,
|
||||||
|
$application_email_address,
|
||||||
|
$application_bank_account_number,
|
||||||
|
$application_is_rejected,
|
||||||
|
$application_date_of_birth,
|
||||||
|
$application_customer_type
|
||||||
|
)
|
||||||
|
ON CONFLICT (application_key)
|
||||||
|
DO UPDATE
|
||||||
|
SET application_timestamp = EXCLUDED.application_timestamp,
|
||||||
|
application_ssn = EXCLUDED.application_ssn,
|
||||||
|
application_email_address = EXCLUDED.application_email_address,
|
||||||
|
application_bank_account_number = EXCLUDED.application_bank_account_number,
|
||||||
|
application_is_rejected = EXCLUDED.application_is_rejected,
|
||||||
|
application_date_of_birth = EXCLUDED.application_date_of_birth,
|
||||||
|
application_customer_type = EXCLUDED.application_customer_type;
|
||||||
@ -1 +1,38 @@
|
|||||||
{}
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"application_key": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"application_timestamp": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
|
},
|
||||||
|
"application_ssn": {
|
||||||
|
"type": ["string", "null"]
|
||||||
|
},
|
||||||
|
"application_email_address": {
|
||||||
|
"type": ["string", "null"],
|
||||||
|
"format": "email"
|
||||||
|
},
|
||||||
|
"application_bank_account_number": {
|
||||||
|
"type": ["string", "null"]
|
||||||
|
},
|
||||||
|
"application_is_rejected": {
|
||||||
|
"type": ["boolean", "null"],
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"application_date_of_birth": {
|
||||||
|
"type": ["string", "null"],
|
||||||
|
"format": "date"
|
||||||
|
},
|
||||||
|
"application_customer_type": {
|
||||||
|
"type": ["string", "null"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"application_key",
|
||||||
|
"application_timestamp"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|||||||
@ -1 +1,13 @@
|
|||||||
{}
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"type": ["string", "null"]
|
||||||
|
},
|
||||||
|
"error": {
|
||||||
|
"type": ["string", "null"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": []
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user