Skip to content

Remap Upsert Outcome Survey #67

Open
@AishaHassen

Description

@AishaHassen

Background, context, and business value

A clear and concise description of what the client wants and WHY.

For example: [wip...]

The specific request, in as few words as possible

A clear and concise description of what you want to happen.

state.json

Either provide state directly, or link to a file. If sensitive information
should be in state, redact it and provide instructions for where it can be
found.

{
  "configuration": { "username": "abc", "password": "REDACTED" },
  "data": { "a": 1 },
  "cursor": "2020-01-19 00:00:00"
}
{
  "configuration": ["SEE LAST PASS: 'client cred'"],
  "data": { "a": 1 },
  "cursor": "2020-01-19 00:00:00"
}

adaptor

List the adaptor to be used for this job. If changes must be made to the
adaptor, explain why existing functions dont work and specify the new API you'd
like from a helper function.

There is no "upsert" in postgres. I'd like an API where I can provide the table,
the UUID, and some data to upsert. Like this:

upsert('some_table', 'some_column', state.data.records);

trigger

Trigger to be used on production -example: {form: "form-name"}

expression.js

In pseudocode, either in the current job expression or in a new file, describe
as best you can what changes need to be made

each(
  'state.data.patients[*]' // PLEASE FIND THE PATIENTS AND DO THIS FOR EACH ONE
  create('object', fields(
    field('name', state.data.name)
    field('age', '????????') // PLEASE CALCULATE AGE
  ))
)

output.json

Either provide the output you'd like, or describe it in terms of final state and
side effects.

side effects

  1. upsert new records to postgres

output.json

{
  "configuration": {},
  "data": { "statusCode": 200 },
  "references": { "a": 1 }
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions