Skip to content

Commit

Permalink
ci: Write to file instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
jheer committed Feb 19, 2024
1 parent f49b20a commit fff63a0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/data/nyc-taxi.parquet.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# The DuckDB executable must be on your environment path!
# Use DuckDB version 0.9.2 or later
# Write to a named file as portable file descriptors such as
# (/dev/stdout) appear to be unavailable in GitHub actions.
duckdb :memory: << EOF
-- Load spatial extension
INSTALL spatial; LOAD spatial;
Expand All @@ -16,6 +18,11 @@ COPY (SELECT
(HOUR(datetime) + MINUTE(datetime)/60) AS time,
ST_X(pick)::INTEGER AS px, ST_Y(pick)::INTEGER AS py,
ST_X(drop)::INTEGER AS dx, ST_Y(drop)::INTEGER AS dy
FROM rides) TO '/proc/$$/fd/1' WITH (FORMAT PARQUET);
FROM rides) TO 'trips.parquet' WITH (FORMAT PARQUET);
EOF
exit 0

# Write output to stdout
cat trips.parquet >&1

# Clean up
rm trips.parquet

0 comments on commit fff63a0

Please sign in to comment.