You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The workaround is to ingest dates as ISO date strings, then change the column type:
{constdata=[{create_time: newDate()}];constclient=awaitDuckDBClient.of({// Ingest dates as ISO stringsmy_data: data.map(d=>({
...d,create_time: d.create_time.toISOString()}))});// Changes the column type from Utf8 to Date64awaitclient.sql`ALTER TABLE my_data ALTER COLUMN create_time SET DATA TYPE DATETIME`;// Should read "Date64<MILLISECOND>"constcolumnType=(awaitclient.query("SELECT create_time FROM my_data")).schema[0].databaseType;returnclient;}
I was hoping there was a way to query an array of objects without losing the time. Here's an example notebook.
The text was updated successfully, but these errors were encountered: