Skip to content

FileHiveMetastore example/documentation? #11943

Description

@ankon

I'm trying to use presto to query data in ORC files produced by pinterest/secor, stored in S3. My environment doesn't have any Hadoop/Hive setup, rather we use Kafka directly. Using presto against Kafka isn't workable (too slow, and would require infinite retention of the data inside Kafka). My table descriptions are produced automatically based on application data, and I want my users to only interact with presto.

I got things to work with Hive 3.1.1, but the requirements for running a Hive metastore are "scary" (no knowledge otherwise, so this adds quite some operational complexity).
I saw in the source code that there is a FileHiveMetastore which seems like it would remove the need to configure and run an actual Hive metastore server, and it should be easy enough to convert my application knowledge into suitable schemas.

What I would need for that is basically some form of example of how to describe a table for this meta-store, or ideally some pointers to documentation.

My table definition right now looks like this:

create external table if not exists events (`type` string,`_message` string,`_meta` struct<`id`:string,...,`timestamp`:string>) partitioned by (`dt` string) stored as orc location 's3a://bucket/raw_logs/secor_backup/events/';
msck repair table events;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions