The script CreateTables.py will create the tables and ingest the agency data from the list in agencies.txt.
Usage: docker-compose exec sql-client python CreateTables.py
The script DropTables.py will drop the tables.
Usage: docker-compose exec sql-client python DropTables.py
The script ResetDatabase.py will drop and recreate the tables in one command.
Usage: docker-compose exec sql-client python ResetDatabase.py
The script IngestDocket.py will ingest a given Docket Id, its documents, and comments from the mirrulations S3 Bucket into the database.
Example Usage: docker-compose exec sql-client python IngestDocket.py DOS-2022-0004
The script IngestDockets.py will ingest multiple dockets from a file into the database.
dockets.txt:
DOS-2022-0004
FAR-2023-0010
Example Usage: docker-compose exec sql-client python IngestDocket.py dockets.txt
The script IngestFromBucket.py will ingest all the dockets from an S3 bucket
Example Usage: docker-compose exec sql-client python IngestFromBucket.py BucketName
The script IngestLocal.py will ingest all files in a folder.
Example Usage: docker-compose exec sql-client python IngestLocal.py dockets-data
- The scripts for Ingesting just comments, dockets, and documents are included for use in current and future scripts, but don't necessarily need to be ran directly in a development environment.
The script Query.py will query the database.
Example Usage: docker-compose exec sql-client python Query.py "SELECT * FROM dockets;
The script CheckAgencies.py will check the regulations.gov database through the API to see if there are any missing agencies in the agencies.txt and update the file if necessary.
Example usage: docker-compose exec sql-client python CheckAgencies.py
You can click here to view rate limits for the regulations.gov API usage.