In the extractor I wanted to ingest the datapoints for the created timeseries in the given dataset.
even though its ingesting datapoints for the created timeseries But also ingesting datapoints for timeseries which are not available or not created.
It's also creating timeseries and ingesting datapoints.
OR is there any way to add config or mapping for extractor??
Best answer by Viraj Dhanusha
Hi Amit,
As you are passing the connection string as an environment variable, you need to activate environment substitution by using !env tag in the config file.
extractor: # (Optional) Number of rows to fetch from sources before uploading upload-queue-size: 10000 # (Optional) Where to store extraction states (progress) between runs. # Required for incremental load to work. state-store: # Uncomment to use a local json file for state storage #local: #path: C:\Users\ARane3\Desktop\odf\ingestion\cognite-db-extractor\state.json # (Optional) Save interval (in seconds) for intermediate file saves. # A final save will also be made on extractor shutdown. #save-interval: 30 # Uncomment to use a RAW table for state storage raw: # RAW database and table to use database: "src:001:avocet:pdm:state" table: "src:001:avocet:pdm:state:table" # (Optional) Upload interval (pin seconds) for intermediate uploads. # A final upload will also be made on extractor shutdown. upload-interval: 300
databases: - name: CDF_SOURCE_DATA #this is your connection identifier name connection-string: "DSN=incremental-data;Uid=Uid;Pwd=Pwd" # dsn+user_id+password timeout: 0 queries:
- name: WELL_READ_STRING # Name of database to use (as specified in the databases section) database: CDF_SOURCE_DATA # same as above database
# Query to execute. Supports interpolation with {incremental_field} # and{start_at} to facilitate incremental load between runs query: SELECT distinct CONCAT (ITEM_ID, ':', ITEM_TYPE, ':', PROPERTY COLLATE DATABASE_DEFAULT) AS externalId,START_DATETIME AS timestamp, PROPERTY_VALUE AS value FROM (SELECT T1.ITEM_ID, START_DATETIME, LAST_UPDT_DATE, T1.ITEM_TYPE, ITEM_NAME FROM VT_WELL_READ_en_US as T1 inner JOIN (select I_P.ITEM_ID, I_L.FROM_ITEM_ID, I_L.TO_ITEM_ID, I_P.ITEM_TYPE AS ITEM_TYPE, I_P.PROPERTY_STRING AS NAME FROM ITEM_PROPERTY AS I_P inner join ITEM_LINK AS I_L on I_P.ITEM_ID =I_L.FROM_ITEM_ID WHERE I_L.LINK_TYPE IN ('BATTERY_ITEM', 'ORG_ITEM')) as t2 on T1.ITEM_ID=t2.ITEM_ID WHERE ITEM_NAME IS NOT NULL) AS WELL_PROP_DATA UNPIVOT (PROPERTY_VALUE FOR PROPERTY IN (ITEM_NAME)) AS UNPIVOT_PROPERTY
As you are passing the connection string as an environment variable, you need to activate environment substitution by using !env tag in the config file.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.