久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <small id='RWDOi'></small><noframes id='RWDOi'>

      1. <tfoot id='RWDOi'></tfoot>

        <i id='RWDOi'><tr id='RWDOi'><dt id='RWDOi'><q id='RWDOi'><span id='RWDOi'><b id='RWDOi'><form id='RWDOi'><ins id='RWDOi'></ins><ul id='RWDOi'></ul><sub id='RWDOi'></sub></form><legend id='RWDOi'></legend><bdo id='RWDOi'><pre id='RWDOi'><center id='RWDOi'></center></pre></bdo></b><th id='RWDOi'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='RWDOi'><tfoot id='RWDOi'></tfoot><dl id='RWDOi'><fieldset id='RWDOi'></fieldset></dl></div>

        • <bdo id='RWDOi'></bdo><ul id='RWDOi'></ul>
        <legend id='RWDOi'><style id='RWDOi'><dir id='RWDOi'><q id='RWDOi'></q></dir></style></legend>

        使用 SparkSQL 刪除 MySQL 表

        Dropping MySQL table with SparkSQL(使用 SparkSQL 刪除 MySQL 表)

            • <bdo id='8yzBA'></bdo><ul id='8yzBA'></ul>
              <legend id='8yzBA'><style id='8yzBA'><dir id='8yzBA'><q id='8yzBA'></q></dir></style></legend>

                <tfoot id='8yzBA'></tfoot>

                  <small id='8yzBA'></small><noframes id='8yzBA'>

                1. <i id='8yzBA'><tr id='8yzBA'><dt id='8yzBA'><q id='8yzBA'><span id='8yzBA'><b id='8yzBA'><form id='8yzBA'><ins id='8yzBA'></ins><ul id='8yzBA'></ul><sub id='8yzBA'></sub></form><legend id='8yzBA'></legend><bdo id='8yzBA'><pre id='8yzBA'><center id='8yzBA'></center></pre></bdo></b><th id='8yzBA'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='8yzBA'><tfoot id='8yzBA'></tfoot><dl id='8yzBA'><fieldset id='8yzBA'></fieldset></dl></div>
                    <tbody id='8yzBA'></tbody>
                2. 本文介紹了使用 SparkSQL 刪除 MySQL 表的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我知道我們可以通過以下命令從 SparkSQL 查詢或創建一個 Mysql 表.

                  I know that we can query or create a Mysql table from SparkSQL through the below commands.

                  val data = sqlContext.read.jdbc(urlstring, tablename, properties)
                  data.write.format("com.databricks.spark.csv").save(result_location)
                  
                  val dataframe = sqlContext.read.json("users.json")
                  dataframe.write.jdbc(urlstring, table, properties)
                  

                  這樣有沒有辦法刪除一個表?

                  Like that is there any way to drop a table ?

                  推薦答案

                  您可以嘗試使用 JDBC 驅動程序進行基本的 DROP 操作:

                  You can try a basic DROP operation with the JDBC driver :

                  val DB_URL: String = ???
                  val USER: String = ???
                  val PASS: String = ???
                  
                  def dropTable(tableName: String) = {
                  
                      import java.sql._;
                  
                      var conn: Connection = null;
                      var stmt: Statement = null;
                  
                      try {
                        Class.forName("com.mysql.jdbc.Driver");
                        println("Connecting to a selected database...");
                        conn = DriverManager.getConnection(DB_URL, USER, PASS);
                        println("Connected database successfully...");
                        println("Deleting table in given database...");
                        stmt = conn.createStatement();
                        val sql: String = s"DROP TABLE ${tableName} ";
                        stmt.executeUpdate(sql);
                        println(s"Table ${tableName} deleted in given database...");
                      } catch {
                        case e: Exception => println("exception caught: " + e);
                      } finally {
                        ???
                      }
                  }
                  
                  dropTable("test")
                  

                  您可以使用 JDBCUtils 在 Spark 中做到這一點,但這非常簡單.

                  You can do that with Spark using JDBCUtils but this is quite straightforward.

                  這篇關于使用 SparkSQL 刪除 MySQL 表的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函數根據 N 個先前值來決定接下來的 N 個行)
                  reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用選擇表達式的結果;條款?)
                  Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函數的 ignore 選項是忽略整個事務還是只是有問題的行?) - IT屋-程序員軟件開發技
                  Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 時出錯,使用 for 循環數組)
                  pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 調用 o23.load 時發生錯誤 沒有合適的驅動程序)
                  How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何將 Apache Spark 與 MySQL 集成以將數據庫表作為 Spark 數據幀讀取?)
                    <tbody id='miK3h'></tbody>

                      • <small id='miK3h'></small><noframes id='miK3h'>

                          <bdo id='miK3h'></bdo><ul id='miK3h'></ul>
                        • <tfoot id='miK3h'></tfoot>
                            <legend id='miK3h'><style id='miK3h'><dir id='miK3h'><q id='miK3h'></q></dir></style></legend>
                            <i id='miK3h'><tr id='miK3h'><dt id='miK3h'><q id='miK3h'><span id='miK3h'><b id='miK3h'><form id='miK3h'><ins id='miK3h'></ins><ul id='miK3h'></ul><sub id='miK3h'></sub></form><legend id='miK3h'></legend><bdo id='miK3h'><pre id='miK3h'><center id='miK3h'></center></pre></bdo></b><th id='miK3h'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='miK3h'><tfoot id='miK3h'></tfoot><dl id='miK3h'><fieldset id='miK3h'></fieldset></dl></div>
                            主站蜘蛛池模板: 九九热在线观看视频 | 国产精品福利在线观看 | 97超碰在线免费观看 | 欧美草草| 日韩av不卡在线观看 | 欧美xx孕妇 | 91看片在线观看 | 日韩精品久久久久 | 精品视频一区二区三区 | 国产精品国产 | 国产精品美女久久久久久久久 | 欧洲av在线 | 亚洲成人精品一区 | 日韩黄色免费视频 | 黄色在线免费网站 | 日韩综合久久 | 免费av播放| 日韩欧美国产综合 | 午夜av片 | 精品日韩一区二区三区 | 日韩一级在线观看 | 国产黄色精品 | 欧美日韩视频在线 | 久久夜色精品国产欧美乱极品 | 国产在线一区二区三区 | 欧美综合一区 | 男人操女人视频网站 | 在线观看黄色小视频 | 长河落日电视连续剧免费观看 | 成人黄色录像 | 国产精品不卡 | 成人高清免费 | 色哟哟一区二区 | 一区二区三区四区在线 | 一级特黄毛片 | 国产成人综合网 | 免费特级毛片 | 黄色片www| 一区二区三区四区在线播放 | 国产精品毛片一区视频播 | 特黄aaaaaaaaa真人毛片 |