title: I am getting AttributeError: 'str' object has no attribute 'query' in python
body: <pre><code>source_table = raw_input("Enter the table name : ")
  PK = raw_input("Enter the primary key : ")
  PriKeyData = raw_input("Enter the data type for Primary key int-number, str-string :" )
  with open('PriSortKeys.csv', 'rb') as csvfile:
      csvreader = csv.reader(csvfile, delimiter='\t', quotechar='|')
      for row in csvreader:
          if PriKeyData == "int":
                  prikeyvalue = int(row[0])
              else:
                  prikeyvalue = str(row[0])
              logger.info("Checking for Key :" + str(prikeyvalue))
              ## Fetching data from table based on primarykey
              sourcetable_data= source_table.query(KeyConditionExpression=Key(PK).eq(prikeyvalue))
  </code></pre>
  
  <p>I am trying to take primary key and its value as user input and trying to query on that but i am getting the following error: </p>
  
  <blockquote>
    <p>'str' object has no attribute 'query'</p>
  </blockquote>