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.
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.
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.
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.
make into a dictonary and then pass the dictionary to the insert method. Similar to https://astrodbkit.readthedocs.io/en/latest/#adding-data
|
re-done in #232 |
No description provided.