### Install Pre-commit Hook Source: https://github.com/alexlike/parquetkit/blob/main/README.md Command to install the pre-commit hook to ensure code formatting and binary synchronization before committing. ```bash ln -sf ../../scripts/pre-commit .git/hooks/pre-commit ``` -------------------------------- ### Project Development Scripts Source: https://github.com/alexlike/parquetkit/blob/main/README.md Shell scripts for managing project formatting, testing, documentation, and Rust driver builds. ```bash # General Tools # 1 Auto-format Swift and Rust sources ./scripts/auto-format # 2 Run Swift and Rust tests ./scripts/run-tests # 3 Build and preview DocC documentation in your browser ./scripts/preview-docs # When modifying the Rust Driver # 4 Build the Rust driver and generate the xcframework + Swift bindings ./scripts/build-xcframework # 5 Tell Swift to use the fresh local xcframework instead of the old and prebuilt one ./scripts/use-local-binary # 6 Check whether the Swift bindings are up-to-date ./scripts/check-bindings-sync ``` -------------------------------- ### Configure ParquetKit in Package.swift Source: https://github.com/alexlike/parquetkit/blob/main/README.md Add ParquetKit as a dependency to your Swift package manifest to enable integration. ```swift dependencies: [ .package(url: "https://github.com/alexlike/ParquetKit", from: "1.0.0"), ], targets: [ .target(name: "MyTarget", dependencies: ["ParquetKit"]), ] ``` -------------------------------- ### Define and process Parquet data with Swift Source: https://github.com/alexlike/parquetkit/blob/main/README.md Annotate a Codable struct with @Parquet to define the schema, then use ParquetWriter to save data and ParquetReader to iterate through records. ```swift @Parquet struct SensorReading: Codable { var stationCode: String var isActive: Bool var temperatureCelsius: Double var errorCode: Int32? @ParquetTimestamp(unit: .microseconds, isAdjustedToUTC: true) var recordedAt: ParquetTimestamp @ParquetColumn(compression: .zstd(level: 3), enableDictionary: true) var region: String } // Write let writer = try ParquetWriter(url: fileURL) try writer.write(SensorReading( stationCode: "NUUK-01", isActive: true, temperatureCelsius: -12.5, errorCode: nil, recordedAt: .init(date: Date(), unit: .microseconds, isAdjustedToUTC: true), region: "Greenland" )) try writer.close() // Read for try await reading in try ParquetReader(url: fileURL) { print(reading.stationCode, reading.temperatureCelsius) } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.