cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Are there any best practices on using Redis with structured streaming (for data enrichment) ?

Anonymous
Not applicable
 
2 REPLIES 2

sajith_appukutt
Honored Contributor II

What would be the volume of data in Redis ?

Option 1: Read redis data into a dataframe and do a stream/static join

Option 2: Inside foreachBatch

  • Get redis connection
    • fetch lookup data by keys
    • perform the enrichment
    • close connection

Joe_Suarez
New Contributor III

Redis offers various data structures such as strings, lists, sets, and hashes. Depending on your use case, select the appropriate data structure for storing the crm enrich data. For example, if you need to store key-value pairs, Redis hashes (HSET, HGET) can be a good choice. Define a consistent schema for the data stored in Redis. This helps in ensuring that the data retrieved from Redis aligns with the expected structure during enrichment. Consistency in data schema simplifies downstream processing. When retrieving data from Redis during structured streaming, avoid making individual requests for each record. Instead, consider using pipeline operations to send multiple commands in a batch. This can significantly reduce network round-trips and improve performance.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group