Hey all, newbie here trying to create some models ...
# announcements
b
Hey all, newbie here trying to create some models for data in a postgres database. I'm having particular difficulty in setting up my model files so they make coherent SQL for postgres. I'm currently getting SQL like:
Copy code
SELECT "users"."id" "users.id" FROM "users" "users" GROUP BY "users.id" ORDER BY "users.id" ASC LIMIT 50;
when I try to get a simple view of IDs from a single table. Is there any documentation I've missed, or can anyone give me a pointer? I'm happy to post further code in a thread if that helps 🙂
d
Hey @ben_lomax, have you by chance looked at one of our model repos to view some real-life examples? Here are the current models for GitLab for example https://gitlab.com/meltano/model-gitlab
Also, is it fair to assume you've looked at the "Creating Custom Transforms and Models" documentation? https://www.meltano.com/tutorials/create-custom-transforms-and-models.html#creating-custom-transforms-and-models
b
Yeah, this second link is what I've been basing my queries on. I'll take a look at the top link. Thanks 👍
d
Sounds good keep us posted.
b
Thanks, will do 🙂