Dynamic columns, writing only part of the data #385
Unanswered
pavlexander
asked this question in
Q&A
Replies: 1 comment
-
Hi @pavlexander, we don't currently have support for this with the row-oriented API. There's an open issue about skipping some properties of an object at #190, although the solution proposed there involves adding an annotation to properties so that wouldn't solve your problem of wanting to change which set of properties to include at runtime, and that issue is also about reading rather than writing. I think for this problem it makes sense to use the lower-level column oriented API instead. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Presumably I have a data of format:
How would you write only a part of the columns?
In example above I would like to write to file a
Price
column, but notAmount
andName
. In other scenario I would like to writePrice
andName
, but not theAmount
column data.. Is there a way of doing it? Presumably the feature that I am looking for is dynamic objects writing (or objects with dynamic sets of properties)...Currently I am using the following approach which writes the full set of properties into file:
I also tried using the dynamic objects like so:
but get the exception:
Preferably I would like to avoid initializing and creating a new collection just to have some of the columns exported. The best scenario would be to reuse the same MyData object when writing to file and avoiding some of the properties..
Beta Was this translation helpful? Give feedback.
All reactions