-1
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))
파이썬에는 속성 '쿼리'가 없습니다 :내가 AttributeError를 얻고있다 : 'STR'개체가 나는 기본 키 및 사용자 입력으로 값을 시도하고에 조회하려고하지만 난 다음 오류가 받고 있어요
'str' object has no attribute 'query'
'source_table = raw_input()'... 항상'str'입니다 ... 어떤 객체가'query()'를 실행하려고합니까? –