You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful for consumers of Iceberg tables to be able to specify additional metadata in data files that enable them to know how to read the files. Some examples of custom metadata include:
Encryption keys required to read the file,
Compression codecs specified on the file without needing to have a specific file extension,
Metadata that's specific to a custom file format. Suppose we supported CSV tables in Iceberg down the road. It would be nice to attach the column delimiter on a per-file basis so that a table can be comprised of multiple files that may not necessarily be uniform in terms of the exact layout, but have compatible schemas.
The custom metadata field should be of type Map<String, String> and can be an optional column.
Finally, consider the I/O submodule proposed in #12. In FileIO there, the newOutputFile API should also return custom metadata specific to reading that file after it's written. Thus FileIO#newOutputFile should return a struct containing an OutputFile object for writing the bytes and a Map<String, String> collection of metadata to be saved in the manifest after the data file is written. Similarly, FileIO#newInputFile should also pass custom metadata for reading that file that can be interpreted by the specific implementation of FileIO.
If iceberg itself does not plan to parse or understand the map, could a json blob be considered instead?
For CSV and compression codecs, instead of putting such info into a custom map, I think having these be recognized as first-class known entities will help iceberg data to be consistently/correctly readable by various systems (spark, etc.).
instead of putting such info into a custom map, I think having these be recognized as first-class known entities will help iceberg data to be consistently/correctly readable by various systems (spark, etc.)
+1 to this.
I wonder would there ever be a case where a json blob or a map with custom properties is required, which would be specific to a single platform. If a property/setting is required to correctly read the file, then why not just make it a first class entity?
We're planning to use Iceberg as an ephemeral table storage format so that we can take advantage of Iceberg's Data Source V2 implementation to read and write Parquet files. However, we intend to customize the way files are read and written that is specific to our representation of data (see #12). In such a case we need multiple metadata fields that we know will only make sense in our use case and no one else's, really - they're specific to our data platform.
There are also some examples of metadata tags in the issue description.
Map<String, String> is effectively a JSON Blob as it is, right? It's more strongly typed than just String. I'd prefer biasing more towards strongly typed schemas than the more loosely typed String.
We store the information in our internal system as per-file metadata. We want to be able to batch-fetch this information from our system and load it into the Iceberg table, before invoking the Iceberg data source reader. We would store the information per file in the DataFile object in Iceberg.
Activity
hiteshs commentedon Nov 27, 2018
If iceberg itself does not plan to parse or understand the map, could a json blob be considered instead?
For CSV and compression codecs, instead of putting such info into a custom map, I think having these be recognized as first-class known entities will help iceberg data to be consistently/correctly readable by various systems (spark, etc.).
rdsr commentedon Nov 27, 2018
+1 to this.
I wonder would there ever be a case where a json blob or a map with custom properties is required, which would be specific to a single platform. If a property/setting is required to correctly read the file, then why not just make it a first class entity?
mccheah commentedon Nov 27, 2018
We're planning to use Iceberg as an ephemeral table storage format so that we can take advantage of Iceberg's Data Source V2 implementation to read and write Parquet files. However, we intend to customize the way files are read and written that is specific to our representation of data (see #12). In such a case we need multiple metadata fields that we know will only make sense in our use case and no one else's, really - they're specific to our data platform.
There are also some examples of metadata tags in the issue description.
Map<String, String>is effectively a JSON Blob as it is, right? It's more strongly typed than justString. I'd prefer biasing more towards strongly typed schemas than the more loosely typedString.mccheah commentedon Nov 29, 2018
@rdblue, @rdsr @hiteshs, just wanted to check in to see if this is still an acceptable proposal.
rdblue commentedon Nov 29, 2018
Where do you guys store this information now? Where would it be stored in Iceberg? Table metadata or file metadata?
mccheah commentedon Nov 29, 2018
We store the information in our internal system as per-file metadata. We want to be able to batch-fetch this information from our system and load it into the Iceberg table, before invoking the Iceberg data source reader. We would store the information per file in the
DataFileobject in Iceberg.mccheah commentedon Dec 5, 2018
Closing in favor of #20 and #23.
rdblue commentedon Dec 6, 2018
Did you mean to close this? It's still open.
rdblue commentedon Dec 6, 2018
Funny, I accidentally closed it as I commented. Feel free to re-open if you intended to leave it open.
Merge pull request apache#16 from kowshik/branch-master-adobe
Support reading ORC files without Iceberg IDs (apache#16)
ORC: Support reading ORC files without Iceberg IDs (apache#16)
ORC: Add test for reading files without Iceberg IDs (apache#16)
Support 2-level list and maps type in RemoveIds. (#16)