How to Create Custom Expectation of type Multicolumn Map Expectation

we are using GX 1.3.4 version in databricks and have a requirement where we have to check multiple column values are Null and if multiple column values are null then fail that row. We are looking for sample code snippet. Please assist.

Datasource is spark dataframe.

i am also looking more info on custom validations in newer gx versions 1.2.x. the samples and docs show in “Get Started” are basic. please some one provide how to override base expection and do our custom logic in it. but in your case you can achive this by query like below
import great_expectations as gx

Define your custom SQL query.

my_query = “”"
SELECT
col1,col2
FROM
{batch}
WHERE
col1 is null and col2 is null
“”"

Customize how the Expectation renders in Data Docs.

my_description = “There should be no more than 6 passengers.”

Create an Expectation using the UnexpectedRowsExpectation class and your parameters.

expect_passenger_count_to_be_legal = gx.expectations.UnexpectedRowsExpectation(
unexpected_rows_query=my_query,
description=my_description,
)