For example, the email_greeting_display field of the civicrm_contact table is not available as a field in Views. How do I add that to a View?
See also How to include a token in a view?
CiviCRM Stack Exchange is a question and answer site for administrators and users of the CiviCRM Constituent Relationship Management software. It only takes a minute to sign up.Sign up to join this community
You will need to add the field manually to:
and then submit a PR to civicrm-drupal repository, so the fix gets merged into the main code base.
In D8, the situation is a lot better, as torrance has automated the process and the fields and their definition get picked up automatically. So a lot cleaner and easier on everyone.
But for now, the above is your best bet and will help views intergration for D7 and prior
There are three ways to do this. Lobo detailed one of them, and alluded to work done for D8 to automate this - but similar work has been done for D7 as well.
The other two options each involve installing a module: Either civicrm_entity 2.0, or Views CiviCRM Expose Tables. Views Expose Tables can expose every field in every CiviCRM table. CiviCRM Entity works with fewer tables, but a) it's the ones you probably want, and b) it has applicability beyond Views - e.g. you can use it for Rules integration.
There was an excellent presentation by Mark Hanna from Sqvare at CiviCon Denver 2015: https://denver2015.civicrm.org/sessions/civicrmdrupal-integration-showcase. The video's not up yet, but the PDF of the slides is, and it's well worth reading, not just for Views integration.