docs
docs copied to clipboard
[Feedback] Page: /quick-start/latest/node/
Is it easy to find the information you need?
None
Are the instructions clear?
No
How could we improve the Timescale documentation site?
I had some errors when I tried to follow the tutorial.
- Creating a relational database (Step 1)
The command
npx sequelize model:generate --name page_loads \
--attributes userAgent:string,time:date
The output ERROR: Unable to find models path (/workspaces/vipe-dane-cloud/incubator/hyper-tables/models). Did you run sequelize init?
The fix First run
npx sequelize init
- Creating a relational database (Step 5)
Missing code.
The fix
// Instantiate a PageLoads object
let pageLoad = PageLoads.build({
userAgent: "Mozilla/5.0",
time: new Date(),
createdAt: new Date(),
updatedAt: new Date(),
});
// Save the object to the database
pageLoad
.save()
.then(() => console.log("PageLoad has been saved successfully."))
.catch((err) => console.error("Unable to save to the database:", err));
Note createdAt and updatedAt fields.
- Creating a hypertable (Step 3)
The command
npx sequelize db:migrate
The output ERROR: cannot create a unique index without the column "time" (used in partitioning)
The fix The error is related to the fact that userAgent is a primary key along with time. Possible fixes are either create a unique index on both time and userAgent or make userAgent not a primary key or partition on both userAgent and time.
Thank you for the report. We welcome documentation contributions!
- For information about how to propose a change, see the contributing guide in our GitHub repository.
- For information on style and word usage, see the style guide