Column name mapping function
See original GitHub issueHi,
I want to be able to specify a function that maps column names everywhere (e.g. map to underscore/snake_case). I don’t want to manually specify it in each attribute nor auto-generate it via template.
I searched through the wiki/issues/code but couldn’t find an answer; any help is appreciated. Thank you.
Example:
MappingSchema.Default.ColumnNameResolver = columnName => columnName.ToSnakeCase();
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
r - Mantain column names in map function with table
I suppose you could pass in the column names of your data.frame using map2 . Then you could include dnn argument for table...
Read more >Column Maps
A Column Map provides specifications needed to direct data from source columns to destination columns, match pairs of columns from separate tables for...
Read more >Mapping Table Columns — SQLAlchemy 1.4 Documentation
A mapping by default shares the same name for a Column as that of the mapped attribute - specifically it matches the Column.key...
Read more >Passing in column name as a function parameter into map ...
I'm new to packages like purrr and rlang. I'm trying to write a function that takes a dataset, a column name to group...
Read more >Using column patterns in mapping data flow - Azure
Several mapping data flow transformations allow you to reference template columns based on patterns instead of hard-coded column names.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
look this branch is now merged: https://github.com/linq2db/linq2db/pull/1081
you can adjust global mapping like in the code here: https://github.com/linq2db/linq2db/pull/1081/files#diff-c04281cc1fab7b1a1aa2529b6dd14ffbR56
Ok, you were right. It will not be called if configured like that. See #1592. For now you need to attach callback in your DbContext constructor https://github.com/jsheely/linq2db-column-mapping-example/blob/master/Components/Database/DbContext.cs#L13 to this.MappingSchema instance