Hi -
You may have already seen this, but there's a bunch of documentation on the cli tool here: https://pypi.org/project/instructure-dap-client/.
Now that you're able to list the tables using the cli, I'd suggest using the 'initdb' and 'syncdb' commands to load/update tables in your postgres database. These high-level commands take care of all of the details of running queries, downloading data files, assembling them into SQL scripts, and updating your database.
First, set the DAP_CONNECTION_STRING environment variable to your db connection string, something like:
export DAP_CONNECTION_STRING=postgresql://scott:password@localhost/testdb
Then run the initdb command for one of your tables to pull a full snapshot and load it into your database:
dap initdb --namespace canvas --table accounts
Now in your postgres database you should see two new tables: accounts and dap_meta. The dap_meta table is used by the cli to keep track of what tables have been fetched and when. You should see a record in the dap_meta table with the details for your accounts table.
Now that you have the initial snapshot of your accounts table stored locally, you can refresh it using the syncdb command:
dap syncdb --namespace canvas --table accounts
The cli tool will take care of running the incremental query, fetching the data files, and updating your database. You can run syncdb on whatever schedule you need (maybe hourly, or daily) to keep the data fresh.
You'll need to run the initdb/syncdb commands for each of the tables that you want to mirror locally.
Hopefully this helps you get started!
--Colin