new action: countLinesWithAt (both txt/csv & parquet) (#5)

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2025-09-24 21:12:31 +02:00
parent 7ee82425c2
commit ba5ef5c0f3
4 changed files with 95 additions and 3 deletions

View File

@@ -7,8 +7,8 @@ import (
"strings"
)
// getColumns retrieves the column names from the Parquet file.
func getColumns(db *sql.DB, filepath string) ([]string, error) {
// GetColumns retrieves the column names from the Parquet file.
func GetColumns(db *sql.DB, filepath string) ([]string, error) {
// Create a view from the parquet file
query := fmt.Sprintf("CREATE OR REPLACE VIEW parquet_view AS SELECT * FROM read_parquet('%s')", filepath)
_, err := db.Exec(query)