Interface ExternalSourceMetadata
- All Superinterfaces:
SourceMetadata
Extended interface for external data source metadata.
This interface extends SourceMetadata to provide a unified metadata type
for all external sources (Iceberg tables, Parquet files, etc.) while maintaining
backward compatibility with existing code that uses the legacy method names.
New implementations should prefer using SourceMetadata methods directly:
location()instead oftablePath()schema()instead ofattributes()
For table-based sources (Iceberg, Delta Lake), implementations should store
native schema and source-specific data in SourceMetadata.sourceMetadata() to avoid
re-resolving the table during execution.
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.default Stringlocation()Default implementation ofSourceMetadata.location()that delegates totablePath()for backward compatibility.schema()Default implementation ofSourceMetadata.schema()that delegates toattributes()for backward compatibility.default StringDeprecated.Uselocation()insteadMethods inherited from interface org.elasticsearch.xpack.esql.datasources.spi.SourceMetadata
config, partitionColumns, sourceMetadata, sourceType, statistics
-
Method Details
-
tablePath
Deprecated.Uselocation()insteadReturns the path or identifier of the external source (e.g., S3 path).- Returns:
- the source path
-
attributes
Deprecated.Useschema()insteadReturns the list of attributes representing the schema of the external source.- Returns:
- list of attributes
-
location
Default implementation ofSourceMetadata.location()that delegates totablePath()for backward compatibility.Implementations should override either this method or
tablePath().- Specified by:
locationin interfaceSourceMetadata- Returns:
- the location string, never null
-
schema
Default implementation ofSourceMetadata.schema()that delegates toattributes()for backward compatibility.Implementations should override either this method or
attributes().- Specified by:
schemain interfaceSourceMetadata- Returns:
- list of attributes representing the schema, never null
-
schema()instead