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

Migrate datastore-next-library code to this repo #9

Closed
7 of 9 tasks
hannelita opened this issue Jun 9, 2020 · 6 comments
Closed
7 of 9 tasks

Migrate datastore-next-library code to this repo #9

hannelita opened this issue Jun 9, 2020 · 6 comments

Comments

@hannelita
Copy link
Contributor

hannelita commented Jun 9, 2020

Acceptance

  • previous datahub-next-loader code into lib/ folder
  • DAG file invoking loader
  • Mocks Moved to Mocks for library #15

Tasks

Analysis

Questions

  • On load_csv_to_postgres_via_copy, we'll probably need a refactor, since it returns a generic error
except Exception as e:
                    return {
                        'success': False,
                        'message': 'Error during deleting index: {}'.format(e)
                    }
  • The original library uses .env vars. Here I'm switching to airflow vars. Pros: Easy to manage everything in airflow UI; cons: code will be tied to airflow; there is a simple way to refactor it and make it entirely agnostic \cc @rufuspollock
@rufuspollock
Copy link
Member

The original library uses .env vars. Here I'm switching to airflow vars. Pros: Easy to manage everything in airflow UI; cons: code will be tied to airflow; there is a simple way to refactor it and make it entirely agnostic \cc @rufuspollock

Sounds good.

@hannelita
Copy link
Contributor Author

Questions: To run https://github.com/datopian/aircan/blob/master/lib/load.py#L155, a postgres connection is required. I am assuming, for a local ckan instance, it will be postgresql:///localhost/datastore_test, or postgresql:///ckan:ckan@localhost/datastore_test; not working. Do I need to perform any setup in my local isntance?

Tried: demo.ckan; I found it easier to understand the flow locally.

@rufuspollock
Copy link
Member

@hannelita the postgres link will be set in the ini file of the local ckan setup i.e. check the docker file config or ckan ini for that info.

@hannelita
Copy link
Contributor Author

hannelita commented Jun 11, 2020

Remarks:

@rufuspollock rufuspollock changed the title Migrate datahub-next-library code to this repo Migrate datastore-next-library code to this repo Jun 12, 2020
@rufuspollock
Copy link
Member

@hannelita there is no way to do direct to DB load on demo.ckan.org (that won't be possible).

@rufuspollock
Copy link
Member

FIXED. All done - see description and moved mocks to #15

@hannelita hannelita mentioned this issue Aug 10, 2020
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants