0.2.1 • Published 11 months ago

@openfn/language-cartodb v0.2.1

Weekly downloads
-
License
LGPLv3
Repository
github
Last release
11 months ago

Language cartodb

Language Pack for sending messages using the cartodb API.

Documentation

Configuration

View all the required and optional properties for state.configuration in the official configuration-schema definition.

Examples

addRow(
  'your_table',
  fields(
    field('name', 'taylor'),
    field('lat', dataValue('lat')),
    field('long', dataValue('long')),
    field('mookie', dataValue('form.blaylock')),
    field('description', dataValue('type_description')),
    field('date', dataValue('SubmissionDate'))
  )
);
sql(function (state) {
  return (
    `INSERT INTO untitled_table (name, the_geom) VALUES ('` +
    dataValue('form.first_name')(state) +
    `', ST_SetSRID(ST_Point(` +
    dataValue('lat')(state) +
    `, ` +
    dataValue('long')(state) +
    `),4326))`
  );
});

Development

Clone the adaptors monorepo. Follow the Getting Started guide inside to get set up.

Run tests using pnpm run test or pnpm run test:watch

Build the project using pnpm build.

To just build the docs run pnpm build docs