fix: fix partition error in AstraDBCQLToolComponent (#4356)
* fix: AstraDBCQLToolComponent Tool part is working fine but the direct Data output fails cause of partition key issue * Ruff fix * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
0619ed7248
commit
e657e9de4a
1 changed files with 2 additions and 8 deletions
|
|
@ -94,15 +94,9 @@ class AstraDBCQLToolComponent(LCToolComponent):
|
|||
headers = {"Accept": "application/json", "X-Cassandra-Token": f"{self.token}"}
|
||||
astra_url = f"{self.api_endpoint}/api/rest/v2/keyspaces/{self.keyspace}/{self.table_name}/"
|
||||
key = []
|
||||
|
||||
# Partition keys are mandatory
|
||||
for k in self.partition_keys:
|
||||
if k in args:
|
||||
key.append(args[k])
|
||||
elif self.static_filters[k] is not None:
|
||||
key.append(self.static_filters[k])
|
||||
else:
|
||||
# TO-DO: Raise error - Missing information
|
||||
key.append("none")
|
||||
key = [self.partition_keys[k] for k in self.partition_keys]
|
||||
|
||||
# Clustering keys are optional
|
||||
for k in self.clustering_keys:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue