feat: enable custom baseline periods for Experiments to solve seasonality

This commit is contained in:
Christian Vidal Wolf
2026-02-23 18:34:04 +01:00
parent 69f4456942
commit 4935112a55
14 changed files with 428 additions and 1144 deletions
+22
View File
@@ -0,0 +1,22 @@
import { createClient } from '@supabase/supabase-js';
import dotenv from 'dotenv';
dotenv.config({ path: '.env.local' });
const supabase = createClient(
process.env.SUPABASE_URL || '',
process.env.SUPABASE_SERVICE_KEY || process.env.SUPABASE_ANON_KEY || ''
);
async function testFetch() {
const { data: exps, error: err1 } = await supabase.from('experiments').select('*').limit(10);
if (err1 || !exps?.length) {
console.log('No experiments found or error:', err1);
return;
}
for (const exp of exps) {
console.log(`[${exp.id}] Name: ${exp.name} | Start: ${exp.start_date} | ASINs: ${JSON.stringify(exp.asins)}`);
}
}
testFetch();