File tree Expand file tree Collapse file tree 5 files changed +86
-7
lines changed
Expand file tree Collapse file tree 5 files changed +86
-7
lines changed Original file line number Diff line number Diff line change 11# Copyright (c) 2024 Airbyte, Inc., all rights reserved.
2- """A BigQuery implementation of the cache."""
2+ """A BigQuery implementation of the cache.
3+
4+ ## Usage Example
5+
6+ ```python
7+ import airbyte as ab
8+ from airbyte.caches import BigQueryCache
9+
10+ cache = BigQueryCache(
11+ project_name="myproject",
12+ dataset_name="mydataset",
13+ credentials_path="path/to/credentials.json",
14+ )
15+ ```
16+ """
317
418from __future__ import annotations
519
@@ -17,8 +31,13 @@ class BigQueryCache(CacheBase):
1731 """The BigQuery cache implementation."""
1832
1933 project_name : str
34+ """The name of the project to use. In BigQuery, this is equivalent to the database name."""
35+
2036 dataset_name : str = "airbyte_raw"
37+ """The name of the dataset to use. In BigQuery, this is equivalent to the schema name."""
38+
2139 credentials_path : str
40+ """The path to the credentials file to use."""
2241
2342 _sql_processor_class : type [BigQuerySqlProcessor ] = BigQuerySqlProcessor
2443
Original file line number Diff line number Diff line change 11# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
2- """A DuckDB implementation of the cache."""
2+ """A DuckDB implementation of the PyAirbyte cache.
3+
4+ ## Usage Example
5+
6+ ```python
7+ from airbyte as ab
8+ from airbyte.caches import DuckDBCache
9+
10+ cache = DuckDBCache(
11+ db_path="/path/to/my/database.duckdb",
12+ schema_name="myschema",
13+ )
14+ """
315
416from __future__ import annotations
517
@@ -27,8 +39,8 @@ class DuckDBCache(CacheBase):
2739 db_path : Union [Path , str ]
2840 """Normally db_path is a Path object.
2941
30- There are some cases, such as when connecting to MotherDuck, where it could be a string that
31- is not also a path, such as "md:" to connect the user's default MotherDuck DB .
42+ The database name will be inferred from the file name. For example, given a `db_path` of
43+ `/ path/to/my/my_db.duckdb`, the database name is `my_db` .
3244 """
3345
3446 schema_name : str = "main"
Original file line number Diff line number Diff line change 1- """A cache implementation for the MotherDuck service, built on DuckDB."""
1+ """A MotherDuck implementation of the PyAirbyte cache, built on DuckDB.
2+
3+ ## Usage Example
4+
5+ ```python
6+ from airbyte as ab
7+ from airbyte.caches import MotherDuckCache
8+
9+ cache = MotherDuckCache(
10+ database="mydatabase",
11+ schema_name="myschema",
12+ api_key=ab.get_secret("MOTHERDUCK_API_KEY"),
13+ )
14+ """
15+
216from __future__ import annotations
317
418from overrides import overrides
Original file line number Diff line number Diff line change 11# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
2- """A Postgres implementation of the cache."""
2+ """A Postgres implementation of the PyAirbyte cache.
3+
4+ ## Usage Example
5+
6+ ```python
7+ from airbyte as ab
8+ from airbyte.caches import PostgresCache
9+
10+ cache = PostgresCache(
11+ host="myhost",
12+ port=5432,
13+ username="myusername",
14+ password=ab.get_secret("POSTGRES_PASSWORD"),
15+ database="mydatabase",
16+ )
17+ ```
18+ """
319
420from __future__ import annotations
521
Original file line number Diff line number Diff line change 11# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
2- """A Snowflake implementation of the cache."""
2+ """A Snowflake implementation of the PyAirbyte cache.
3+
4+ ## Usage Example
5+
6+ ```python
7+ from airbyte as ab
8+ from airbyte.caches import SnowflakeCache
9+
10+ cache = SnowflakeCache(
11+ account="myaccount",
12+ username="myusername",
13+ password=ab.get_secret("SNOWFLAKE_PASSWORD"),
14+ warehouse="mywarehouse",
15+ database="mydatabase",
16+ role="myrole",
17+ schema_name="myschema",
18+ )
19+ ```
20+ """
321
422from __future__ import annotations
523
You can’t perform that action at this time.
0 commit comments