简体   繁体   English

从bigquery表读取数据框,然后删除该表

[英]Reading a dataframe from bigquery table and then delete that table

I am trying to read a table from bigquery and then converting it to dataframe and then finally deleting that table . 我试图从bigquery中读取一个表,然后将其转换为dataframe,最后删除该表。 But since dataframes are lazily evaluated, whats happening is it deletes the table first and then tries to read it. 但是由于对数据帧的计算是延迟的,所以发生的事情是它首先删除了表,然后尝试读取它。 Is there any way to delete the table after it has been loaded in dataframe. 将表加载到数据框中后,有什么方法可以删除它。

Whatever you are doing with dataframe, it won't execute unless you call an action. 无论您使用数据框做什么,它都不会执行,除非您调用一个动作。 Here is what you can do: 1. Call any action you want to perform, for eg you can write it as another table, let say temp_table (Remember, .write is an action) 2. Drop the table you've read from. 您可以执行以下操作:1.调用要执行的任何动作,例如,您可以将其写入另一个表,例如说temp_table(请记住,.write是一个动作)。2.删除从中读取的表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM