--- license: cc-by-nc-4.0 task_categories: - tabular-classification - tabular-regression - time-series-forecasting language: - en tags: - tsfile - timeseries - time-series - synthetic - oil-and-gas - commodities - supply-demand - opec - macroeconomic - iea - inventory-balance - xpertsystems - format:tsfile pretty_name: OIL-030 — Synthetic Global Oil Market Dynamics Dataset (Sample) (TsFile) size_categories: - 100K **Read this dataset with the Java SDK.** It is written with the `zstd` compressor. The Apache TsFile Java SDK reads every compressor, but the Python SDK (`pip install tsfile`) implements only `UNCOMPRESSED`, `SNAPPY`, `GZIP` and `LZ4`; opening this file with it yields no rows. Read a converted file with the Apache TsFile Java SDK (`org.apache.tsfile:tsfile`): ```java import org.apache.tsfile.file.metadata.IDeviceID; import org.apache.tsfile.read.TsFileReader; import org.apache.tsfile.read.TsFileSequenceReader; import org.apache.tsfile.read.common.Path; import org.apache.tsfile.read.expression.QueryExpression; import org.apache.tsfile.read.query.dataset.QueryDataSet; import org.apache.tsfile.write.schema.MeasurementSchema; import java.util.ArrayList; import java.util.List; String path = "futures_curve_structures.tsfile"; try (TsFileSequenceReader sequenceReader = new TsFileSequenceReader(path); TsFileReader reader = new TsFileReader(sequenceReader)) { // Devices are enumerated as IDeviceID objects. Tables with TAG columns // have multi-segment device ids that cannot be rebuilt from their string // form, so always use getAllDevices() rather than getAllDeviceIds(). for (IDeviceID device : sequenceReader.getAllDevices()) { List paths = new ArrayList<>(); for (MeasurementSchema schema : reader.getMeasurement(device)) { String name = schema.getMeasurementName(); if (name != null && !name.isEmpty() && !name.equalsIgnoreCase("Time")) { paths.add(new Path(device, name, true)); } } QueryDataSet dataSet = reader.query(QueryExpression.create(paths, null)); while (dataSet.hasNext()) { System.out.println(dataSet.next()); } } } ``` ## Source & license - Original dataset: [`xpertsystems/oil030-sample`](https://huggingface.co/datasets/xpertsystems/oil030-sample) - Source card title: OIL-030 — Synthetic Global Oil Market Dynamics Dataset (Sample) - License: cc-by-nc-4.0 (as declared by the original dataset).