Custom Exports

As mentioned in the Overview, custom exports are exports that may be more flexible in the way that data is exported compared to simple exports. Custom exports produce custom results.

Custom exports undergo less validation than simple exports. As a result of this, custom results are less flexible in their utility outside of FMU, but may be more useful for customized workflows.

Key Features

Pros

  • Export what you want, how you want [1]

  • More opportunity to pre-process data before export

  • More choices in exported data type

Cons

  • More complicated to use

  • Less utility and support outside of FMU

  • Less support for retrieving uploaded data

  • Do not automatically adhere to the FMU data standard

Usage

Custom exports require using a class provided by fmu-dataio called ExportData. As shown in the Overview, in its most simplistic form it is used like so:

from fmu.dataio import ExportData

df = create_data() # Some function that creates a Pandas dataframe
cfg = get_global_config() # The FMU global configuration

# ExportData can take many arguments. This is a simplified example.
exp = ExportData(
    config=cfg,
    content="volumes",
)
exp.export(df) # Exports the Pandas dataframe as a csv by default

To learn more about how to use the ExportData class, proceed to the Custom Exports Usage section.

If you want to jump straight into some examples, check out the Custom Exports Examples section.