Hi everyone,
lately I am finding an issue that im not sure if its an expected behaviour, but its uncomfortable: while in development mode (before deploying to production) I set up the connection with the database, and define models and explores, and it works fine.
The issue is that, after I set up the connection with Git (in order to deploy to production) I lose all the lookml files, its empty now, as if it pulled from the git repository and, as it was empty, lookml was emptied too.
Is there a way, when you first connect to git, to push the LookML files in git, rather than pulling the empty git in looker? Since I find that I lose all the previous work and I need to recreate it again after the connection with git is done.
Thanks in advance,
best regards
Solved! Go to Solution.
I think I kind of understand what is happening and I was able to re-create the issue you have recorded in the video link.
Looker needs a repo to store the metadata, it either has to be a git repo or a bare repo. If you create the project and setup the bare repo shown below, the model will not get deleted. As we create a blank project and add a model file, it does not gets stored in any repo as there is no repo (The save button creates a impression of model getting saved, but its actually just getting saved at browser level) and that is why the model gets overwritten when we configure a git repo in the project. Actually, if there is some content in the git repo already then the model file will be overwritten by it and that content will start showing up.
And if you want your content to not get deleted, then you will have to setup a bare repo using below indicated link.
Hope this helps
~Ashish