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
2 changes: 1 addition & 1 deletion cloudquery/sdk/internal/memdb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

from .memdb import MemDB
from .memdb import MemDB
1 change: 0 additions & 1 deletion cloudquery/sdk/internal/memdb/memdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ def get_tables(self, options : plugin.TableOptions = None) -> List[plugin.Table]
def sync(self, options: plugin.SyncOptions) -> Generator[message.SyncMessage, None, None]:
for table, record in self._memory_db.items():
yield message.SyncInsertMessage(record)

2 changes: 1 addition & 1 deletion cloudquery/sdk/scalar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
from .date32 import Date32
from .float64 import Float64
from .int64 import Int64
from .uuid import UUID
from .uuid import UUID
2 changes: 1 addition & 1 deletion cloudquery/sdk/scalar/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ def set(self, scalar):
self._valid = True
self._value = scalar.encode()
else:
raise ScalarInvalidTypeError("Invalid type for Binary scalar")
raise ScalarInvalidTypeError("Invalid type for Binary scalar")
2 changes: 1 addition & 1 deletion cloudquery/sdk/scalar/float64.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ def set(self, value):
raise ScalarInvalidTypeError("Invalid type for Float64 scalar")
else:
raise ScalarInvalidTypeError("Invalid type for Binary scalar")
self._valid = True
self._valid = True
2 changes: 1 addition & 1 deletion cloudquery/sdk/scalar/int64.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ def set(self, value):
raise ScalarInvalidTypeError("Invalid type for Int64 scalar") from e
else:
raise ScalarInvalidTypeError("Invalid type {} for Int64 scalar".format(type(value)))
self._valid = True
self._valid = True
2 changes: 0 additions & 2 deletions cloudquery/sdk/scalar/scalar.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ def is_valid(self) -> bool:
@property
def value(self):
raise NotImplementedError("Scalar value not implemented")


2 changes: 1 addition & 1 deletion cloudquery/sdk/scalar/uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ def set(self, value):
raise ScalarInvalidTypeError("Invalid type for UUID scalar") from e
else:
raise ScalarInvalidTypeError("Invalid type {} for UUID scalar".format(type(value)))
self._valid = True
self._valid = True
2 changes: 1 addition & 1 deletion cloudquery/sdk/scheduler/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from .scheduler import Scheduler
from .table_resolver import TableResolver
from .table_resolver import TableResolver
8 changes: 4 additions & 4 deletions cloudquery/sdk/scheduler/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,17 @@ def sync(self, client, resolvers: List[TableResolver], deterministic_cq_id=False
thread = futures.ThreadPoolExecutor()
thread.submit(self._sync, client, resolvers, res, deterministic_cq_id)
total_table_resolvers = 0
finished_table_resovlers = 0
finished_table_resolvers = 0
while True:
message = res.get()
if type(message) == TableResolverStarted:
total_table_resolvers += message.count
if total_table_resolvers == finished_table_resovlers:
if total_table_resolvers == finished_table_resolvers:
break
continue
elif type(message) == TableResolverFinished:
finished_table_resovlers += 1
if total_table_resolvers == finished_table_resovlers:
finished_table_resolvers += 1
if total_table_resolvers == finished_table_resolvers:
break
continue
yield message
Expand Down
10 changes: 5 additions & 5 deletions cloudquery/sdk/schema/arrow.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

METADATA_UNIQUE = "cq:extension:unique"
METADATA_UNIQUE = "cq:extension:unique"
METADATA_PRIMARY_KEY = "cq:extension:primary_key"
METADATA_CONSTRAINT_NAME = "cq:extension:constraint_name"
METADATA_INCREMENTAL = "cq:extension:incremental"
METADATA_INCREMENTAL = "cq:extension:incremental"

METADATA_TRUE = "true"
METADATA_FALSE = "false"
METADATA_TRUE = "true"
METADATA_FALSE = "false"
METADATA_TABLE_NAME = "cq:table_name"
MATADATA_TABLE_DESCRIPTION = "cq:table_description"
METADATA_TABLE_DESCRIPTION = "cq:table_description"
1 change: 0 additions & 1 deletion cloudquery/sdk/schema/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ def to_list_of_arr(self):

def to_arrow_record(self):
return pa.record_batch(self.to_list_of_arr(), schema=self._table.to_arrow_schema())

2 changes: 1 addition & 1 deletion cloudquery/sdk/schema/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def to_arrow_schema(self):
fields = []
md = {
arrow.METADATA_TABLE_NAME: self.name,
arrow.MATADATA_TABLE_DESCRIPTION: self.description,
arrow.METADATA_TABLE_DESCRIPTION: self.description,
# arrow.METADATA_CONSTRAINT_NAME:
}
for column in self.columns:
Expand Down
2 changes: 1 addition & 1 deletion cloudquery/sdk/serve/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .plugin import PluginCommand
from .plugin import PluginCommand
2 changes: 1 addition & 1 deletion cloudquery/sdk/transformers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

from .transformers import transform_list_of_dict
from .transformers import transform_list_of_dict
2 changes: 1 addition & 1 deletion cloudquery/sdk/types/uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ def __arrow_ext_serialize__(self):
def __arrow_ext_deserialize__(self, storage_type, serialized):
# return an instance of this subclass given the serialized
# metadata.
return UuidType()
return UuidType()