ClickHouse/docs/es/operations/table_engines/url.md
Ivan Blinkov f315e5079b
More complete "es" translation (#9791)
* replace exit with assert in test_single_page

* improve save_raw_single_page docs option

* More grammar fixes

* "Built from" link in new tab

* fix mistype

* Example of include in docs

* add anchor to meeting form

* Draft of translation helper

* WIP on translation helper

* Replace some fa docs content with machine translation

* add normalize-en-markdown.sh

* normalize some en markdown

* normalize some en markdown

* admonition support

* normalize

* normalize

* normalize

* support wide tables

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* normalize

* lightly edited machine translation of introdpection.md

* lightly edited machhine translation of lazy.md

* WIP on translation utils

* Normalize ru docs

* Normalize other languages

* some fixes

* WIP on normalize/translate tools

* add requirements.txt

* [experimental] add es docs language as machine translated draft

* remove duplicate script

* Back to wider tab-stop (narrow renders not so well)

* Links to nowhere check at least for English

* use f string

* More complete es translation
2020-03-21 12:17:06 +03:00

2.5 KiB

Nombre de la red inalámbrica (SSID):)

Administra datos en un servidor HTTP/HTTPS remoto. Este motor es similar Angeles File motor.

Uso del motor en el servidor ClickHouse

El format debe ser uno que ClickHouse pueda usar en SELECT consultas y, si es necesario, en INSERTs. Para obtener la lista completa de formatos admitidos, consulte Formato.

El URL debe ajustarse a la estructura de un localizador uniforme de recursos. La dirección URL especificada debe apuntar a un servidor que utiliza HTTP o HTTPS. Esto no requiere ningún encabezados adicionales para obtener una respuesta del servidor.

INSERT y SELECT las consultas se transforman en POST y GET Peticiones, Respectivamente. Para el procesamiento POST solicitudes, el servidor remoto debe admitir Codificación de transferencia fragmentada.

Puede limitar el número máximo de saltos de redirección HTTP GET utilizando el Nombre de la red inalámbrica (SSID): configuración.

Ejemplo:

1. Crear un url_engine_table tabla en el servidor :

CREATE TABLE url_engine_table (word String, value UInt64)
ENGINE=URL('http://127.0.0.1:12345/', CSV)

2. Cree un servidor HTTP básico utilizando las herramientas estándar de Python 3 y comenzarlo:

from http.server import BaseHTTPRequestHandler, HTTPServer

class CSVHTTPServer(BaseHTTPRequestHandler):
    def do_GET(self):
        self.send_response(200)
        self.send_header('Content-type', 'text/csv')
        self.end_headers()

        self.wfile.write(bytes('Hello,1\nWorld,2\n', "utf-8"))

if __name__ == "__main__":
    server_address = ('127.0.0.1', 12345)
    HTTPServer(server_address, CSVHTTPServer).serve_forever()
$ python3 server.py

3. Solicitar datos:

SELECT * FROM url_engine_table
┌─word──┬─value─┐
│ Hello │     1 │
│ World │     2 │
└───────┴───────┘

Detalles de la implementación

  • Las lecturas y escrituras pueden ser paralelas
  • No soportado:
    • ALTER y SELECT...SAMPLE operación.
    • Índices.
    • Replicación.

Artículo Original