Skip to content

Add an ability to pass headers to url table function #37897

@j0tunn

Description

@j0tunn

Use case
To be able to retrieve data from the external source during the request in most cases it is necessary to pass Authorization header.

Describe the solution you'd like

It would be nice to pass headers to the url table function as a parameter. Example:

SELECT * FROM url('http://127.0.0.1:12345/', CSV, 'column1 String, column2 UInt32', ['Authorization: <token>']) LIMIT 3;

It can be also some source constructor of the first parameter like Http(s) source:

SELECT * FROM url(
   HTTP(
        url 'http://127.0.0.1:12345/',
        headers(header(name 'Authorization' value '<token>'))
    ),
    CSV,
    'column1 String, column2 UInt32'
)
LIMIT 3;

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions