ユニバーサル URI インターフェイス
uri() メソッドは、ソースの種類を自動検出する推奨の汎用エントリポイントです。
URI 構文リファレンス
| ソースタイプ | URI 形式 | 例 |
|---|---|---|
| ローカルファイル | path/to/file | data.csv, /abs/path/data.parquet |
| S3 | s3://bucket/path | s3://mybucket/data.parquet?nosign=true |
| GCS | gs://bucket/path | gs://mybucket/data.csv |
| Azure | az://container/path | az://mycontainer/data.parquet |
| HTTP/HTTPS | https://url | https://example.com/data.csv |
| MySQL | mysql://user:pass@host:port/db/table | mysql://root:pass@localhost:3306/mydb/users |
| PostgreSQL | postgresql://user:pass@host:port/db/table | postgresql://postgres:pass@localhost:5432/mydb/users |
| SQLite | sqlite:///path?table=name | sqlite:///data.db?table=users |
| ClickHouse | clickhouse://host:port/db/table | clickhouse://localhost:9000/default/hits |
File SOURCES
from_file
| パラメータ | 型 | デフォルト | 説明 |
|---|---|---|---|
path | str | required | ファイルのパス (ローカルまたは URL) |
format | str | None | ファイルフォーマット (None の場合は自動検出) |
compression | str | None | 圧縮方式 (None の場合は自動検出) |
Pandas互換の読み込み関数
Cloud ストレージ
from_s3
| パラメータ | 型 | デフォルト | 説明 |
|---|---|---|---|
url | str | 必須 | S3 URL (s3://bucket/path) |
access_key_id | str | None | AWSアクセスキー ID |
secret_access_key | str | None | AWSシークレットアクセスキー |
format | str | None | ファイルフォーマット (自動検出) |
from_gcs
from_azure
from_hdfs
from_url
データベース
from_mysql
| パラメータ | 型 | デフォルト | 説明 |
|---|---|---|---|
host | str | 必須 | MySQL ホスト |
database | str | 必須 | データベース名 |
table | str | 必須 | テーブル名 |
user | str | 必須 | ユーザー名 |
password | str | 必須 | パスワード |
port | int | 3306 | ポート番号 |
from_postgresql
from_clickhouse
from_mongodb
from_sqlite
データレイク
from_iceberg
from_delta
from_hudi
インメモリSOURCES
from_df / from_dataframe
DataFrame コンストラクタ
特殊なSOURCES
from_numbers
from_random
run_sql
サマリー表
| Method | ソースの種類 | 例 |
|---|---|---|
uri() | 汎用 | DataStore.uri("s3://bucket/data.parquet") |
from_file() | ローカル/リモートファイル | DataStore.from_file("data.csv") |
read_csv() | CSVファイル | pd.read_csv("data.csv") |
read_parquet() | Parquetファイル | pd.read_parquet("data.parquet") |
from_s3() | Amazon S3 | DataStore.from_s3("s3://bucket/path") |
from_gcs() | Google Cloud ストレージ | DataStore.from_gcs("gs://bucket/path") |
from_azure() | Azure Blob | DataStore.from_azure("az://container/path") |
from_hdfs() | HDFS | DataStore.from_hdfs("hdfs://host/path") |
from_url() | HTTP/HTTPS | DataStore.from_url("https://example.com/data.csv") |
from_mysql() | MySQL | DataStore.from_mysql(host, db, table, user, pass) |
from_postgresql() | PostgreSQL | DataStore.from_postgresql(host, db, table, user, pass) |
from_clickhouse() | ClickHouse | DataStore.from_clickhouse(host, db, table) |
from_mongodb() | MongoDB | DataStore.from_mongodb(uri, db, collection) |
from_sqlite() | SQLite | DataStore.from_sqlite("data.db", table) |
from_iceberg() | Apache Iceberg | DataStore.from_iceberg("/path/to/table") |
from_delta() | Delta Lake | DataStore.from_delta("/path/to/table") |
from_hudi() | Apache Hudi | DataStore.from_hudi("/path/to/table") |
from_df() | pandas DataFrame | DataStore.from_df(pandas_df) |
DataFrame() | Dictionary/DataFrame | pd.DataFrame({'a': [1, 2, 3]}) |
from_numbers() | 連続した数値 | DataStore.from_numbers(1000000) |
from_random() | ランダムデータ | DataStore.from_random(rows=1000, columns=5) |
run_sql() | Raw SQL | DataStore.run_sql("SELECT * FROM ...") |