mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 13:45:23 +02:00
feat: enable custom baseline periods for Experiments to solve seasonality
This commit is contained in:
@@ -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();
|
||||
Reference in New Issue
Block a user