Learn how to leverage PyAirbyte and use Postgres as a Cache, while running in a Google Colab only. It installs packages on the system and requires sudo access.
Summarize with Perplexity
Download our free guide and discover the best approach for your needs, whether it's building your ELT solution in-house or opting for Airbyte Open Source or Airbyte Cloud.
Below is a pre-release demo of PyAirbyte, showcasing how to use Postgres as a Cache.
This notebook is designed to be run in a Google Colab only. It installs packages on the system and requires sudo access. If you want to run it in a local Jupyter notebook, please proceed with caution.
If you are not running this notebook on Google Colab, or you prefer to use an existing database, please skip the following setup and proceed to the next section.
To see what data sources are available, you can check our docs or run the following:
Create and install a source connector:
Installing 'source-faker' into virtual environment '/content/.venv-source-faker'.
Running 'pip install airbyte-source-faker'...
Connector 'source-faker' installed successfully!
For more information, see the source-faker documentation:
https://docs.airbyte.com/integrations/sources/faker#reference
Connection check succeeded for `source-faker`.
Define a PyAirbyte Cache from the existing PosgreSQL database.
Started reading at 22:27:43.
Read 100,100 records over 59 seconds (1,696.6 records / second).
Wrote 100,100 records over 13 batches.
Finished reading at 22:28:42.
Started finalizing streams at 22:28:42.
Finalized 13 batches over 8 seconds.
Completed 3 out of 3 streams:
Completed writing at 22:28:51. Total time elapsed: 1min 8s
Completed `source-faker` read operation at 22:28:51.
Since data is cached in the Postgres database, we can query the data with SQL.
We can do this in multiple ways. One way is to use the JupySQL Extension, which we'll use below.
['airbyte_raw.users', 'airbyte_raw.purchases']
Running query in 'postgresql+psycopg2://postgres:***@localhost:5432/pyairbyte_demo'
10 rows affected.
Download our free guide and discover the best approach for your needs, whether it's building your ELT solution in-house or opting for Airbyte Open Source or Airbyte Cloud.