Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend: Migrate data from Google spreadsheet #219

Open
laredotornado opened this issue Oct 19, 2022 · 4 comments
Open

Backend: Migrate data from Google spreadsheet #219

laredotornado opened this issue Oct 19, 2022 · 4 comments
Assignees
Labels

Comments

@laredotornado
Copy link
Collaborator

laredotornado commented Oct 19, 2022

In order to proceed with this ticket, this itcket, #215, will need to be addressed first.

In our Google spreadsheet, https://docs.google.com/spreadsheets/d/1ifpqYM0uV1S3YVPrce5gmvevJ7jc-cFmOk5jDS8Me7U/edit#gid=0, when generating the seed data script, we need to consolidate rows with the same ID into a single entry. This means that if there are multiple entries with the same ID, the "coopaddresstags" objects in the seed_data file shoudl have the same coop ID, e.g.

- model: directory.coopaddresstags
  pk: 976
  fields:
    is_public: True or False
    coop_id: 856
    address_id: 802
- model: directory.coopaddresstags
  pk: 977
  fields:
    is_public: True or False
    coop_id: 856
    address_id: 803

As a refresher, if you want to run the scripts, log in to the Docker web container (docker exec -it <CONTAINER_ID> bash) and run

python manage.py init_from_google_sheet > /tmp/output.csv
python manage.py parse_coop_csv /tmp/output.csv > /tmp/seed_data.yaml
python manage.py insert_seed_data /tmp/seed_data.yaml true
@stepsbystep
Copy link
Collaborator

I'm on it!

@maxgraziano
Copy link
Collaborator

@domdelorenzo @SteveEdiger with 3.1 moving away from spreadsheets, is this obsolete?

@domdelorenzo
Copy link
Collaborator

See: #215 (comment)

@maxgraziano
Copy link
Collaborator

This issue is in regards to the migration from the current Spreadsheet data model to the new 3.1-model-refactor data model.

@maxgraziano maxgraziano changed the title Backend: When importing data from Google spreadsheet, need to consolidate entries with the same ID Backend: Migrate data from Google spreadsheet Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: To do
Development

No branches or pull requests

4 participants