-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Being more restrictive on Arctic Library Names? #656
Comments
Ha ha ha ha. No. 😀 |
I'm asking because we had an internal bug that seemed to be as a result of this happening, so glad you agree :) |
Do we have any proposals for naming when using initialize_library?
|
That sounds fair to me. Maybe worth checking whether it would break anything. |
@bmoscon @yschimke @richardbounds @jamesblackburn
For new libraries don't allow:
For the number of '.' in the library name, while mongoDB perfectly allows NS coll name nesting, bear in mind that:
|
I have spent some hours to figure out that the dots
|
@micheartin How did you initialise your library? And how are you attempting to access it? |
Hi @rob256 Yes the final MongoDB library name was Sorry if my previous post was short and unclear. I just wanted to say that the I do not yet know if my below simplified snippet is correct because I am learning Arctic and I have some issues when storing an order book ( class Library:
def __init__(self, name, lib):
self.name = name
self.lib = lib
def write(self, ns, **kwargs)
df = pd.DataFrame({key: [value] for key, value in kwargs.items()})
df['date'] = pd.to_datetime(ns, unit="ns")
df.set_index("date", inplace=True)
df.index = df.index.tz_localize(None) # timestamp in UTC
self.lib.append(pair, df, upsert=True, chunk_size="T") # once per minute
class LibraryBuilder:
def __init__(self, host="127.0.0.1", lib_type=arctic.CHUNK_STORE):
self.con = arctic.Arctic(host)
self.lib_type = lib_type
def get_library(self, market, key) -> Library:
name = f"{market}-{key}"
lib_name = f"{name}-DIG"
if lib_name not in self.con.list_libraries():
self.con.initialize_library(lib_name, lib_type=self.lib_type)
return Library(name, self.con[lib_name]) |
For discussion, should we allow things like quotes in Arctic library names?
The text was updated successfully, but these errors were encountered: