SlideShare a Scribd company logo
1 of 18
Creating Streams with DataSift
Creating a Stream: Workflow
Creating a Stream: Specification Work out what you want your stream to do What do you want the elements to contain? What sources do you want the data to come from? What is your budget for data acquisition? Who is this data for?
Creating a Stream: Definition Write a Stream Definition that executes your specification
Creating a Stream: Filtered Data Retrieve the data that is filtered by your stream JSON API HTTP Streaming WebSockets Streaming RSS
Creating a Stream in DataSift   1. Select the Create Stream button on any page on DataSift
Creating a Stream in DataSift 2. Fill in the title, description, and tags for your Stream The Title and Description will be shown next to your Stream The Tags will be used for search and categorisation of your Stream Enabling the Private checkbox will make your Stream visible only to you
Creating a Stream in DataSift 3. Create your first stream definition This is the Stream Editor There is a default stream definition already inserted for you Why not try changing “hello world” to a different value? e.g. interaction.content contains “cat”
Creating a Stream in DataSift 4. Hit the Save button Your Stream is now saved You can use the breadcrumbs to go back to see a live preview of the results
FSDL: Filtered Stream Definition Language FSDL is the language used to write Stream Definitions for DataSift The language takes the following basic format: <term> <logical operator> <term> <logical operator> There must be a minimum of 1 term in a definition. All terms must be separated by logical operators. A logical operator is either “and” or “or”.
FSDL: Nested Rule On the previous slide, we had this definition outline: <term> <logical operator> <term> <logical operator> The term can be either one of a “nested rule” or a “predicate”. A nested rule is a method of including the result of another stream within the logic of this one. The syntax for a nested rule is: rule “<stream identifier>” Where the stream identifier is a 32-character alphanumeric string obtainable from the stream you wish to include’s page on DataSift, or through the API.
FSDL: Nested Rule Example This is an example of a simple FSDL definition: interaction.content contains “justinbieber” The Stream Identifier for this definition is 4e8e6772337d0b993391ee6417171b79. The stream will contain all content which contains “justinbieber” in its content. We can create another rule to filter this down further, using the nested rule syntax: rule “4e8e6772337d0b993391ee6417171b79” and language.tag == “en” This performs the same filtering as the first stream, with the addition of only including content determined to be in English using the language.tag == “en” predicate. In this case, the logical operator separating the two terms is “and”.
FSDL: Predicates Predicates are formed of 3 items, a target, operator and argument, in the following format: <target> <operator> <argument> In the previous example, we saw this predicate used to filter the results of another rule: language.tag == “en” In this example, the target is “language.tag”; the operator is “==“ (equals); and the argument is “en”. There is a long list of targets, operators, and the arguments they require on the DataSift Support Documentation.
FSDL: Example Predicates The following are some examples of some simple predicates: interaction.content contains “#rdgtweetup” twitter.user.friends_count >= 1000 interaction.content contains_word “net” interaction.geo exists author.username in "dtsn,nickhalstead,chris_alexander,datasift"
FSDL: Example Definitions Here are examples of more complex definitions composed of multiple terms: (interaction.contentcontains "Justin Bieber«  OR interaction.contentcontains "Justin Beiber") (interaction.content contains "Nokia" OR interaction.content contains "Motorola" OR interaction.content contains "Palm") AND interaction.content contains "phone“ interaction.content contains "#rdgfestival" OR interaction.content contains "#readingfestival"  OR rule "4315e367618830de6224c479f35db4ca"
API Calls API calls are available to perform most of the DataSift functionality. All of these API calls are available through a semi-RESTful interface, in a similar way to the Twitter API. Data formats supported include JSON, JSONP, XML and PHP (serialized). Each call is fully documented on the DataSift Support site.
Retrieving Stream Data Once you have configured your stream with a definition and verified it is correct, you can connect to your stream through a number of methods: The JSON API is simple and similar to how you would access Twitter Search. The HTTP Stream is similar to the Twitter firehose, giving a constant stream of data through a single connection. WebSockets is similar to this but meant for client-side connections through supported web browsers. RSS is also available, recommended for lower volume feeds only. All services are fully documented on the DataSift Support site.
Questions You can get more help, support, examples and user content on the DataSift Support website: http://support.datasift.net You can also ask us on Twitter: @datasift

More Related Content

What's hot

GContext: A context-based query construction service for Google
GContext: A context-based query construction service for GoogleGContext: A context-based query construction service for Google
GContext: A context-based query construction service for Google
John Pap
 
Creating, Updating and Deleting Document in MongoDB
Creating, Updating and Deleting Document in MongoDBCreating, Updating and Deleting Document in MongoDB
Creating, Updating and Deleting Document in MongoDB
Wildan Maulana
 

What's hot (15)

Tuning for Performance: indexes & Queries
Tuning for Performance: indexes & QueriesTuning for Performance: indexes & Queries
Tuning for Performance: indexes & Queries
 
CrossRef Technical Information for Libraries
CrossRef Technical Information for LibrariesCrossRef Technical Information for Libraries
CrossRef Technical Information for Libraries
 
Introduction to google hacking database
Introduction to google hacking databaseIntroduction to google hacking database
Introduction to google hacking database
 
Jumpstart: Introduction to Schema Design
Jumpstart: Introduction to Schema DesignJumpstart: Introduction to Schema Design
Jumpstart: Introduction to Schema Design
 
Data Analytics: Understanding Your MongoDB Data
Data Analytics: Understanding Your MongoDB DataData Analytics: Understanding Your MongoDB Data
Data Analytics: Understanding Your MongoDB Data
 
Webinar: Building Your First App with MongoDB and Java
Webinar: Building Your First App with MongoDB and JavaWebinar: Building Your First App with MongoDB and Java
Webinar: Building Your First App with MongoDB and Java
 
Web Integration Patterns in the Era of HTML5
Web Integration Patterns in the Era of HTML5Web Integration Patterns in the Era of HTML5
Web Integration Patterns in the Era of HTML5
 
IRJET- Privacy Preserving Keyword Search over Cloud Data
IRJET-  	  Privacy Preserving Keyword Search over Cloud DataIRJET-  	  Privacy Preserving Keyword Search over Cloud Data
IRJET- Privacy Preserving Keyword Search over Cloud Data
 
GContext: A context-based query construction service for Google
GContext: A context-based query construction service for GoogleGContext: A context-based query construction service for Google
GContext: A context-based query construction service for Google
 
Grails custom tag lib
Grails custom tag libGrails custom tag lib
Grails custom tag lib
 
3 google hacking
3 google hacking3 google hacking
3 google hacking
 
IRJET- Compound Keyword Search of Encrypted Cloud Data by using Semantic Scheme
IRJET- Compound Keyword Search of Encrypted Cloud Data by using Semantic SchemeIRJET- Compound Keyword Search of Encrypted Cloud Data by using Semantic Scheme
IRJET- Compound Keyword Search of Encrypted Cloud Data by using Semantic Scheme
 
OData, Open Data Protocol. A brief introduction
OData, Open Data Protocol. A brief introductionOData, Open Data Protocol. A brief introduction
OData, Open Data Protocol. A brief introduction
 
Kathryn Cassidy - Using MOAB versioning for preservation storage
Kathryn Cassidy - Using MOAB versioning for preservation storage Kathryn Cassidy - Using MOAB versioning for preservation storage
Kathryn Cassidy - Using MOAB versioning for preservation storage
 
Creating, Updating and Deleting Document in MongoDB
Creating, Updating and Deleting Document in MongoDBCreating, Updating and Deleting Document in MongoDB
Creating, Updating and Deleting Document in MongoDB
 

Viewers also liked

The DataSift platform
The DataSift platform The DataSift platform
The DataSift platform
ChrisParsons7
 

Viewers also liked (10)

The DataSift platform
The DataSift platform The DataSift platform
The DataSift platform
 
Se i Like fossero voti. Strumenti per misurare l'engagement dell'elettore e d...
Se i Like fossero voti. Strumenti per misurare l'engagement dell'elettore e d...Se i Like fossero voti. Strumenti per misurare l'engagement dell'elettore e d...
Se i Like fossero voti. Strumenti per misurare l'engagement dell'elettore e d...
 
Urbino in cinema
Urbino in cinemaUrbino in cinema
Urbino in cinema
 
C* Summit 2013: Dude, Where's My Tweet? Taming the Twitter Firehose by Andrew...
C* Summit 2013: Dude, Where's My Tweet? Taming the Twitter Firehose by Andrew...C* Summit 2013: Dude, Where's My Tweet? Taming the Twitter Firehose by Andrew...
C* Summit 2013: Dude, Where's My Tweet? Taming the Twitter Firehose by Andrew...
 
Extreme - Web & Social Media monitoring and analysis - Company Presentation
Extreme - Web & Social Media monitoring and analysis - Company PresentationExtreme - Web & Social Media monitoring and analysis - Company Presentation
Extreme - Web & Social Media monitoring and analysis - Company Presentation
 
Building the Social Powered Brand: Turning Social Data Into Competitive Advan...
Building the Social Powered Brand: Turning Social Data Into Competitive Advan...Building the Social Powered Brand: Turning Social Data Into Competitive Advan...
Building the Social Powered Brand: Turning Social Data Into Competitive Advan...
 
Dml Twitter Marketing, twitter
Dml Twitter Marketing, twitterDml Twitter Marketing, twitter
Dml Twitter Marketing, twitter
 
Sociologia di Twitter
Sociologia di TwitterSociologia di Twitter
Sociologia di Twitter
 
Mouse model: Pros & Cons
Mouse model: Pros & ConsMouse model: Pros & Cons
Mouse model: Pros & Cons
 
Tracxn Startup Research: Data as a Service Landscape, August 2016
Tracxn Startup Research: Data as a Service Landscape, August 2016Tracxn Startup Research: Data as a Service Landscape, August 2016
Tracxn Startup Research: Data as a Service Landscape, August 2016
 

Similar to Creating streams with DataSift

Similar to Creating streams with DataSift (20)

ASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And RepresentationASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And Representation
 
Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2
 
Rendering The Fat
Rendering The FatRendering The Fat
Rendering The Fat
 
DC-2008 Tutorial 3 - Dublin Core and other metadata schemas
DC-2008 Tutorial 3 - Dublin Core and other metadata schemasDC-2008 Tutorial 3 - Dublin Core and other metadata schemas
DC-2008 Tutorial 3 - Dublin Core and other metadata schemas
 
Ten Tips And Tricks for Improving Your GraphQL API with AWS AppSync (MOB401) ...
Ten Tips And Tricks for Improving Your GraphQL API with AWS AppSync (MOB401) ...Ten Tips And Tricks for Improving Your GraphQL API with AWS AppSync (MOB401) ...
Ten Tips And Tricks for Improving Your GraphQL API with AWS AppSync (MOB401) ...
 
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di PalmaEvolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
 
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDB
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDBIntroducing MongoDB Stitch, Backend-as-a-Service from MongoDB
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDB
 
RicoLiveGrid
RicoLiveGridRicoLiveGrid
RicoLiveGrid
 
RicoLiveGrid
RicoLiveGridRicoLiveGrid
RicoLiveGrid
 
Silverlight 5 whats new overview
Silverlight 5 whats new overviewSilverlight 5 whats new overview
Silverlight 5 whats new overview
 
GitConnect
GitConnectGitConnect
GitConnect
 
MongoDB Stich Overview
MongoDB Stich OverviewMongoDB Stich Overview
MongoDB Stich Overview
 
Web technologies part-2
Web technologies part-2Web technologies part-2
Web technologies part-2
 
Developing Transactional JEE Apps With Spring
Developing Transactional JEE Apps With SpringDeveloping Transactional JEE Apps With Spring
Developing Transactional JEE Apps With Spring
 
Shibboleth 2.0 IdP slides - Installfest (Edited)
Shibboleth 2.0 IdP slides - Installfest (Edited)Shibboleth 2.0 IdP slides - Installfest (Edited)
Shibboleth 2.0 IdP slides - Installfest (Edited)
 
Building nTier Applications with Entity Framework Services
Building nTier Applications with Entity Framework ServicesBuilding nTier Applications with Entity Framework Services
Building nTier Applications with Entity Framework Services
 
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
Alexandria ACM Student Chapter | Specification & Verification of Data-Centric...
 
Javascript
JavascriptJavascript
Javascript
 
Itemscript, a specification for RESTful JSON integration
Itemscript, a specification for RESTful JSON integrationItemscript, a specification for RESTful JSON integration
Itemscript, a specification for RESTful JSON integration
 
Ch 7 data binding
Ch 7 data bindingCh 7 data binding
Ch 7 data binding
 

More from DataSift

Marketers, Rev Your Engines: Facebook Topic Data is Available Now
Marketers, Rev Your Engines: Facebook Topic Data is Available Now Marketers, Rev Your Engines: Facebook Topic Data is Available Now
Marketers, Rev Your Engines: Facebook Topic Data is Available Now
DataSift
 

More from DataSift (18)

How to Build Innovative Products with Facebook Topic Data
How to Build Innovative Products with Facebook Topic DataHow to Build Innovative Products with Facebook Topic Data
How to Build Innovative Products with Facebook Topic Data
 
Boosting Your Brand Marketing with Facebook Topic Data Insights
Boosting Your Brand Marketing with Facebook Topic Data InsightsBoosting Your Brand Marketing with Facebook Topic Data Insights
Boosting Your Brand Marketing with Facebook Topic Data Insights
 
Staying on the Right Side of the Fence when Analyzing Human Data
Staying on the Right Side of the Fence when Analyzing Human DataStaying on the Right Side of the Fence when Analyzing Human Data
Staying on the Right Side of the Fence when Analyzing Human Data
 
Facebook Topic Data in 2016: The Update
Facebook Topic Data in 2016: The UpdateFacebook Topic Data in 2016: The Update
Facebook Topic Data in 2016: The Update
 
10 Reasons Facebook Topic Data Will Change Your World
10 Reasons Facebook Topic Data Will Change Your World 10 Reasons Facebook Topic Data Will Change Your World
10 Reasons Facebook Topic Data Will Change Your World
 
Applying Data Science to Move Beyond Keywords for Social Analysis
Applying Data Science to Move Beyond Keywords for Social Analysis Applying Data Science to Move Beyond Keywords for Social Analysis
Applying Data Science to Move Beyond Keywords for Social Analysis
 
Get a Clearer Picture of Your Target Audience with Facebook Topic Data
Get a Clearer Picture of Your Target Audience with Facebook Topic DataGet a Clearer Picture of Your Target Audience with Facebook Topic Data
Get a Clearer Picture of Your Target Audience with Facebook Topic Data
 
What's New in Facebook Topic Data
What's New in Facebook Topic DataWhat's New in Facebook Topic Data
What's New in Facebook Topic Data
 
Marketers, Rev Your Engines: Facebook Topic Data is Available Now
Marketers, Rev Your Engines: Facebook Topic Data is Available Now Marketers, Rev Your Engines: Facebook Topic Data is Available Now
Marketers, Rev Your Engines: Facebook Topic Data is Available Now
 
Five Things You Didn't Know DataSift Can Do
Five Things You Didn't Know DataSift Can DoFive Things You Didn't Know DataSift Can Do
Five Things You Didn't Know DataSift Can Do
 
DataSift VEDO FOCUS introduction
DataSift VEDO FOCUS introductionDataSift VEDO FOCUS introduction
DataSift VEDO FOCUS introduction
 
Improved Speed + Accuracy for Research with Datasift Demographics
Improved Speed + Accuracy for Research with Datasift DemographicsImproved Speed + Accuracy for Research with Datasift Demographics
Improved Speed + Accuracy for Research with Datasift Demographics
 
Taming Social Data: How Social Data Framing liberates analysis and accelerate...
Taming Social Data: How Social Data Framing liberates analysis and accelerate...Taming Social Data: How Social Data Framing liberates analysis and accelerate...
Taming Social Data: How Social Data Framing liberates analysis and accelerate...
 
Turning Social Data Into Strategic Advantage: What Marketers Need to Know
Turning Social Data Into Strategic Advantage: What Marketers Need to KnowTurning Social Data Into Strategic Advantage: What Marketers Need to Know
Turning Social Data Into Strategic Advantage: What Marketers Need to Know
 
DataSift's Rob Bailey at The Social Media Strategies Summit
DataSift's Rob Bailey at The Social Media Strategies Summit DataSift's Rob Bailey at The Social Media Strategies Summit
DataSift's Rob Bailey at The Social Media Strategies Summit
 
DataSift September '12 Release Overview
DataSift September '12 Release OverviewDataSift September '12 Release Overview
DataSift September '12 Release Overview
 
Follow the content
Follow the contentFollow the content
Follow the content
 
Twitter, Social Sentiment and Stock Markets
Twitter, Social Sentiment and Stock MarketsTwitter, Social Sentiment and Stock Markets
Twitter, Social Sentiment and Stock Markets
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Creating streams with DataSift

  • 3. Creating a Stream: Specification Work out what you want your stream to do What do you want the elements to contain? What sources do you want the data to come from? What is your budget for data acquisition? Who is this data for?
  • 4. Creating a Stream: Definition Write a Stream Definition that executes your specification
  • 5. Creating a Stream: Filtered Data Retrieve the data that is filtered by your stream JSON API HTTP Streaming WebSockets Streaming RSS
  • 6. Creating a Stream in DataSift 1. Select the Create Stream button on any page on DataSift
  • 7. Creating a Stream in DataSift 2. Fill in the title, description, and tags for your Stream The Title and Description will be shown next to your Stream The Tags will be used for search and categorisation of your Stream Enabling the Private checkbox will make your Stream visible only to you
  • 8. Creating a Stream in DataSift 3. Create your first stream definition This is the Stream Editor There is a default stream definition already inserted for you Why not try changing “hello world” to a different value? e.g. interaction.content contains “cat”
  • 9. Creating a Stream in DataSift 4. Hit the Save button Your Stream is now saved You can use the breadcrumbs to go back to see a live preview of the results
  • 10. FSDL: Filtered Stream Definition Language FSDL is the language used to write Stream Definitions for DataSift The language takes the following basic format: <term> <logical operator> <term> <logical operator> There must be a minimum of 1 term in a definition. All terms must be separated by logical operators. A logical operator is either “and” or “or”.
  • 11. FSDL: Nested Rule On the previous slide, we had this definition outline: <term> <logical operator> <term> <logical operator> The term can be either one of a “nested rule” or a “predicate”. A nested rule is a method of including the result of another stream within the logic of this one. The syntax for a nested rule is: rule “<stream identifier>” Where the stream identifier is a 32-character alphanumeric string obtainable from the stream you wish to include’s page on DataSift, or through the API.
  • 12. FSDL: Nested Rule Example This is an example of a simple FSDL definition: interaction.content contains “justinbieber” The Stream Identifier for this definition is 4e8e6772337d0b993391ee6417171b79. The stream will contain all content which contains “justinbieber” in its content. We can create another rule to filter this down further, using the nested rule syntax: rule “4e8e6772337d0b993391ee6417171b79” and language.tag == “en” This performs the same filtering as the first stream, with the addition of only including content determined to be in English using the language.tag == “en” predicate. In this case, the logical operator separating the two terms is “and”.
  • 13. FSDL: Predicates Predicates are formed of 3 items, a target, operator and argument, in the following format: <target> <operator> <argument> In the previous example, we saw this predicate used to filter the results of another rule: language.tag == “en” In this example, the target is “language.tag”; the operator is “==“ (equals); and the argument is “en”. There is a long list of targets, operators, and the arguments they require on the DataSift Support Documentation.
  • 14. FSDL: Example Predicates The following are some examples of some simple predicates: interaction.content contains “#rdgtweetup” twitter.user.friends_count >= 1000 interaction.content contains_word “net” interaction.geo exists author.username in "dtsn,nickhalstead,chris_alexander,datasift"
  • 15. FSDL: Example Definitions Here are examples of more complex definitions composed of multiple terms: (interaction.contentcontains "Justin Bieber«  OR interaction.contentcontains "Justin Beiber") (interaction.content contains "Nokia" OR interaction.content contains "Motorola" OR interaction.content contains "Palm") AND interaction.content contains "phone“ interaction.content contains "#rdgfestival" OR interaction.content contains "#readingfestival" OR rule "4315e367618830de6224c479f35db4ca"
  • 16. API Calls API calls are available to perform most of the DataSift functionality. All of these API calls are available through a semi-RESTful interface, in a similar way to the Twitter API. Data formats supported include JSON, JSONP, XML and PHP (serialized). Each call is fully documented on the DataSift Support site.
  • 17. Retrieving Stream Data Once you have configured your stream with a definition and verified it is correct, you can connect to your stream through a number of methods: The JSON API is simple and similar to how you would access Twitter Search. The HTTP Stream is similar to the Twitter firehose, giving a constant stream of data through a single connection. WebSockets is similar to this but meant for client-side connections through supported web browsers. RSS is also available, recommended for lower volume feeds only. All services are fully documented on the DataSift Support site.
  • 18. Questions You can get more help, support, examples and user content on the DataSift Support website: http://support.datasift.net You can also ask us on Twitter: @datasift