PHPackages                             pcbodev/laravel-aws-timestream - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. pcbodev/laravel-aws-timestream

ActiveLibrary[API Development](/categories/api)

pcbodev/laravel-aws-timestream
==============================

Library to interact with AWS Timestream service via API

1.0.1(2y ago)0771MITPHPPHP ^8.0

Since Aug 24Pushed 2y agoCompare

[ Source](https://github.com/pcbodev/laravel-aws-timestream)[ Packagist](https://packagist.org/packages/pcbodev/laravel-aws-timestream)[ Docs](https://github.com/norbybaru/laravel-aws-timestream)[ RSS](/packages/pcbodev-laravel-aws-timestream/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

Laravel AWS Timestream
======================

[](#laravel-aws-timestream)

[![PHPUnit Tests](https://github.com/norbybaru/laravel-aws-timestream/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/norbybaru/laravel-aws-timestream/actions/workflows/run-tests.yml)[![PHPStan](https://github.com/norbybaru/laravel-aws-timestream/actions/workflows/phpstan.yml/badge.svg?branch=main)](https://github.com/norbybaru/laravel-aws-timestream/actions/workflows/phpstan.yml)

AWS Timestream is a fast, scalable, and serverless time series database service. This package is an opinionated implementation to query timestream and ingest data into timestream.

It provides a query builder class which has common timeseries sql function. This was inspired by Laravel Eloquent ORM. See supported query functions `NorbyBaru\AwsTimestream\Contract\QueryBuilderContract`

It also provide a payload builder class to format your data correctly to ingest into timestream. See `NorbyBaru\AwsTimestream\Contract\PayloadBuilderContract`

Info
----

[](#info)

We forked the repository of norbybaru because he built an awesome basis for timestream query builder, but we needed some additional features and therefore have implemented those in our fork.

Install
-------

[](#install)

```
composer require pcbodev/laravel-aws-timestream
```

Configuration
-------------

[](#configuration)

- Publish config

```
php artisan vendor:publish --provider="NorbyBaru\AwsTimestream\TimestreamServiceProvider" --tag="timestream-config"
```

- Open `timestream.php` config file and setup your databse name and tables
- Setup you AWS Timestream keys and permissions with the following enviroment variable

```
AWS_TIMESTREAM_KEY=
AWS_TIMESTREAM_SECRET=
AWS_TIMESTREAM_PROFILE=

```

Basic Usage
-----------

[](#basic-usage)

### Query Timestream

[](#query-timestream)

Using `TimestreamBuilder::query()` will give autocomplete of all available functions

1. Using `TimestreamBuilder` to build query to be passed onto `TimestreamReaderDto` which generate am object that can be consumed by `TimestreamService` query function

```
