Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ sqlalchemy~=1.4
s3fs~=2023.9.2
adlfs~=2023.9.0
# If installing on MAC, you need to install PostgreSQL first using 'brew install postgresql'
psycopg[binary,pool]~=3.2
psycopg[binary,pool]~=3.2
v3io-frames>=0.10.14, !=0.11.*, !=0.12.*
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ pandas>=1, !=1.5.*, <2.2
numpy>=1.16.5,<1.27
# <24 is just a safeguard - no tests performed with pyarrow higher than 23
pyarrow>=1,<24
v3io-frames>=0.10.14, !=0.11.*, !=0.12.*
fsspec>=0.6.2
v3iofs~=0.1.17
xxhash>=1
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def load_deps(file_name):
"opentelemetry-sdk>=1.25.0,<2.0.0",
"opentelemetry-exporter-otlp-proto-grpc>=1.25.0,<2.0.0",
],
"v3io-frames": ["v3io-frames>=0.10.14, !=0.11.*, !=0.12.*"],
}


Expand Down
15 changes: 12 additions & 3 deletions storey/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@

import pandas as pd
import pyarrow
import v3io_frames as frames
import xxhash

try:
import v3io_frames as frames
except ImportError:
frames = None

from . import Driver
from .dtypes import Event, V3ioError
from .flow import Flow, _Batching, _split_path, _termination_obj
Expand Down Expand Up @@ -758,7 +762,12 @@ def __init__(
self._aggr = aggr
self.aggr_granularity = aggr_granularity
self._created = False
self._frames_client = frames_client or frames.Client(address=v3io_frames, token=access_key, container=container)
self._if_exists = frames.frames_pb2.IGNORE if frames is not None else 1 # frames_pb2.IGNORE
if frames_client is None:
if frames is None:
raise ImportError("Install with: pip install storey[v3io-frames]")
frames_client = frames.Client(address=v3io_frames, token=access_key, container=container)
self._frames_client = frames_client

def _init(self):
_Batching._init(self)
Expand All @@ -780,7 +789,7 @@ async def _emit(self, batch, batch_key, batch_time, batch_events, last_event_tim
self._frames_client.create(
"tsdb",
table=self._path,
if_exists=frames.frames_pb2.IGNORE,
if_exists=self._if_exists,
rate=self._rate,
aggregates=self._aggr,
aggregation_granularity=self.aggr_granularity or "",
Expand Down
Loading