Problem with data_source.add_query_asset

Not work standart expectations

  1. connection_string = f"trino://{user}:{password}@{host}:{port}/{catalog}/{schema}?verify=false&http_scheme=https"

query_asset = data_source.add_query_asset(

name=asset_name,

query=”select * from my_table”

)

then gx does not define correctly schema and table_name
i find in utils.py , problem in regular expression
elif dialect.name.lower() == "trino":

try:

table_name= selectable.name # type: ignore[attr-defined] # FIXME CoP

except AttributeError:

print(f'selectable:{selectable}')

table_name= selectable

if str(table_name).lower().startswith("select"):

rx= re.compile(r"^.* from ([\S]+)", re.I)

match= rx.match(str(table_name).replace("\n", ""))

if match:

table_name= match.group(1)

schema_name= sqlalchemy_engine.dialect.default_schema_name

print(f"schema_name:{schema_name}")

print(f"table_name:{table_name}")

selectable: SELECT *
FROM (SELECT * FROM my_table) AS anon_1
WHERE true
schema_name: my_schema
table_name: my_table**)**

also

If i use onnection_string = f"trino://{user}:{password}@{host}:{port}/{catalog}/?verify=false&http_scheme=https"

without schema and

query_asset = data_source.add_query_asset(
name=asset_name,
query=”select * from my_scheme.my_table”
)

then standart expectations don’t work
For exampe expect_column_values_to_not_be_null
because parser in utils not found scheme

GX trying to make a check for the existence of a column

I think this is a bug, and it should check the set returned by the sql script instead of trying to access the information schema.