{"id":409,"date":"2024-05-09T16:24:32","date_gmt":"2024-05-09T15:24:32","guid":{"rendered":"http:\/\/justmakeit.es\/?p=409"},"modified":"2024-05-09T16:30:49","modified_gmt":"2024-05-09T15:30:49","slug":"lectura-de-tablas-kudu","status":"publish","type":"post","link":"http:\/\/justmakeit.es\/?p=409","title":{"rendered":"Lectura de tablas Kudu"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"http:\/\/justmakeit.es\/wp-content\/uploads\/2024\/05\/kudu.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"265\" height=\"191\" src=\"http:\/\/justmakeit.es\/wp-content\/uploads\/2024\/05\/kudu.jpg\" alt=\"\" class=\"wp-image-411\"\/><\/a><\/figure>\n<\/div>\n\n\n<p>Hay varias maneras de realizar consultas de tablas Kudu, una es desde la propia consola de Spark. Para ello es necesario que, al iniciar la sesi\u00f3n de Spark incluyamos el paquete de kudu. Para ello, es necesario ejecutar el siguiente comando:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>spark3-shell --jars \/opt\/cloudera\/parcels\/CDH\/lib\/kudu\/kudu-spark3_2.12.jar<\/code><\/pre>\n\n\n\n<p>Obviamente, el paquete y la ruta tienen que ser los adecuados a la configuraci\u00f3n de tu cluster Cloudera. Una vez iniciada la consola de Spark, ser\u00e1 necesario realizar las importaciones necesarias<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>val kudu_master= \"hostname:7051, hostname2:7051,....\"\n\nval df = spark.read.\n  options(Map(\"kudu.master\" -> kudu_master, \"kudu.table\" -> \"ddbb.tablename\")).\n  format(\"kudu\").\n  load()\n\ndf.show(10, false)\n\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Hay varias maneras de realizar consultas de tablas Kudu, una es desde la propia consola de Spark. Para ello es &hellip; <a href=\"http:\/\/justmakeit.es\/?p=409\" class=\"btn btn-readmore\">Read More <span class=\"screen-reader-text\"> \u00abLectura de tablas Kudu\u00bb<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":411,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,14,52],"tags":[55,54,34],"class_list":["post-409","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cosos","category-programacion","category-scala","tag-kudu","tag-scala","tag-spark"],"_links":{"self":[{"href":"http:\/\/justmakeit.es\/index.php?rest_route=\/wp\/v2\/posts\/409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/justmakeit.es\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/justmakeit.es\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/justmakeit.es\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/justmakeit.es\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=409"}],"version-history":[{"count":2,"href":"http:\/\/justmakeit.es\/index.php?rest_route=\/wp\/v2\/posts\/409\/revisions"}],"predecessor-version":[{"id":412,"href":"http:\/\/justmakeit.es\/index.php?rest_route=\/wp\/v2\/posts\/409\/revisions\/412"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/justmakeit.es\/index.php?rest_route=\/wp\/v2\/media\/411"}],"wp:attachment":[{"href":"http:\/\/justmakeit.es\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/justmakeit.es\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=409"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/justmakeit.es\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}