בקרה על טווח התאריכים
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אם אתם עובדים עם מקור נתונים שדורש טווח תאריכים לאחזור נתונים, תוכלו להשתמש בתכונות טווח התאריכים של Looker Studio.
כדי להפעיל את התכונה של בקרת טווח התאריכים במחבר הקהילה, צריך להגדיר את הערך dateRangeRequired
כ-true
בתשובה של getConfig
. לאחר מכן, Looker Studio יכלול תאריך התחלה וסיום לכל בקשת getData
שנשלחת למחבר.
ההתנהגות של getData
כשהערך של dateRangeRequired
הוא true
אם הערך של dateRangeRequired
הוא true
בתגובה ל-getConfig
, כל בקשת getData
תכיל אובייקט dateRange
עם הפרמטרים startDate
ו-endDate
. הפרמטרים של התאריך יהיו בפורמט YYYY-MM-DD
. תוכלו להשתמש בערכים האלה בבקשות לאחזור נתונים לשירותי צד שלישי.
- כברירת מחדל, טווח התאריכים שסופק יהיה של 28 הימים האחרונים, לא כולל היום.
- אם משתמש מחיל מסנן של טווח תאריכים על דוח מסוים, טווח התאריכים שצוין ישקף את בחירת המשתמשים.
- כשהמערכת של Looker Studio מנסה לזהות סוגים סמנטיים, הערך
sampleExtraction
מוגדר ל-true
בבקשות getData
. במקרה של בקשות כאלה, תאריך ההתחלה ותאריך הסיום חלו יומיים לפני התאריך הנוכחי.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[[["\u003cp\u003eWhen fetching data requiring a date range, leverage Looker Studio's date range features by setting \u003ccode\u003edateRangeRequired\u003c/code\u003e to \u003ccode\u003etrue\u003c/code\u003e in your connector's \u003ccode\u003egetConfig\u003c/code\u003e response.\u003c/p\u003e\n"],["\u003cp\u003eThis enables Looker Studio to include start and end dates with every \u003ccode\u003egetData\u003c/code\u003e request, allowing you to filter data from external sources.\u003c/p\u003e\n"],["\u003cp\u003eThe default date range is the last 28 days excluding today, but users can apply custom ranges, and semantic type detection uses a two-day offset.\u003c/p\u003e\n"]]],[],null,["# Date range control\n\nIf you are working with a data source that requires a date range when fetching\ndata, you can take advantage of the [Looker Studio date range features](https://support.google.com/looker-studio/answer/6291067).\n\nTo enable the date range control feature for your Community Connector, set\n`dateRangeRequired` to `true` in your\n[`getConfig`](/looker-studio/connector/reference#getconfig) response. Then,\nLooker Studio will include a start and end date with every\n[`getData`](/looker-studio/connector/reference#getdata) request made to your\nconnector.\n\n`getData` behavior when `dateRangeRequired` is `true`\n-----------------------------------------------------\n\nWhen `dateRangeRequired` is set to `true` in your `getConfig` response, each\n[`getData`](/looker-studio/connector/reference#getdata) request will contain a\n`dateRange` object with `startDate` and `endDate` parameters. The date\nparameters will be in `YYYY-MM-DD` format. You can use these values in data\nfetch requests to third-party services.\n\n- By default, the date range provided will be the last 28 days, excluding today.\n- If a user applies a date range filter for a report then the date range provided will reflect the user selection.\n- When Looker Studio is attempting to detect [semantic types](/looker-studio/connector/semantics), [`sampleExtraction`](/looker-studio/connector/reference#request_3) is set to `true` in `getData` requests. For these requests, the date provided for the start and the end date is two days earlier than today."]]