|
| 1 | +<?php |
| 2 | + |
| 3 | +return [ |
| 4 | + /* |
| 5 | + |-------------------------------------------------------------------------- |
| 6 | + | Export Disk |
| 7 | + |-------------------------------------------------------------------------- |
| 8 | + | The filesystem disk where Parquet files will be written. This uses |
| 9 | + | Laravel's Storage facade under the hood, so any disk configured in |
| 10 | + | config/filesystems.php is supported (e.g., "local", "s3"). |
| 11 | + | |
| 12 | + | .env: PARQUET_DISK=s3 |
| 13 | + */ |
| 14 | + 'disk' => env('PARQUET_DISK', env('FILESYSTEM_DISK', 'local')), |
| 15 | + |
| 16 | + /* |
| 17 | + |-------------------------------------------------------------------------- |
| 18 | + | Output Directory |
| 19 | + |-------------------------------------------------------------------------- |
| 20 | + | Directory path prefix inside the selected disk. The final path will be |
| 21 | + | {output_directory}/{table}-{timestamp}.parquet |
| 22 | + | |
| 23 | + | .env: PARQUET_OUTPUT_DIR=parquet-exports |
| 24 | + */ |
| 25 | + 'output_directory' => env('PARQUET_OUTPUT_DIR', 'parquet-exports'), |
| 26 | + |
| 27 | + /* |
| 28 | + |-------------------------------------------------------------------------- |
| 29 | + | Chunk Size |
| 30 | + |-------------------------------------------------------------------------- |
| 31 | + | Number of rows fetched per chunk when streaming data out of the database. |
| 32 | + | Larger chunks are faster but use more memory. |
| 33 | + | |
| 34 | + | .env: PARQUET_CHUNK_SIZE=1000 |
| 35 | + */ |
| 36 | + 'chunk_size' => (int) env('PARQUET_CHUNK_SIZE', 1000), |
| 37 | + |
| 38 | + /* |
| 39 | + |-------------------------------------------------------------------------- |
| 40 | + | Date/Time Formatting for Fallbacks |
| 41 | + |-------------------------------------------------------------------------- |
| 42 | + | When a database driver returns date/time types as strings or DateTime, |
| 43 | + | these formats are used for the Parquet logical annotations we emit. |
| 44 | + | You usually don't need to change these. |
| 45 | + */ |
| 46 | + 'date_format' => 'Y-m-d', |
| 47 | + 'datetime_format' => \DateTimeInterface::ATOM, |
| 48 | + 'time_format' => 'H:i:s', |
| 49 | + |
| 50 | + /* |
| 51 | + |-------------------------------------------------------------------------- |
| 52 | + | Schema Inference Strategy |
| 53 | + |-------------------------------------------------------------------------- |
| 54 | + | "database" will use the database column types from the schema to choose |
| 55 | + | Parquet primitive/logical types. "sample" will inspect the first chunk |
| 56 | + | of data to refine types (e.g., booleans stored as tinyint(1)). |
| 57 | + | Options: database | sample | hybrid |
| 58 | + */ |
| 59 | + 'inference' => env('PARQUET_INFERENCE', 'hybrid'), |
| 60 | + |
| 61 | + /* |
| 62 | + |-------------------------------------------------------------------------- |
| 63 | + | Compression |
| 64 | + |-------------------------------------------------------------------------- |
| 65 | + | Compression codec for Parquet files. When using the PyArrow backend you |
| 66 | + | may choose from: NONE (alias UNCOMPRESSED), SNAPPY, GZIP, ZSTD, BROTLI, |
| 67 | + | LZ4_RAW. Default is UNCOMPRESSED. |
| 68 | + */ |
| 69 | + 'compression' => env('PARQUET_COMPRESSION', 'UNCOMPRESSED'), |
| 70 | + |
| 71 | + /* |
| 72 | + |-------------------------------------------------------------------------- |
| 73 | + | Writer Backend |
| 74 | + |-------------------------------------------------------------------------- |
| 75 | + | Controls how ParqBridge produces Apache Parquet files. |
| 76 | + | - pyarrow: Uses Python + PyArrow (requires `python3` with `pyarrow` installed) |
| 77 | + | - custom: Uses a custom shell command template provided below |
| 78 | + | |
| 79 | + | .env: PARQBRIDGE_WRITER=pyarrow |
| 80 | + */ |
| 81 | + 'writer' => env('PARQBRIDGE_WRITER', 'pyarrow'), |
| 82 | + |
| 83 | + /* |
| 84 | + | Python executable name/path for the PyArrow backend. E.g., python3 or /usr/bin/python3 |
| 85 | + | .env: PARQBRIDGE_PYTHON=python3 |
| 86 | + */ |
| 87 | + 'pyarrow_python' => env('PARQBRIDGE_PYTHON', 'python3'), |
| 88 | + |
| 89 | + /* |
| 90 | + | Custom command template when writer=custom. Use {input} and {output} placeholders. |
| 91 | + | Example (DuckDB CLI): duckdb -c "COPY (SELECT * FROM read_csv_auto({input})) TO {output} (FORMAT PARQUET)" |
| 92 | + | .env: PARQBRIDGE_CUSTOM_CMD="duckdb -c \"COPY (SELECT * FROM read_csv_auto({input})) TO {output} (FORMAT PARQUET)\"" |
| 93 | + */ |
| 94 | + 'custom_command' => env('PARQBRIDGE_CUSTOM_CMD', ''), |
| 95 | +]; |
0 commit comments