1

I created a table using join()

q = db_session.query(Email).join(Candidate)

Is there a way to print out either the contents of q or the columns?

Morgan Allen
  • 3,065
  • 5
  • 50
  • 81

1 Answers1

1

Sure, .join() produces a new Query object which you can inspect via .column_descriptions and .statement:

print(q.column_descriptions)
print(q.statement)

There is more to how you can inspect the query, please see:

Community
  • 1
  • 1
alecxe
  • 441,113
  • 110
  • 1,021
  • 1,148