I created the database and table like this:
# Amazon Timestream
self.database = timestream.CfnDatabase(scope=self, id="MyDatabase")
self.table = timestream.CfnTable(
scope=self,
id="MyTable",
database_name=self.database.ref,
)
But somehow I can not get a valid query string, since I somehow can not get the correct table name.
query = "".join(
(
"SELECT * ",
f'FROM "DATABASE.TABLE" ',
)
)
If I use self.database.ref
it gives me the correct database name. So far so good.
But how do I get the correct table name?
What I tried so far was:
- Give the table a name.
- Use
database.table.ref
, but it gives me "DATABASE|TABLE" - Tried to
f'"{database.table.ref.replace("|", '"."')}"