-
Notifications
You must be signed in to change notification settings - Fork 7
Ingest Script Documentation #215
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
base: main
Are you sure you want to change the base?
Ingest Script Documentation #215
Conversation
|
Please update to reflect the new load_db_from_json and read_db_from_file functions which are intended to replace load_astrodb. (update this branch with main to see the latest changes!) https://astrodb-utils.readthedocs.io/en/stable/pages/api.html#module-astrodb_utils.loaders |
| ra_col_name="ra", | ||
| dec_col_name="dec", | ||
| epoch_col_name="epoch", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These will not always be needed and are specific to SIMPLE. maybe add a note (https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-note) that includes these SIMPLE-specific arguments.
| ingest_source( | ||
| db, | ||
| source=source["NAME"], | ||
| reference=reference[1], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the reference variable is not defined in this example. Maybe change to source["reference"]?
| However, only few ingest functions exist, namely for sources, names, and instruments. | ||
| Therefore, if your data fits into one of these categories, it is recommended to use the existing functions. | ||
|
|
||
| Below is an example of how to use the `ingest_source` function to ingest source data into the database: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link directly to the API documentation for the ingest_source function.
:py:function:ingest_source
| with db.engine.connect() as conn: | ||
| conn.execute( | ||
| db.ModeledParameters.insert().values( | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make into a dictonary and then pass the dictionary to the insert method. Similar to https://astrodbkit.readthedocs.io/en/latest/#adding-data
No description provided.