Querying the database
Once you have some data loaded, you’re ready to use the database.
Launch pgAdmin
Go to localhost:8002 to access pgAdmin.
Username: sagerx
Password: sagerx
Write your first query
NOTE: Ensure you have run the FDA NDC Directory (
fda_ndc
) DAG to completion before writing this query. See Loading data with Airflow for more information.- In the left sidebar, click Servers → sagerx → Databases → sagerx → sagerx_dev
- In the top toolbar menu, click Tools → Query Tool
- Copy and paste the query below into the Query input pane
select
*
from sagerx_dev.stg_fda_ndc__ndcs
limit 100
- Click “Execute/Refresh” (▶️) or press F5 - your results will show up in the Data Output pane at the bottom of your screen
NOTE: You have to include the name of the schema (i.e. sagerx_dev or sagerx_lake) in front of the name of the table.
Looking for more examples of things you can do with SageRx?
← Previous