0

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:

  1. Give the table a name.
  2. Use database.table.ref, but it gives me "DATABASE|TABLE"
  3. Tried to f'"{database.table.ref.replace("|", '"."')}"
Kai
  • 67
  • 2
  • 10

0 Answers0