Challenge Overview
Our contentful script is growing up and going global!
Over the last two months we've asked you to create a script that pulls data from Postgres and insert into Contentful. We've been pleased with the results, but need to add some additional functionality.
Currently, our script does the following:
* Connects to Postgres and Contentful to create a base JSON mapping file
* After the user edits the JSON mapping file, uses this information to transfer the data from Postgres to Contentful
* Upon successful insert into Contentful, gets the Contentful generated ID and updates the record in Postgres.
* Allows user to update/delete records in Contentful
* Allows user to set status of records in Contentful
* Allows user to set map and config files for different content types
* During insert, read all content with the same “common ID” field
* If a record does not have a language, default to the locale set in the config file (Already present).
You can find the source script for this challenge in the forum.
Contentful API documentation: https://www.contentful.com/developers/docs/
Contentful and PostgreSQL schemas
Below you will find the schema for the both Contentful and Postgres. Feel free to customize this schema as needed this is only a suggestive representation of the most simple object possible. You will have to load data yourself.
Base table DML:
CREATE TABLE content_item
(
contenttitle character varying NULL,
contentbody character varying NULL,
externalId character varying NULL,
commonId character varying NULL,
contentfulId character varying NULL,
contentversion character varying NULL,
contentstatus character varying NULL,
contentlang character varying NULL
);
Sample data:
Please check the forum for the sample data file.
Contentful Model (You will have to build this manually in Contentful.)
Section Title (Short Text) (Localization Enabled)
Section Text (Long Text) (Localization Enabled)
External Id (Short Text) (Localization Enabled)
Common Id (Short Text)
Final Submission Guidelines
Submission Deliverables?, Environment Setup Instructions?, Final Submission Guidelines?
2. Provide a detailed document of your solution including installation, dependencies and operation
3. Provide a quick video of you solution in action, if you are not comfortable with spoken english feel free to annotate your video with text.