Skip to content

Commit

Permalink
Fix named anchor 4/N #260
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjones-plip committed Jul 31, 2020
1 parent b58283b commit c769ca5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If the instance is too large to replicate locally (or you are too impatient), yo
1. Open Firefox and navigate to `about:config`. Set `security.csp.enable` to `false` to disable Content Security Policies.
1. Navigate to the instance and login as the user with the data you want. _(If you want more data, like an entire district, you could consider logging in as a new user with a contact document at your desired place in the contact hierarchy. But that is an exercise for the reader)_
1. Wait for the data to replicate. You know this is done once the app lets you interact with it. _(If you want to get the user's data before purging, consider disabling purging. Another exercise for the reader)_
1. Make sure your local CouchDB has CORS enabled: http://docs.couchdb.org/en/2.1.1/config/http.html?highlight=CORs. Consider using [add-cors-to-couchdb](https://github.com/pouchdb/add-cors-to-couchdb#what-it-does) or its recommended settings.
1. Make sure your local CouchDB has CORS enabled: http://docs.couchdb.org/en/2.1.1/config/http.html?highlight=CORs. Consider using [add-cors-to-couchdb](https://github.com/pouchdb/add-cors-to-couchdb#user-content-what-it-does) or its recommended settings.
1. Allow your CouchDB to be accessible via `https`. One way is to run `ngrok http 5984` to make your CouchDB accessible via a url like `https://abcd1234.ngrok.io`.
1. Open the console in Firefox and run `await PouchDB.replicate('medic-user-XXX', 'https://your:[email protected]/YYY');`. Here `XXX` is the name you logged in as, and `YYY` is the name of a database in which to store the data.
* **Note**: If you get 401s make sure that: your CouchDB credentials are right; and you don't have a local session in the same browser already (session cookies can take precedence over basic auth); and if you're running CouchDB in Docker you have exposed both `5984` and `5986` to localhost.
Expand Down
4 changes: 2 additions & 2 deletions content/en/apps/reference/app-settings/outbound.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Header auth example:

A complex property that declares how the payload to be sent to the `destination` should be created.

Each key is a string [object path](https://github.com/mariocasciaro/object-path#usage) to a location in the payload, and each value is either:
Each key is a string [object path](https://github.com/mariocasciaro/object-path#user-content-usage) to a location in the payload, and each value is either:
- a string object path to the location of the source data in the report being processed, where the value is required to exist
- an object with either a `path` property that represents a string object path as above, or an `expr` property which is an expression similar to `relevant_to` to determine the resulting value. If you wish for the value to be optional (that is to say it's OK if `path` or `expr` evaluate to `undefined`) you may also set `optional` to `true`

Expand Down Expand Up @@ -259,4 +259,4 @@ Outbound may send your request multiple times even if the user just hit save onc

## Inbound?

The outbound feature is used for sending data to an external service. If you are looking to **receive** data from an external service, take a look at [the records api](https://github.com/medic/medic/tree/master/api#post-apiv2records).
The outbound feature is used for sending data to an external service. If you are looking to **receive** data from an external service, take a look at [the records api]({{< relref "apps/reference/api#records" >}}).
2 changes: 1 addition & 1 deletion content/en/core/guides/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: >

## medic-conf

Follow the [instructions in the readme](https://github.com/medic/medic-conf/#releasing).
Follow the [instructions in the readme](https://github.com/medic/medic-conf/#user-content-releasing).

## Android apps

Expand Down
2 changes: 1 addition & 1 deletion content/en/core/overview/data-flows-for-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Ultimately all the data ends up in a CouchDB instance deployed in the cloud whet

#### 2. Data Transformation

We use [couch2pg](https://github.com/medic/medic-couch2pg) to move data from CouchDB to a relational database, PostgreSQL in this case. The choice of PostgreSQL for analytics dashboard data sources is to allow use of the more familiar SQL querying. It is an open source tool that can be [easily deployed](https://github.com/medic/medic-couch2pg#installation-steps-if-applicable). When deployed the service uses [CouchDB's changes feed](https://docs.couchdb.org/en/stable/api/database/changes.html) which allows capturing of everything happening in CouchDB in incremental updates. It is run and monitored by the operating system where it is configured to fetch data at a configurable interval.
We use [couch2pg](https://github.com/medic/medic-couch2pg) to move data from CouchDB to a relational database, PostgreSQL in this case. The choice of PostgreSQL for analytics dashboard data sources is to allow use of the more familiar SQL querying. It is an open source tool that can be [easily deployed](https://github.com/medic/medic-couch2pg#user-content-installation-steps-if-applicable). When deployed the service uses [CouchDB's changes feed](https://docs.couchdb.org/en/stable/api/database/changes.html) which allows capturing of everything happening in CouchDB in incremental updates. It is run and monitored by the operating system where it is configured to fetch data at a configurable interval.

Data copied over to PostgreSQL is first stored as raw json (document) making use of PostgreSQL's jsonb data type to create an exact replica of a CouchDB database. From this, default views are created at deployment of the service and refreshed during every subsequent run. Additional custom materialized views created later are also refreshed at this time.

Expand Down

0 comments on commit c769ca5

Please sign in to comment.