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

Allow field customisation when importing db tables #60940

Merged
merged 7 commits into from
Mar 12, 2025

Conversation

nyalldawson
Copy link
Collaborator

This expands the database table import dialog to add a new field mapping section, which gives users control over the
fields in the created table. Users can rename, set the exact destination field types, and tweak the source expression
for each output field. Fields can also be excluded from the import, or new fields created which don't exist in the source table.

image

Refs #24192
Refs #45286

Sponsored by City of Canning

Previously the widget would always just use a generic hardcoded
list of field types. This isn't appropriate for all destination
providers, which may not support certain field types.

Add API so that an explicit list of supported destination
field types can be set for the widget, restricting the choices
available to users for destination fields.
Implement fallback logic, so eg if the destination field types
don't support one of the input types exactly, we can still make
reasonable matches to a compatible field
Allows remapping fields from the source fields, including specifying
the exact output field type, and source expression
This expands the database table import dialog to add a new
field mapping section, which gives users control over the
fields in the created table. Users can rename, set the exact
destination field types, and tweak the source expression
for each output field. Fields can also be excluded from the
import, or new fields created which don't exist in the source
table.

Sponsored by City of Canning
@nyalldawson nyalldawson added Feature Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Mar 11, 2025
@qgis-bot
Copy link
Collaborator

@nyalldawson

This pull request has been tagged for the changelog.

  • The description will be harvested so please provide a "nearly-ready" text for the final changelog
  • If possible, add a nice illustration of the feature. Only the first one in the description will be harvested (GIF accepted as well)
  • If you can, it's better to give credits to your sponsor, see below for different formats.

You can edit the description.

Format available for credits
  • Funded by NAME
  • Funded by URL
  • Funded by NAME URL
  • Sponsored by NAME
  • Sponsored by URL
  • Sponsored by NAME URL

Thank you!

@qgis-bot
Copy link
Collaborator

@nyalldawson
This pull request has been tagged as requiring documentation.

A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged.

Please update the description (not the comments) with helpful description and screenshot to help the work from documentors.
Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can.

Thank you!

@github-actions github-actions bot added this to the 3.44.0 milestone Mar 11, 2025
Copy link

github-actions bot commented Mar 11, 2025

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit ae8bda5)

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit ae8bda5)

@nyalldawson nyalldawson merged commit 860da30 into qgis:master Mar 12, 2025
31 of 32 checks passed
@nyalldawson nyalldawson deleted the export_attr branch March 12, 2025 00:25
@qgis-bot
Copy link
Collaborator

@nyalldawson
A documentation ticket has been opened at qgis/QGIS-Documentation#9725
It is your responsibility to visit this ticket and add as much detail as possible for the documentation team to correctly document this change.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog Items that are queued to appear in the visual changelog - remove after harvesting Feature Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants