Questions tagged [mapping]

Corresponding every element of a given set to a unique element of another set or it may refer to a process of creating data element mappings between two distinct data models (objects)

In this context, mapping refers to the process of creating data element mappings between two distinct data models (objects).

When it refers to mapping in data integration, it is a set of source and target definitions linked by the transformation objects that define the rules for data transformation. Mappings represent the data flow between sources and targets.

Data mapping is typically used as a first step for a wide variety of data integration tasks such as:

  1. Data transformation or data mediation between a data source and a destination

  2. Identification of data relationships as part of data lineage analysis

  3. Replication of data between two entities with different key-value assignments

  4. Discovery of hidden sensitive data such as the last four digits social security number hidden in another user id as part of a data masking or de-identification project

  5. Consolidation of multiple databases into a single data base and identifying redundant columns of data for consolidation or elimination.

9739 questions
17
votes
2 answers

Finding the lat-long of the corners in a Google Maps window

Using the Google Maps API, how can I get the latitude and longitude of the corners of the map display area? That is, if my map is 300px wide and 400px tall, how can I find the lat-long of the points at (0,0) and (300,400)?
Matt Hampel
  • 5,088
  • 12
  • 52
  • 78
16
votes
2 answers

Dozer String to enum mapping

I have such enum: public enum PartnershipIndicator { VENDOR("VENDOR"), COPARTNER("COPARTNER"), BUYER("BUYER"); String code; private PartnershipIndicator(String code) { this.code = code; } public String getCode() { …
madhead
  • 31,729
  • 16
  • 153
  • 201
16
votes
12 answers

MapStruct - Cannot find implementation

Using latest Springboot and MapStruct versions and building with Maven, I am trying to implement the "Start Here" example given in the official MapStruct site My code is even…
ElPiter
  • 4,046
  • 9
  • 51
  • 80
16
votes
1 answer

Mapping checkboxes inside checkboxes ReactJS

I have a function which triggers children checkboxes once main checkbox is checked, and all these checkboxes are mapped from JSON. The main checkboxes (Highest level) and all of its children checkboxes (2nd level) under them are shown on click and…
Laflm
  • 187
  • 1
  • 8
16
votes
2 answers

Proper way of using and testing generated mapper

Recently we encountered some conflict during the development of our system. We discovered, that we have 3 different approaches to testing in our team, and we need to decide which one is best and check if there is nothing better than this. First,…
ŁukaszG
  • 596
  • 1
  • 3
  • 16
16
votes
2 answers

How can I map properties conditionally with MapStruct 1.2?

Is it possible with MapStruct 1.2 to map a source property with a specific value to a specific different value in the target? I think about something like this: public abstract class JiraKpmMapper { @Mappings({ @Mapping(source =…
du-it
  • 2,561
  • 8
  • 42
  • 80
16
votes
4 answers

Intermediate variable in a list comprehension for simultaneous filtering and transformation

I have a list of vectors (in Python) that I want to normalize, while at the same time removing the vectors that originally had small norms. The input list is, e.g. a = [(1,1),(1,2),(2,2),(3,4)] And I need the output to be (x*n, y*n) with n =…
dividebyzero
  • 2,190
  • 1
  • 21
  • 33
16
votes
1 answer

Map multiple source fields to same type target fields with Mapstruct

Consider the following POJOs: public class SchedulePayload { public String name; public String scheduler; public PeriodPayload notificationPeriod; public PeriodPayload schedulePeriod; } private class Lecture { public…
giannoug
  • 643
  • 3
  • 8
  • 20
16
votes
1 answer

How to create a two way mapping between an input space and a higher dimensional sparse constrained space?

I think this problem can be solved with ML because there are some properties of the output space that I want to achieve. Problem: D1 <-> D2 where D1 is input space and D2 is a space such that: D2 will have more dimensionality (by orders of…
user2180519
16
votes
3 answers

Custom Mapping with AutoMapper

I have two very simple objects: public class CategoryDto { public string Id { get; set; } public string MyValueProperty { get; set; } } public class Category { public string Id { get; set; } [MapTo("MyValueProperty")] public…
Bidou
  • 7,378
  • 9
  • 47
  • 70
16
votes
5 answers

Perl map - need to map an array into a hash as arrayelement->array_index

I have a array like this: my @arr = ("Field3","Field1","Field2","Field5","Field4"); Now i use map like below , where /DOSOMETHING/ is the answer am seeking. my %hash = map {$_ => **/DOSOMETHING/** } @arr Now I require the hash to look like…
Gopal SA
  • 949
  • 2
  • 17
  • 36
16
votes
5 answers

DTO and mapper generation from Domain Objects

I have plenty of java domain objects that I need to transform to DTOs. Please, don't start with the anti-pattern thing, the Domain Objects are what they are because of a long history, and I can't modify them (or not too much, see below). So, of…
Nicolas C
  • 944
  • 1
  • 10
  • 22
16
votes
3 answers

How to map a single char column in Doctrine 2

How can I map a single char column in Doctrine 2, using annotations? I would like to have a char type, instead a single char string.
Guillermo Gutiérrez
  • 17,273
  • 17
  • 89
  • 116
16
votes
2 answers

Hibernate enum mapping

I need to map the enums which didn't implement the interface beforehand to the existing database, which stores enums in the same table as the owner class using the @Enumerated(EnumType.STRING). class A { HasName name; } interface HasName { …
dm3
  • 2,038
  • 2
  • 17
  • 20
15
votes
6 answers

Hibernate error: cannot resolve table

I'm trying to make work the example from hibernate reference. I've got simple table Pupil with id, name and age fields. I've created correct (as I think) java-class for it according to all java-beans rules. I've created configuration file -…
Roman
  • 64,384
  • 92
  • 238
  • 332