Skip to content

Instantly share code, notes, and snippets.

@signedav
Last active July 8, 2021 08:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save signedav/ac2098552221a8d0b26ab3a225924cbc to your computer and use it in GitHub Desktop.
Save signedav/ac2098552221a8d0b26ab3a225924cbc to your computer and use it in GitHub Desktop.
Qgis Model Baker Redesign 0.2

Workflow

0 There might be a start dialog

welcome

  • On first selection, we come to 1 Choose the file
  • On second selectoin, we come to Export Workflow
  • On third selection, we come to 2 Choose the database

1 Choose the files

First page on opening the wizard asks you to load the files and the models you want to import: selectfiles

  • Next page will be 2 Choose the database

2 Choose the database

If no file has been selected or on welcome screen the project creation is selected, the text is different: "You don't import anything. Select the existing database you want to generate your project from." If there are some imports, this dialog appears:

image

  • Next page will be on import the 3 Configure schema import

3 Configure schema import

Here the models are listed that needs to be created (depending on the selected files and models in 1 Choose the files and depending on what models already exist in case the selected database in 2 Choose the database already exists. schemaimport

  • we have one general advanced setting here
  • then we run the commands: it runs them one by one and when successful it continues, when not successful it stops, where you can choose if you want to disable constraints or edit the command.
  • Question: Should we run one ili2db command per model to have a better overview?

Next:

  • When there are datafiles selected in 2 Choose the database next page will be 4 Data import
  • When no datafiles are selected we go on wiht 5 Bake your project

4 Data import

dataimport Let's keep the baskets aside for a while, since it's the same with models and topics and can be added later.

What we need is an order to be able to import catalogues before the other stuff. 20210708_093104

The old mokup for that is, this where you can see how the dropdown in the third area should look like. image

  • In case no project is open next page will be 5 Bake your project

Questions here:

  • Do we need to consider the baskets and maybe even toppings?
  • How do I know if an xtf contains a catalogue or transfer data?

Deprecated Mockups

Valiation and fixing

Maybe there have been some dependencies detected. A dialog similar to the first one appears. But without additional ili2db settings (Advanced Options). When selected another file it checks it according the selected database. image

Datasets

If a data import has been chosen, it opens the Dataset dialog to choose in what existing dataset you want to import or you can create a new one with "+".

image

Export Workflow

1 Choose the database

You can choose the database or file you want to export from

image

2 Data export

I guess this should look similar like in the Import Workflow. And you can choose the datasets and the models to export - the model list is updated according the selection in the dataset list.

image

Use cases

Functions:

  • a. Create a dataschema without data
  • b. Import data
  • c. Generate a project

with these combinations:

  • a + c (results in projet without data)
  • b + c (with already existing schema without data)
  • a + b + c
  • b (with already existing schema and existing project)
  • c (with already existing schema with data)

we do always create a project if there is not yet one existing.

In other words:

  1. Having a Model (Repo or File) and creating the db schema and generating the project.
  2. Having an XTF and importing to an existing db schema and generating the project.
  3. Having an XTF and importing to an existing db schema and show on existing project.
  4. Having an XTF and importing to an non existing db schema and generating the project.
  5. Having an XTF and importing to an existing db schema and visualize in the current project.
  6. Having an existing db schema (with or without data) and generating a project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment