Skip to content

Polis data export #2

@youchenlee

Description

@youchenlee
  1. mount a new volume to the math container for data exporting.
# docker-compose.yml
  math:
    volumes:
      - ./math/exports:/app/exports
  1. rebuild (only once)
make PROD start-rebuild
  1. do the export
docker compose -f docker-compose.yml  run math clojure -M:run export --include-xid -Z <conversation id> -f exports/<filename>.zip

Note: available options

Subcommand options: update-all update poller tasks full simulator export

Other options:
  -z, --zid ZID                  ZID on which to do an export
  -Z, --zinvite ZINVITE          ZINVITE code on which to perform an export
  -X, --include-xid              Include user xids in output
  -u, --user-id USER_ID          Export all conversations associated with USER_ID, and place in zip file
  -f, --filename FILENAME        filename
  -t, --at-time AT_TIME          A string of YYYY-MM-DD-HH-MM-SS (in UTC) or ms-timestamp since epoch
  -T, --at-times AT_TIMES        A vector of strings of --at-time format
  -F, --format FORMAT      :csv  Either csv, excel or (soon) json
  -M, --update-math              Update math
  -P, --update-postgres          Update postgres
  -h, --help                     Print help and exit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions