# Glue **Protocol:** JSON 1.1 **Endpoint:** `http://localhost:4566/` Floci emulates the AWS Glue Data Catalog, allowing you to manage metadata for your data lake locally. ## Supported Actions ### Databases `CreateDatabase` · `GetDatabase` · `GetDatabases` · `DeleteDatabase` · `UpdateDatabase` ### Tables `CreateTable` · `GetTable` · `GetTables` · `DeleteTable` · `UpdateTable` ### Partitions `CreatePartition` · `BatchCreatePartition` · `GetPartition` · `GetPartitions` · `DeletePartition` ## Integration with Athena The Glue Data Catalog is automatically used by **Athena** to resolve table names to S3 locations and formats. When you submit an Athena query, Floci reads all Glue tables for the target database and generates DuckDB views on top of the underlying S3 objects before executing the SQL. The DuckDB read function is selected based on the table's `StorageDescriptor.InputFormat` and `StorageDescriptor.SerdeInfo.SerializationLibrary`: | Condition | DuckDB function | |---|---| | `InputFormat` or `SerializationLibrary` contains `parquet` | `read_parquet` | | `InputFormat` or `SerializationLibrary` contains `json` | `read_json_auto` | | `InputFormat` contains `hive` | `read_json_auto` | | Anything else | `read_csv_auto` | ## Example ```bash export AWS_ENDPOINT_URL=http://localhost:4566 # Create a database aws glue create-database \ --database-input '{"Name": "analytics"}' \ --endpoint-url $AWS_ENDPOINT_URL # Create a JSON table (standard AWS format for NDJSON data) aws glue create-table \ --database-name analytics \ --table-input '{ "Name": "orders", "StorageDescriptor": { "Location": "s3://my-bucket/orders/", "InputFormat": "org.apache.hadoop.mapred.TextInputFormat", "OutputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat", "SerdeInfo": { "SerializationLibrary": "org.openx.data.jsonserde.JsonSerDe" }, "Columns": [ {"Name": "id", "Type": "int"}, {"Name": "amount", "Type": "double"} ] } }' \ --endpoint-url $AWS_ENDPOINT_URL # Create a Parquet table aws glue create-table \ --database-name analytics \ --table-input '{ "Name": "events", "StorageDescriptor": { "Location": "s3://my-bucket/events/", "InputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat", "SerdeInfo": { "SerializationLibrary": "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe" }, "Columns": [ {"Name": "event_id", "Type": "string"}, {"Name": "ts", "Type": "bigint"} ] } }' \ --endpoint-url $AWS_ENDPOINT_URL ```