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

Keep dependency in memory if loading into PostGIS #4

Open
kzollove opened this issue Sep 16, 2022 · 3 comments
Open

Keep dependency in memory if loading into PostGIS #4

kzollove opened this issue Sep 16, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@kzollove
Copy link
Collaborator

Currently, if a dependency for a variable (attr or geom) is not in the database, the importShapefile will go through a download-upload-import cycle.

The download is from the web-hosted data source into the R environment, where it is transformed into the standard format.

The standardized data is then uploaded to PostGIS.

Now that the dependency exists in PostGIS, the attr and geom are joined and together they are imported back into the R environment.

We should be able to skip the import step if we already have the dependency in memory. The snag here is attr and geom are joined in PG and then imported. There are three cases to address:

  1. neither dependency existed in the DB and was just downloaded into the R environment
  2. geom didn't exist, was just downloaded, and attr needs to be imported from DB
  3. attr didn't exist, was just downloaded, and geom needs to be imported from DB

This is an important issue and could help ease the memory strains and help with #8

@kzollove kzollove added the enhancement New feature or request label Sep 16, 2022
@kzollove
Copy link
Collaborator Author

Could be handled with boolean arguments in loadVariable and loadGeomTable: keepInEnvironment=TRUE

@rtmill
Copy link
Collaborator

rtmill commented Sep 23, 2022

Seems like this is more of a general problem of - indicating/checking for that a given data source is already loaded?

@kzollove
Copy link
Collaborator Author

kzollove commented Apr 20, 2023

The inefficiencies related to redownloading were addressed in a52acd0ea173d94153419a505bff9ccd354891c3, but that doesn't fix this issue.

@kzollove kzollove transferred this issue from OHDSI/GIS Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📃 Proposed
Development

No branches or pull requests

2 participants