SQL queries from Git repository

Hello everyone,

Just recently we switched to Datalore and currently have a problem with the Git connection. We have a repository in which there are many *.sql files, each with a single query.
We want to use these queries in various reports. However, if we clone the repository into the workspace files, the (interactive) reports do not have access to these files.
We have already started to work on the following approaches, but have got stuck at various points and would appreciate support or best practices.

Approaches:

  • a scheduled notebook copies all SQL files from the workspace files to all notebook files of the corresponding workspace
    – Is it possible to move files e.g., from notebook 1 to the workspace files of notebook 2?
  • a scheduled notebook copies all SQL files from the workspace files into the environment variables (file name = key, query = value)
    – (how) is it possible to edit environment variables from a notebook?

Can anyone help us with the solution or have other approaches how we could integrate the repository?