Skip to content

GRANT READ ON URL("https://...") can't be added #144

@vincent-ogury

Description

@vincent-ogury

When I try to add a grant read on url

I'm settings:

It will generate:

GRANT READ ON URL("https://mydomain\\.com/x/y/.*\").* TO myetl;

there is no way to avoid settings a table in that case.

The issue is here":

One possible solution is to avoid settings an table if the db starts with db like


	// Target database/table
	{
		tokens = append(tokens, "ON")

		if q.database != nil {
			if q.table != nil {
				tokens = append(tokens, fmt.Sprintf("%s.%s", backtick(*q.database), backtick(*q.table)))
			} else {
				tokens = append(tokens, fmt.Sprintf("%s.*", backtick(*q.database)))
			}
		} else if !strings.HasPrefix(*q.database, "URL(") {
			tokens = append(tokens, "*.*")
		}
	}

Eventually, it's probably possible to do it in an hacky way like

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions