Query: During what dynasty did Nanjing become a thriving textile city?
Context: It renamed Jiangning (江寧) in Northern Song dynasty and renamed Jiankang in Southern Song dynasty. Jiankang's textile industry burgeoned and thrived during the Song dynasty despite the constant threat of foreign invasions from the north by the Jurchen-led Jin dynasty. The court of Da Chu, a short-lived puppet state established by the Jurchens, and the court of Song were once in the city.