Dynamic or Untyped Mappings and Output
See original GitHub issueThanks for what looks to be a great library! I’m creating an application that needs to do some CSV processing without knowing either the mappings or the structure of the input data at compile-time. At runtime I have both the input data (of course) and the mapping information (each of the destination columns and whether I should pull them from a column in the source or provide a default or static value).
So I have two questions:
- Is there a way to construct the mapping object for TinyCsvParser at runtime? I guess I could construct a runtime expression manually using Linq. It would help if there were an overload to the mapping to pass in the column names as strings instead of just expressions (especially since it currently looks like the expressions are just mapped back to strings through reflection eventually).
- Is there a way to receive some
dynamic
orIEnumerable<KeyValuePair<string, string>>
(for header -> value) back from TinyCsvParser?
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:15
Top Results From Across the Web
Dynamic or Untyped Mappings and Output · Issue #23
Basically I defined a CsvMappingBuilder , which allows to build mappings by the Column Name. When you have the Header, you can instantiate...
Read more >What is the supposed productivity gain of dynamic typing?
Both dynamic typing and static typing have their advantages. ... And some of them even allow embedding untyped code, whenever you need to ......
Read more >Ho to dynamically deserialize untyped a JSON with list
A JSON object deserializes to a Map<String, Object> . At run time, the contents of the Map (the Object instances) will have a...
Read more >c# - Changing a csv file, reading and writing with dynamic ...
If all you are doing is changing CSV characteristics (like ticks etc) rather than the data, couldnt you just read the raw fields...
Read more >Using Dynamic Transforms (Mapping) in Biztalk 2004 ...
Dynamic mapping is the concept of specifying the map to be used for a transform at runtime inside the orchestration.
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 FreeTop 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
Top GitHub Comments
Dynamic Mappings would be a great feature, but I am lacking the resources to implement it in the near future. Right now I prefer to have the library with fixed mappings. For sophisticated mappings people will turn to CsvHelpers anyway. This library is optimized for speed, so maybe this is what it should be known for.
I don’t want to generate false expectations, like users can expect me to support dynamic mappings sometime soon. So I am closing this issue.
Sorry! 🙏
How do you recreate this warning? I downloaded the 2.1 branch and set it up and ran the unit test and did not get that warning.