Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feedback] Page: /quick-start/latest/node/ #3067

Open
A09L opened this issue Mar 12, 2024 · 1 comment
Open

[Feedback] Page: /quick-start/latest/node/ #3067

A09L opened this issue Mar 12, 2024 · 1 comment
Assignees
Labels
community Raised by a community member documentation Improvements or additions to documentation feedback Submissions from the docs site feedback form

Comments

@A09L
Copy link

A09L commented Mar 12, 2024

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.

Hypertables and unique indexes

@A09L A09L added community Raised by a community member documentation Improvements or additions to documentation feedback Submissions from the docs site feedback form labels Mar 12, 2024
Copy link

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

@billy-the-fish billy-the-fish self-assigned this Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Raised by a community member documentation Improvements or additions to documentation feedback Submissions from the docs site feedback form
Projects
None yet
Development

No branches or pull requests

2 participants