Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions tutorials/zenodo_isamples_analysis.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,16 @@ db = {

if (working_parquet_url) {
try {
// Try to create view of the remote parquet file
await conn.query(`CREATE VIEW isamples_data AS SELECT * FROM read_parquet('${working_parquet_url}')`);

// Create view with aliased column names to match downstream queries.
// The Jan 2026 wide parquet uses different names than the original schema.
await conn.query(`CREATE VIEW isamples_data AS SELECT *,
latitude AS sample_location_latitude,
longitude AS sample_location_longitude,
n AS source_collection,
pid AS sample_identifier,
CAST(NULL AS VARCHAR) AS has_material_category
FROM read_parquet('${working_parquet_url}')`);

// Test the connection with a simple query to catch rate limiting
await conn.query(`SELECT count(*) FROM isamples_data LIMIT 1`);
console.log("✅ Successfully connected to remote Parquet file");
Expand Down
Loading