Created
October 21, 2021 23:26
-
-
Save nfarah86/f8fe11ddd6bda7ac1646efad405b0405 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_query_lambda(rs): | |
# Create a query builder obj and run your SQL query | |
u = rs.sql(Q('s3sparkPythonMoviesColTrue').where(F["video"] == "True").limit(1)) | |
print(u) | |
# create a query builder object | |
q = Q('s3sparkPythonMoviesColTrue').where(F["video"] == "True").limit(1) | |
# create a new Query Lambda | |
qlambda = rs.QueryLambda.create('sparkRocksetQLVideo', workspace='commons',query=q,) | |
# execute a Query Lambda | |
results = qlambda.execute() | |
print(results) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment