lsst-uk / lasair-lsst

Apache License 2.0
0 stars 0 forks source link

gkdbutils for upper-lower cassandra names #189

Open RoyWilliams opened 3 months ago

RoyWilliams commented 3 months ago

Now that we have changed to using upper-lower case attribute names in cassandra, we should not be making them lower-case, since the database will no longer recognise the name. The ingest breaks because of Line 187 of ingestGenericDatabaseTable in gkdbutils, where it lower-cases everything: lckeys = ",".join([k.lower().replace('-','').replace('/','') for k in keys])

In the new way of doing things, this should be instead just doublequoting the names: lckeys = ",".join(['"' + k + '"' for k in keys])

genghisken commented 2 months ago

Code is pushed. Note that instead of the above, I've done the following, which excludes hyphens or slashes in the keys.

lckeys = ",".join(['"' + k.replace('-','').replace('/','') + '"' for k in keys])