Skip to content

Commit d6efdbf

Browse files
committed
Update docs within connect_to_table()
1 parent 6d8db95 commit d6efdbf

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

pointblank/validate.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2465,14 +2465,17 @@ def connect_to_table(connection_string: str) -> Any:
24652465
Supported Connection String Formats
24662466
-----------------------------------
24672467
The `connection_string` parameter must include a valid connection string with a table name
2468-
specified using the `::` syntax. For example:
2469-
2470-
- DuckDB: `"duckdb:///path/to/database.ddb::table_name"`
2471-
- SQLite: `"sqlite:///path/to/database.db::table_name"`
2472-
- PostgreSQL: `"postgresql://user:password@localhost:5432/database::table_name"`
2473-
- MySQL: `"mysql://user:password@localhost:3306/database::table_name"`
2474-
- BigQuery: `"bigquery://project/dataset::table_name"`
2475-
- Snowflake: `"snowflake://user:password@account/database/schema::table_name"`
2468+
specified using the `::` syntax. Here are some examples on how to format connection strings
2469+
for various backends:
2470+
2471+
```
2472+
DuckDB: `"duckdb:///path/to/database.ddb::table_name"`
2473+
SQLite: `"sqlite:///path/to/database.db::table_name"`
2474+
PostgreSQL: `"postgresql://user:password@localhost:5432/database::table_name"`
2475+
MySQL: `"mysql://user:password@localhost:3306/database::table_name"`
2476+
BigQuery: `"bigquery://project/dataset::table_name"`
2477+
Snowflake: `"snowflake://user:password@account/database/schema::table_name"`
2478+
```
24762479

24772480
If the connection string does not include a table name, the function will attempt to connect to
24782481
the database and list available tables, providing guidance on how to specify a table.

0 commit comments

Comments
 (0)